diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2015-08-22 16:36:06 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2015-08-22 16:36:06 +0000 |
commit | e1892f81b8a1c924d40606784458d569e3f68eea (patch) | |
tree | e593e162274c6c52a0df078254c49fb7d523a487 /usr.bin/openssl/openssl.c | |
parent | 07a15b2cdf29c0d2880e4dfcc270506c47323228 (diff) |
Remove all duplicate prototypes for *_main functions (these are already
provided by progs.h). Also, move the FUNCTION type (and flags) into
openssl.c since that is the only place of use. Lastly, remove pointless
'extern' from the prototypes and use char **argv instead of char *argv[]
(the former is used elsewhere).
ok deraadt@ doug@
Diffstat (limited to 'usr.bin/openssl/openssl.c')
-rw-r--r-- | usr.bin/openssl/openssl.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.bin/openssl/openssl.c b/usr.bin/openssl/openssl.c index 1754b3a1079..6d56b00f961 100644 --- a/usr.bin/openssl/openssl.c +++ b/usr.bin/openssl/openssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openssl.c,v 1.4 2015/08/19 18:25:31 deraadt Exp $ */ +/* $OpenBSD: openssl.c,v 1.5 2015/08/22 16:36:05 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -133,6 +133,21 @@ #include "progs.h" #include "s_apps.h" +#define FUNC_TYPE_GENERAL 1 +#define FUNC_TYPE_MD 2 +#define FUNC_TYPE_CIPHER 3 +#define FUNC_TYPE_PKEY 4 +#define FUNC_TYPE_MD_ALG 5 +#define FUNC_TYPE_CIPHER_ALG 6 + +typedef struct { + int type; + const char *name; + int (*func)(int argc, char **argv); +} FUNCTION; + +DECLARE_LHASH_OF(FUNCTION); + FUNCTION functions[] = { /* General functions. */ |