summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/openssl/ca.c4
-rw-r--r--usr.bin/openssl/certhash.c2
-rw-r--r--usr.bin/openssl/cms.c4
-rw-r--r--usr.bin/openssl/crl.c4
-rw-r--r--usr.bin/openssl/crl2p7.c4
-rw-r--r--usr.bin/openssl/dgst.c4
-rw-r--r--usr.bin/openssl/dh.c4
-rw-r--r--usr.bin/openssl/dhparam.c4
-rw-r--r--usr.bin/openssl/dsa.c4
-rw-r--r--usr.bin/openssl/dsaparam.c4
-rw-r--r--usr.bin/openssl/ec.c4
-rw-r--r--usr.bin/openssl/ecparam.c4
-rw-r--r--usr.bin/openssl/enc.c4
-rw-r--r--usr.bin/openssl/engine.c4
-rw-r--r--usr.bin/openssl/errstr.c4
-rw-r--r--usr.bin/openssl/gendh.c4
-rw-r--r--usr.bin/openssl/gendsa.c4
-rw-r--r--usr.bin/openssl/genpkey.c5
-rw-r--r--usr.bin/openssl/genrsa.c4
-rw-r--r--usr.bin/openssl/nseq.c4
-rw-r--r--usr.bin/openssl/ocsp.c5
-rw-r--r--usr.bin/openssl/openssl.c17
-rw-r--r--usr.bin/openssl/passwd.c4
-rw-r--r--usr.bin/openssl/pkcs12.c4
-rw-r--r--usr.bin/openssl/pkcs7.c4
-rw-r--r--usr.bin/openssl/pkey.c4
-rw-r--r--usr.bin/openssl/pkeyparam.c4
-rw-r--r--usr.bin/openssl/pkeyutl.c4
-rw-r--r--usr.bin/openssl/prime.c4
-rw-r--r--usr.bin/openssl/progs.h108
-rw-r--r--usr.bin/openssl/rand.c4
-rw-r--r--usr.bin/openssl/req.c4
-rw-r--r--usr.bin/openssl/rsautl.c4
-rw-r--r--usr.bin/openssl/s_client.c4
-rw-r--r--usr.bin/openssl/s_server.c4
-rw-r--r--usr.bin/openssl/s_time.c4
-rw-r--r--usr.bin/openssl/smime.c4
-rw-r--r--usr.bin/openssl/speed.c5
-rw-r--r--usr.bin/openssl/ts.c5
-rw-r--r--usr.bin/openssl/verify.c4
-rw-r--r--usr.bin/openssl/version.c4
-rw-r--r--usr.bin/openssl/x509.c4
42 files changed, 102 insertions, 185 deletions
diff --git a/usr.bin/openssl/ca.c b/usr.bin/openssl/ca.c
index 8500abe4ea3..f4f07e76a27 100644
--- a/usr.bin/openssl/ca.c
+++ b/usr.bin/openssl/ca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ca.c,v 1.8 2015/07/22 15:52:32 jsing Exp $ */
+/* $OpenBSD: ca.c,v 1.9 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -215,8 +215,6 @@ static int preserve = 0;
static int msie_hack = 0;
-int ca_main(int, char **);
-
int
ca_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/certhash.c b/usr.bin/openssl/certhash.c
index 84364f1560e..a53ffe20535 100644
--- a/usr.bin/openssl/certhash.c
+++ b/usr.bin/openssl/certhash.c
@@ -643,8 +643,6 @@ certhash_usage(void)
options_usage(certhash_options);
}
-int certhash_main(int argc, char **argv);
-
int
certhash_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/cms.c b/usr.bin/openssl/cms.c
index 21d27adad1d..c6e662ab33e 100644
--- a/usr.bin/openssl/cms.c
+++ b/usr.bin/openssl/cms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cms.c,v 1.1 2014/08/26 17:47:24 jsing Exp $ */
+/* $OpenBSD: cms.c,v 1.2 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
@@ -96,8 +96,6 @@ static CMS_ReceiptRequest * make_receipt_request(
int verify_err = 0;
-int cms_main(int, char **);
-
int
cms_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/crl.c b/usr.bin/openssl/crl.c
index 2b6a4a3e5df..4ab9e6c6152 100644
--- a/usr.bin/openssl/crl.c
+++ b/usr.bin/openssl/crl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crl.c,v 1.6 2014/12/28 15:48:52 jsing Exp $ */
+/* $OpenBSD: crl.c,v 1.7 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -215,8 +215,6 @@ crl_usage(void)
static X509_CRL *load_crl(char *file, int format);
static BIO *bio_out = NULL;
-int crl_main(int, char **);
-
int
crl_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/crl2p7.c b/usr.bin/openssl/crl2p7.c
index 208bce7866e..4df986d3250 100644
--- a/usr.bin/openssl/crl2p7.c
+++ b/usr.bin/openssl/crl2p7.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crl2p7.c,v 1.3 2015/07/12 16:32:21 doug Exp $ */
+/* $OpenBSD: crl2p7.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -156,8 +156,6 @@ crl2p7_usage(void)
options_usage(crl2p7_options);
}
-int crl2pkcs7_main(int, char **);
-
int
crl2pkcs7_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/dgst.c b/usr.bin/openssl/dgst.c
index c9ac057d01f..efffd2c0343 100644
--- a/usr.bin/openssl/dgst.c
+++ b/usr.bin/openssl/dgst.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dgst.c,v 1.3 2015/07/20 18:23:52 rpointel Exp $ */
+/* $OpenBSD: dgst.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -98,8 +98,6 @@ list_md_fn(const EVP_MD * m, const char *from, const char *to, void *arg)
mname, mname);
}
-int dgst_main(int, char **);
-
int
dgst_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/dh.c b/usr.bin/openssl/dh.c
index 436ce1ae0b4..ed86428258e 100644
--- a/usr.bin/openssl/dh.c
+++ b/usr.bin/openssl/dh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh.c,v 1.4 2015/07/12 22:57:00 doug Exp $ */
+/* $OpenBSD: dh.c,v 1.5 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -162,8 +162,6 @@ dh_usage(void)
options_usage(dh_options);
}
-int dh_main(int, char **);
-
int
dh_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/dhparam.c b/usr.bin/openssl/dhparam.c
index 6f471d65e19..5757b906b16 100644
--- a/usr.bin/openssl/dhparam.c
+++ b/usr.bin/openssl/dhparam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhparam.c,v 1.4 2015/07/11 15:04:56 jsing Exp $ */
+/* $OpenBSD: dhparam.c,v 1.5 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -245,8 +245,6 @@ dhparam_usage()
static int dh_cb(int p, int n, BN_GENCB * cb);
-int dhparam_main(int, char **);
-
int
dhparam_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/dsa.c b/usr.bin/openssl/dsa.c
index 6edd6945305..2b6bff29f3a 100644
--- a/usr.bin/openssl/dsa.c
+++ b/usr.bin/openssl/dsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsa.c,v 1.3 2015/07/12 22:21:38 doug Exp $ */
+/* $OpenBSD: dsa.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -243,8 +243,6 @@ dsa_usage(void)
fprintf(stderr, "\n");
}
-int dsa_main(int, char **);
-
int
dsa_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/dsaparam.c b/usr.bin/openssl/dsaparam.c
index e54e3cbe78e..66cacbb3a9c 100644
--- a/usr.bin/openssl/dsaparam.c
+++ b/usr.bin/openssl/dsaparam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsaparam.c,v 1.3 2015/07/12 16:37:37 doug Exp $ */
+/* $OpenBSD: dsaparam.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -170,8 +170,6 @@ dsaparam_usage(void)
static int dsa_cb(int p, int n, BN_GENCB * cb);
-int dsaparam_main(int, char **);
-
int
dsaparam_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/ec.c b/usr.bin/openssl/ec.c
index 16daf3fa138..b593e2b4a12 100644
--- a/usr.bin/openssl/ec.c
+++ b/usr.bin/openssl/ec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec.c,v 1.3 2015/07/12 22:16:49 doug Exp $ */
+/* $OpenBSD: ec.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project.
*/
@@ -279,8 +279,6 @@ ec_usage(void)
fprintf(stderr, "\n");
}
-int ec_main(int, char **);
-
int
ec_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/ecparam.c b/usr.bin/openssl/ecparam.c
index 1410d89f4e0..b0b46a145d4 100644
--- a/usr.bin/openssl/ecparam.c
+++ b/usr.bin/openssl/ecparam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ecparam.c,v 1.11 2015/07/20 21:56:47 doug Exp $ */
+/* $OpenBSD: ecparam.c,v 1.12 2015/08/22 16:36:05 jsing Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project.
*/
@@ -259,8 +259,6 @@ ecparam_usage(void)
options_usage(ecparam_options);
}
-int ecparam_main(int, char **);
-
int
ecparam_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/enc.c b/usr.bin/openssl/enc.c
index e449ac8cc78..bb908b242d7 100644
--- a/usr.bin/openssl/enc.c
+++ b/usr.bin/openssl/enc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: enc.c,v 1.4 2015/01/01 13:55:03 jsing Exp $ */
+/* $OpenBSD: enc.c,v 1.5 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -328,8 +328,6 @@ enc_usage(void)
fprintf(stderr, "\n");
}
-int enc_main(int, char **);
-
int
enc_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/engine.c b/usr.bin/openssl/engine.c
index faf23fcd198..0dc30438873 100644
--- a/usr.bin/openssl/engine.c
+++ b/usr.bin/openssl/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.4 2015/07/16 15:24:41 beck Exp $ */
+/* $OpenBSD: engine.c,v 1.5 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Richard Levitte <richard@levitte.org> for the OpenSSL
* project 2000.
*/
@@ -310,8 +310,6 @@ util_do_cmds(ENGINE * e, STACK_OF(OPENSSL_STRING) * cmds,
}
}
-int engine_main(int, char **);
-
int
engine_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/errstr.c b/usr.bin/openssl/errstr.c
index 9a9c844c6a2..9cf7bfba4b7 100644
--- a/usr.bin/openssl/errstr.c
+++ b/usr.bin/openssl/errstr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: errstr.c,v 1.3 2015/04/14 10:54:40 jsing Exp $ */
+/* $OpenBSD: errstr.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -89,8 +89,6 @@ errstr_usage()
options_usage(errstr_options);
}
-int errstr_main(int, char **);
-
int
errstr_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/gendh.c b/usr.bin/openssl/gendh.c
index 85aaf4d1d17..38186f03075 100644
--- a/usr.bin/openssl/gendh.c
+++ b/usr.bin/openssl/gendh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gendh.c,v 1.3 2015/07/12 22:09:00 doug Exp $ */
+/* $OpenBSD: gendh.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -137,8 +137,6 @@ gendh_usage(void)
options_usage(gendh_options);
}
-int gendh_main(int, char **);
-
int
gendh_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/gendsa.c b/usr.bin/openssl/gendsa.c
index 7c9f568830c..8f480525a02 100644
--- a/usr.bin/openssl/gendsa.c
+++ b/usr.bin/openssl/gendsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gendsa.c,v 1.1 2014/08/26 17:47:24 jsing Exp $ */
+/* $OpenBSD: gendsa.c,v 1.2 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -76,8 +76,6 @@
#define DEFBITS 512
-int gendsa_main(int, char **);
-
int
gendsa_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/genpkey.c b/usr.bin/openssl/genpkey.c
index 882d0ba13dc..1ebc4e7d3cf 100644
--- a/usr.bin/openssl/genpkey.c
+++ b/usr.bin/openssl/genpkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: genpkey.c,v 1.3 2014/08/28 14:25:48 jsing Exp $ */
+/* $OpenBSD: genpkey.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006
*/
@@ -74,9 +74,6 @@ init_keygen_file(BIO * err, EVP_PKEY_CTX ** pctx, const char *file,
ENGINE * e);
static int genpkey_cb(EVP_PKEY_CTX * ctx);
-
-int genpkey_main(int, char **);
-
int
genpkey_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/genrsa.c b/usr.bin/openssl/genrsa.c
index 0e8dbf5ba67..99f2bf36418 100644
--- a/usr.bin/openssl/genrsa.c
+++ b/usr.bin/openssl/genrsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: genrsa.c,v 1.3 2014/10/22 13:51:31 jsing Exp $ */
+/* $OpenBSD: genrsa.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -85,8 +85,6 @@
static int genrsa_cb(int p, int n, BN_GENCB * cb);
-int genrsa_main(int, char **);
-
int
genrsa_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/nseq.c b/usr.bin/openssl/nseq.c
index 6de9ea56be3..b73f512aeef 100644
--- a/usr.bin/openssl/nseq.c
+++ b/usr.bin/openssl/nseq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nseq.c,v 1.3 2015/07/21 16:41:34 jsing Exp $ */
+/* $OpenBSD: nseq.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -101,8 +101,6 @@ nseq_usage()
options_usage(nseq_options);
}
-int nseq_main(int, char **);
-
int
nseq_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/ocsp.c b/usr.bin/openssl/ocsp.c
index 3cf85d4d2c2..ab5a7557130 100644
--- a/usr.bin/openssl/ocsp.c
+++ b/usr.bin/openssl/ocsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocsp.c,v 1.2 2014/12/02 19:39:16 deraadt Exp $ */
+/* $OpenBSD: ocsp.c,v 1.3 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -102,9 +102,6 @@ static OCSP_RESPONSE *query_responder(BIO * err, BIO * cbio, char *path,
STACK_OF(CONF_VALUE) * headers,
OCSP_REQUEST * req, int req_timeout);
-
-int ocsp_main(int, char **);
-
int
ocsp_main(int argc, char **argv)
{
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. */
diff --git a/usr.bin/openssl/passwd.c b/usr.bin/openssl/passwd.c
index 6267328e621..b6285649e75 100644
--- a/usr.bin/openssl/passwd.c
+++ b/usr.bin/openssl/passwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: passwd.c,v 1.3 2015/01/05 15:25:39 jsing Exp $ */
+/* $OpenBSD: passwd.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
#if defined OPENSSL_NO_MD5
#define NO_MD5CRYPT_1
@@ -132,8 +132,6 @@ passwd_usage(void)
options_usage(passwd_options);
}
-int passwd_main(int, char **);
-
int
passwd_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/pkcs12.c b/usr.bin/openssl/pkcs12.c
index 41924a9698d..901ddc05f35 100644
--- a/usr.bin/openssl/pkcs12.c
+++ b/usr.bin/openssl/pkcs12.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkcs12.c,v 1.2 2014/08/28 14:23:52 jsing Exp $ */
+/* $OpenBSD: pkcs12.c,v 1.3 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
@@ -92,8 +92,6 @@ int alg_print(BIO * x, X509_ALGOR * alg);
int cert_load(BIO * in, STACK_OF(X509) * sk);
static int set_pbe(BIO * err, int *ppbe, const char *str);
-int pkcs12_main(int, char **);
-
int
pkcs12_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/pkcs7.c b/usr.bin/openssl/pkcs7.c
index 23c4799036e..3180f357f1a 100644
--- a/usr.bin/openssl/pkcs7.c
+++ b/usr.bin/openssl/pkcs7.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkcs7.c,v 1.4 2015/07/21 16:34:31 jsing Exp $ */
+/* $OpenBSD: pkcs7.c,v 1.5 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -158,8 +158,6 @@ pkcs7_usage()
options_usage(pkcs7_options);
}
-int pkcs7_main(int, char **);
-
int
pkcs7_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/pkey.c b/usr.bin/openssl/pkey.c
index 3c4013e7c15..be6bffa001c 100644
--- a/usr.bin/openssl/pkey.c
+++ b/usr.bin/openssl/pkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkey.c,v 1.3 2014/08/28 14:25:48 jsing Exp $ */
+/* $OpenBSD: pkey.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006
*/
@@ -65,8 +65,6 @@
#include <openssl/evp.h>
#include <openssl/pem.h>
-int pkey_main(int, char **);
-
int
pkey_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/pkeyparam.c b/usr.bin/openssl/pkeyparam.c
index b4369298a88..e5152dfbf96 100644
--- a/usr.bin/openssl/pkeyparam.c
+++ b/usr.bin/openssl/pkeyparam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkeyparam.c,v 1.5 2015/04/11 15:41:57 jsing Exp $ */
+/* $OpenBSD: pkeyparam.c,v 1.6 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006
*/
@@ -123,8 +123,6 @@ pkeyparam_usage()
options_usage(pkeyparam_options);
}
-int pkeyparam_main(int, char **);
-
int
pkeyparam_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/pkeyutl.c b/usr.bin/openssl/pkeyutl.c
index 949f1538ef5..0529b977985 100644
--- a/usr.bin/openssl/pkeyutl.c
+++ b/usr.bin/openssl/pkeyutl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkeyutl.c,v 1.5 2015/07/15 06:16:42 bcook Exp $ */
+/* $OpenBSD: pkeyutl.c,v 1.6 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -81,8 +81,6 @@ static int do_keyop(EVP_PKEY_CTX * ctx, int pkey_op,
unsigned char *out, size_t * poutlen,
unsigned char *in, size_t inlen);
-int pkeyutl_main(int argc, char **);
-
int
pkeyutl_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/prime.c b/usr.bin/openssl/prime.c
index c597110d543..673abc24055 100644
--- a/usr.bin/openssl/prime.c
+++ b/usr.bin/openssl/prime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prime.c,v 1.6 2015/02/11 03:19:37 doug Exp $ */
+/* $OpenBSD: prime.c,v 1.7 2015/08/22 16:36:05 jsing Exp $ */
/* ====================================================================
* Copyright (c) 2004 The OpenSSL Project. All rights reserved.
*
@@ -109,8 +109,6 @@ prime_usage()
options_usage(prime_options);
}
-int prime_main(int, char **);
-
int
prime_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/progs.h b/usr.bin/openssl/progs.h
index 1f2cfb0ba41..c1b0c62752a 100644
--- a/usr.bin/openssl/progs.h
+++ b/usr.bin/openssl/progs.h
@@ -1,63 +1,49 @@
-/* $OpenBSD: progs.h,v 1.5 2015/08/19 18:25:31 deraadt Exp $ */
+/* $OpenBSD: progs.h,v 1.6 2015/08/22 16:36:05 jsing Exp $ */
/* Public domain */
-extern int asn1parse_main(int argc, char *argv[]);
-extern int ca_main(int argc, char *argv[]);
-extern int certhash_main(int argc, char *argv[]);
-extern int ciphers_main(int argc, char *argv[]);
-extern int cms_main(int argc, char *argv[]);
-extern int crl2pkcs7_main(int argc, char *argv[]);
-extern int crl_main(int argc, char *argv[]);
-extern int dgst_main(int argc, char *argv[]);
-extern int dh_main(int argc, char *argv[]);
-extern int dhparam_main(int argc, char *argv[]);
-extern int dsa_main(int argc, char *argv[]);
-extern int dsaparam_main(int argc, char *argv[]);
-extern int ec_main(int argc, char *argv[]);
-extern int ecparam_main(int argc, char *argv[]);
-extern int enc_main(int argc, char *argv[]);
-extern int engine_main(int argc, char *argv[]);
-extern int errstr_main(int argc, char *argv[]);
-extern int gendh_main(int argc, char *argv[]);
-extern int gendsa_main(int argc, char *argv[]);
-extern int genpkey_main(int argc, char *argv[]);
-extern int genrsa_main(int argc, char *argv[]);
-extern int nseq_main(int argc, char *argv[]);
-extern int ocsp_main(int argc, char *argv[]);
-extern int passwd_main(int argc, char *argv[]);
-extern int pkcs7_main(int argc, char *argv[]);
-extern int pkcs8_main(int argc, char *argv[]);
-extern int pkcs12_main(int argc, char *argv[]);
-extern int pkey_main(int argc, char *argv[]);
-extern int pkeyparam_main(int argc, char *argv[]);
-extern int pkeyutl_main(int argc, char *argv[]);
-extern int prime_main(int argc, char *argv[]);
-extern int rand_main(int argc, char *argv[]);
-extern int req_main(int argc, char *argv[]);
-extern int rsa_main(int argc, char *argv[]);
-extern int rsautl_main(int argc, char *argv[]);
-extern int s_client_main(int argc, char *argv[]);
-extern int s_server_main(int argc, char *argv[]);
-extern int s_time_main(int argc, char *argv[]);
-extern int sess_id_main(int argc, char *argv[]);
-extern int smime_main(int argc, char *argv[]);
-extern int speed_main(int argc, char *argv[]);
-extern int spkac_main(int argc, char *argv[]);
-extern int ts_main(int argc, char *argv[]);
-extern int verify_main(int argc, char *argv[]);
-extern int version_main(int argc, char *argv[]);
-extern int x509_main(int argc, char *argv[]);
-
-#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);
+int asn1parse_main(int argc, char **argv);
+int ca_main(int argc, char **argv);
+int certhash_main(int argc, char **argv);
+int ciphers_main(int argc, char **argv);
+int cms_main(int argc, char **argv);
+int crl2pkcs7_main(int argc, char **argv);
+int crl_main(int argc, char **argv);
+int dgst_main(int argc, char **argv);
+int dh_main(int argc, char **argv);
+int dhparam_main(int argc, char **argv);
+int dsa_main(int argc, char **argv);
+int dsaparam_main(int argc, char **argv);
+int ec_main(int argc, char **argv);
+int ecparam_main(int argc, char **argv);
+int enc_main(int argc, char **argv);
+int engine_main(int argc, char **argv);
+int errstr_main(int argc, char **argv);
+int gendh_main(int argc, char **argv);
+int gendsa_main(int argc, char **argv);
+int genpkey_main(int argc, char **argv);
+int genrsa_main(int argc, char **argv);
+int nseq_main(int argc, char **argv);
+int ocsp_main(int argc, char **argv);
+int passwd_main(int argc, char **argv);
+int pkcs7_main(int argc, char **argv);
+int pkcs8_main(int argc, char **argv);
+int pkcs12_main(int argc, char **argv);
+int pkey_main(int argc, char **argv);
+int pkeyparam_main(int argc, char **argv);
+int pkeyutl_main(int argc, char **argv);
+int prime_main(int argc, char **argv);
+int rand_main(int argc, char **argv);
+int req_main(int argc, char **argv);
+int rsa_main(int argc, char **argv);
+int rsautl_main(int argc, char **argv);
+int s_client_main(int argc, char **argv);
+int s_server_main(int argc, char **argv);
+int s_time_main(int argc, char **argv);
+int sess_id_main(int argc, char **argv);
+int smime_main(int argc, char **argv);
+int speed_main(int argc, char **argv);
+int spkac_main(int argc, char **argv);
+int ts_main(int argc, char **argv);
+int verify_main(int argc, char **argv);
+int version_main(int argc, char **argv);
+int x509_main(int argc, char **argv);
diff --git a/usr.bin/openssl/rand.c b/usr.bin/openssl/rand.c
index eccf4dee866..b021b4ec7c6 100644
--- a/usr.bin/openssl/rand.c
+++ b/usr.bin/openssl/rand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rand.c,v 1.6 2014/12/28 15:48:52 jsing Exp $ */
+/* $OpenBSD: rand.c,v 1.7 2015/08/22 16:36:05 jsing Exp $ */
/* ====================================================================
* Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
*
@@ -109,8 +109,6 @@ rand_usage()
options_usage(rand_options);
}
-int rand_main(int, char **);
-
int
rand_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/req.c b/usr.bin/openssl/req.c
index 93742971ff9..4e1a4757dda 100644
--- a/usr.bin/openssl/req.c
+++ b/usr.bin/openssl/req.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: req.c,v 1.5 2015/06/20 01:07:25 doug Exp $ */
+/* $OpenBSD: req.c,v 1.6 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -145,8 +145,6 @@ static EVP_PKEY_CTX *set_keygen_ctx(BIO * err, const char *gstr, int *pkey_type,
static CONF *req_conf = NULL;
static int batch = 0;
-int req_main(int, char **);
-
int
req_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/rsautl.c b/usr.bin/openssl/rsautl.c
index d8e56a732d6..5f395e2245f 100644
--- a/usr.bin/openssl/rsautl.c
+++ b/usr.bin/openssl/rsautl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsautl.c,v 1.5 2015/07/19 03:14:09 doug Exp $ */
+/* $OpenBSD: rsautl.c,v 1.6 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -78,8 +78,6 @@
static void usage(void);
-int rsautl_main(int argc, char **);
-
int
rsautl_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/s_client.c b/usr.bin/openssl/s_client.c
index aa803e8baa7..dcda13f46c5 100644
--- a/usr.bin/openssl/s_client.c
+++ b/usr.bin/openssl/s_client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_client.c,v 1.15 2015/08/11 05:01:03 landry Exp $ */
+/* $OpenBSD: s_client.c,v 1.16 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -321,8 +321,6 @@ enum {
PROTO_XMPP
};
-int s_client_main(int, char **);
-
int
s_client_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/s_server.c b/usr.bin/openssl/s_server.c
index 317b1a849f0..2ac8c06c1ee 100644
--- a/usr.bin/openssl/s_server.c
+++ b/usr.bin/openssl/s_server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_server.c,v 1.14 2015/07/20 18:31:01 doug Exp $ */
+/* $OpenBSD: s_server.c,v 1.15 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -577,8 +577,6 @@ alpn_cb(SSL *s, const unsigned char **out, unsigned char *outlen,
return (SSL_TLSEXT_ERR_OK);
}
-int s_server_main(int, char **);
-
#ifndef OPENSSL_NO_SRTP
static char *srtp_profiles = NULL;
#endif
diff --git a/usr.bin/openssl/s_time.c b/usr.bin/openssl/s_time.c
index 6784bae8e90..87a0a203825 100644
--- a/usr.bin/openssl/s_time.c
+++ b/usr.bin/openssl/s_time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_time.c,v 1.8 2015/07/17 16:10:49 doug Exp $ */
+/* $OpenBSD: s_time.c,v 1.9 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -242,8 +242,6 @@ tm_Time_F(int s)
* MAIN - main processing area for client
* real name depends on MONOLITH
*/
-int s_time_main(int, char **);
-
int
s_time_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/smime.c b/usr.bin/openssl/smime.c
index 8b76ea9e780..e1c54bf2251 100644
--- a/usr.bin/openssl/smime.c
+++ b/usr.bin/openssl/smime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smime.c,v 1.2 2015/02/08 10:22:45 doug Exp $ */
+/* $OpenBSD: smime.c,v 1.3 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
@@ -82,8 +82,6 @@ static int smime_cb(int ok, X509_STORE_CTX * ctx);
#define SMIME_PK7OUT (5 | SMIME_IP | SMIME_OP)
#define SMIME_RESIGN (6 | SMIME_IP | SMIME_OP | SMIME_SIGNERS)
-int smime_main(int, char **);
-
int
smime_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/speed.c b/usr.bin/openssl/speed.c
index d637eecd49f..4248c09d8ec 100644
--- a/usr.bin/openssl/speed.c
+++ b/usr.bin/openssl/speed.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: speed.c,v 1.8 2015/07/20 21:55:13 doug Exp $ */
+/* $OpenBSD: speed.c,v 1.9 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -225,9 +225,6 @@ KDF1_SHA1(const void *in, size_t inlen, void *out, size_t * outlen)
#endif /* OPENSSL_NO_SHA */
}
-
-int speed_main(int, char **);
-
int
speed_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/ts.c b/usr.bin/openssl/ts.c
index 341d9395c76..ae7dfff6151 100644
--- a/usr.bin/openssl/ts.c
+++ b/usr.bin/openssl/ts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ts.c,v 1.4 2015/06/20 01:07:25 doug Exp $ */
+/* $OpenBSD: ts.c,v 1.5 2015/08/22 16:36:05 jsing Exp $ */
/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
* project 2002.
*/
@@ -116,9 +116,6 @@ static TS_VERIFY_CTX *create_verify_ctx(char *data, char *digest,
static X509_STORE *create_cert_store(char *ca_path, char *ca_file);
static int verify_cb(int ok, X509_STORE_CTX * ctx);
-/* Main function definition. */
-int ts_main(int, char **);
-
int
ts_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/verify.c b/usr.bin/openssl/verify.c
index 689ee8e01ff..ec27275d794 100644
--- a/usr.bin/openssl/verify.c
+++ b/usr.bin/openssl/verify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: verify.c,v 1.2 2014/08/28 14:23:52 jsing Exp $ */
+/* $OpenBSD: verify.c,v 1.3 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -73,8 +73,6 @@ static int check(X509_STORE * ctx, char *file, STACK_OF(X509) * uchain,
STACK_OF(X509) * tchain, STACK_OF(X509_CRL) * crls, ENGINE * e);
static int v_verbose = 0, vflags = 0;
-int verify_main(int, char **);
-
int
verify_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/version.c b/usr.bin/openssl/version.c
index 2e28fa4345b..f47369df9d8 100644
--- a/usr.bin/openssl/version.c
+++ b/usr.bin/openssl/version.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: version.c,v 1.5 2014/12/28 15:48:52 jsing Exp $ */
+/* $OpenBSD: version.c,v 1.6 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -210,8 +210,6 @@ version_usage(void)
options_usage(version_options);
}
-int version_main(int, char **);
-
int
version_main(int argc, char **argv)
{
diff --git a/usr.bin/openssl/x509.c b/usr.bin/openssl/x509.c
index 4bf976ce55f..0e5594372ba 100644
--- a/usr.bin/openssl/x509.c
+++ b/usr.bin/openssl/x509.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.c,v 1.4 2015/07/19 03:18:10 doug Exp $ */
+/* $OpenBSD: x509.c,v 1.5 2015/08/22 16:36:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -157,8 +157,6 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt);
static int reqfile = 0;
-int x509_main(int, char **);
-
int
x509_main(int argc, char **argv)
{