Annotation of src/usr.bin/gzsig/gzsig.c, Revision 1.2
1.2 ! marius 1: /* $OpenBSD: gzsig.c,v 1.1.1.1 2005/05/28 01:57:30 marius Exp $ */
1.1 marius 2:
3: /*
4: * gzsig.c
5: *
6: * Copyright (c) 2001 Dug Song <dugsong@arbor.net>
7: * Copyright (c) 2001 Arbor Networks, Inc.
8: *
9: * Redistribution and use in source and binary forms, with or without
10: * modification, are permitted provided that the following conditions
11: * are met:
12: *
13: * 1. Redistributions of source code must retain the above copyright
14: * notice, this list of conditions and the following disclaimer.
15: * 2. Redistributions in binary form must reproduce the above copyright
16: * notice, this list of conditions and the following disclaimer in the
17: * documentation and/or other materials provided with the distribution.
18: * 3. The names of the copyright holders may not be used to endorse or
19: * promote products derived from this software without specific
20: * prior written permission.
21: *
22: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
23: * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24: * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
25: * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26: * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28: * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29: * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30: * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31: * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32: *
1.2 ! marius 33: * $Vendor: gzsig.c,v 1.2 2005/04/01 16:47:31 dugsong Exp $
1.1 marius 34: */
35:
36: #include <stdio.h>
37: #include <string.h>
38:
39: #include "extern.h"
40:
41: static void
42: usage(void)
43: {
44: sign_usage();
45: verify_usage();
46: exit(1);
47: }
48:
49: int
50: main(int argc, char *argv[])
51: {
52: if (argc < 2)
53: usage();
54:
55: if (strcmp(argv[1], "sign") == 0) {
56: sign(argc - 1, argv + 1);
57: } else if (strcmp(argv[1], "verify") == 0) {
58: verify(argc - 1, argv + 1);
59: } else {
60: usage();
61: }
62:
63: exit(0);
64: }