[BACK]Return to gzsig.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / gzsig

Annotation of src/usr.bin/gzsig/gzsig.c, Revision 1.3

1.3     ! djm         1: /* $OpenBSD: gzsig.c,v 1.2 2005/05/28 08:07:45 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>
1.3     ! djm        38: #include <stdlib.h>
1.1       marius     39:
                     40: #include "extern.h"
                     41:
                     42: static void
                     43: usage(void)
                     44: {
                     45:        sign_usage();
                     46:        verify_usage();
                     47:        exit(1);
                     48: }
                     49:
                     50: int
                     51: main(int argc, char *argv[])
                     52: {
                     53:        if (argc < 2)
                     54:                usage();
                     55:
                     56:        if (strcmp(argv[1], "sign") == 0) {
                     57:                sign(argc - 1, argv + 1);
                     58:        } else if (strcmp(argv[1], "verify") == 0) {
                     59:                verify(argc - 1, argv + 1);
                     60:        } else {
                     61:                usage();
                     62:        }
                     63:
                     64:        exit(0);
                     65: }