summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2014-05-18 16:21:03 +0000
committerjsing <>2014-05-18 16:21:03 +0000
commit95aa5e583c099c234cb14b4a60d33916165326e2 (patch)
tree9a9175eb556806a76a897be5171c14497d88df98 /src/lib
parenta3380d29afacb8edd0e4e1eee12cb9156fa40cf8 (diff)
downloadopenbsd-95aa5e583c099c234cb14b4a60d33916165326e2.tar.gz
openbsd-95aa5e583c099c234cb14b4a60d33916165326e2.tar.bz2
openbsd-95aa5e583c099c234cb14b4a60d33916165326e2.zip
Group and sort includes.
Currently "apps.h" needs to be included before any of the openssl headers and there are several cases where the code depends on headers that are included by something included by apps.h... More untangling saved for later on.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/src/apps/apps.c22
-rw-r--r--src/lib/libssl/src/apps/apps.h14
-rw-r--r--src/lib/libssl/src/apps/asn1pars.c5
-rw-r--r--src/lib/libssl/src/apps/ca.c29
-rw-r--r--src/lib/libssl/src/apps/ciphers.c3
-rw-r--r--src/lib/libssl/src/apps/cms.c5
-rw-r--r--src/lib/libssl/src/apps/crl.c5
-rw-r--r--src/lib/libssl/src/apps/crl2p7.c11
-rw-r--r--src/lib/libssl/src/apps/dgst.c9
-rw-r--r--src/lib/libssl/src/apps/dh.c13
-rw-r--r--src/lib/libssl/src/apps/dhparam.c13
-rw-r--r--src/lib/libssl/src/apps/dsa.c15
-rw-r--r--src/lib/libssl/src/apps/dsaparam.c13
-rw-r--r--src/lib/libssl/src/apps/ec.c5
-rw-r--r--src/lib/libssl/src/apps/ecparam.c11
-rw-r--r--src/lib/libssl/src/apps/enc.c10
-rw-r--r--src/lib/libssl/src/apps/engine.c6
-rw-r--r--src/lib/libssl/src/apps/errstr.c5
-rw-r--r--src/lib/libssl/src/apps/gendh.c15
-rw-r--r--src/lib/libssl/src/apps/gendsa.c15
-rw-r--r--src/lib/libssl/src/apps/genpkey.c6
-rw-r--r--src/lib/libssl/src/apps/genrsa.c15
-rw-r--r--src/lib/libssl/src/apps/nseq.c5
-rw-r--r--src/lib/libssl/src/apps/ocsp.c12
-rw-r--r--src/lib/libssl/src/apps/openssl.c12
-rw-r--r--src/lib/libssl/src/apps/passwd.c5
-rw-r--r--src/lib/libssl/src/apps/pkcs12.c5
-rw-r--r--src/lib/libssl/src/apps/pkcs7.c9
-rw-r--r--src/lib/libssl/src/apps/pkcs8.c6
-rw-r--r--src/lib/libssl/src/apps/pkey.c6
-rw-r--r--src/lib/libssl/src/apps/pkeyparam.c6
-rw-r--r--src/lib/libssl/src/apps/pkeyutl.c7
-rw-r--r--src/lib/libssl/src/apps/prime.c3
-rw-r--r--src/lib/libssl/src/apps/rand.c5
-rw-r--r--src/lib/libssl/src/apps/req.c22
-rw-r--r--src/lib/libssl/src/apps/rsa.c11
-rw-r--r--src/lib/libssl/src/apps/rsautl.c7
-rw-r--r--src/lib/libssl/src/apps/s_cb.c12
-rw-r--r--src/lib/libssl/src/apps/s_client.c22
-rw-r--r--src/lib/libssl/src/apps/s_server.c21
-rw-r--r--src/lib/libssl/src/apps/s_socket.c20
-rw-r--r--src/lib/libssl/src/apps/s_time.c14
-rw-r--r--src/lib/libssl/src/apps/sess_id.c5
-rw-r--r--src/lib/libssl/src/apps/smime.c4
-rw-r--r--src/lib/libssl/src/apps/speed.c6
-rw-r--r--src/lib/libssl/src/apps/spkac.c6
-rw-r--r--src/lib/libssl/src/apps/ts.c5
-rw-r--r--src/lib/libssl/src/apps/verify.c5
-rw-r--r--src/lib/libssl/src/apps/version.c19
-rw-r--r--src/lib/libssl/src/apps/x509.c17
50 files changed, 308 insertions, 214 deletions
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c
index a96de0cd9a..7f019564c1 100644
--- a/src/lib/libssl/src/apps/apps.c
+++ b/src/lib/libssl/src/apps/apps.c
@@ -111,32 +111,34 @@
111 111
112#include <sys/types.h> 112#include <sys/types.h>
113#include <sys/stat.h> 113#include <sys/stat.h>
114
115#include <assert.h>
116#include <ctype.h>
117#include <errno.h>
114#include <stdio.h> 118#include <stdio.h>
115#include <stdlib.h> 119#include <stdlib.h>
116#include <string.h> 120#include <string.h>
117#include <strings.h> 121#include <strings.h>
118#include <ctype.h>
119#include <errno.h>
120#include <assert.h>
121#include <unistd.h> 122#include <unistd.h>
122 123
124#include "apps.h"
125
126#include <openssl/bn.h>
123#include <openssl/err.h> 127#include <openssl/err.h>
124#include <openssl/x509.h>
125#include <openssl/x509v3.h>
126#include <openssl/pem.h> 128#include <openssl/pem.h>
127#include <openssl/pkcs12.h> 129#include <openssl/pkcs12.h>
128#include <openssl/ui.h>
129#include <openssl/safestack.h> 130#include <openssl/safestack.h>
131#include <openssl/ui.h>
132#include <openssl/x509.h>
133#include <openssl/x509v3.h>
134
130#ifndef OPENSSL_NO_ENGINE 135#ifndef OPENSSL_NO_ENGINE
131#include <openssl/engine.h> 136#include <openssl/engine.h>
132#endif 137#endif
138
133#ifndef OPENSSL_NO_RSA 139#ifndef OPENSSL_NO_RSA
134#include <openssl/rsa.h> 140#include <openssl/rsa.h>
135#endif 141#endif
136#include <openssl/bn.h>
137
138#include "apps.h"
139
140 142
141typedef struct { 143typedef struct {
142 const char *name; 144 const char *name;
diff --git a/src/lib/libssl/src/apps/apps.h b/src/lib/libssl/src/apps/apps.h
index cbbf0eaefd..31b2c8d18f 100644
--- a/src/lib/libssl/src/apps/apps.h
+++ b/src/lib/libssl/src/apps/apps.h
@@ -112,26 +112,28 @@
112#ifndef HEADER_APPS_H 112#ifndef HEADER_APPS_H
113#define HEADER_APPS_H 113#define HEADER_APPS_H
114 114
115#include <openssl/e_os2.h> 115#include <signal.h>
116
116#include <openssl/bio.h> 117#include <openssl/bio.h>
117#include <openssl/x509.h>
118#include <openssl/lhash.h>
119#include <openssl/conf.h> 118#include <openssl/conf.h>
119#include <openssl/e_os2.h>
120#include <openssl/lhash.h>
121#include <openssl/ossl_typ.h>
120#include <openssl/txt_db.h> 122#include <openssl/txt_db.h>
123#include <openssl/x509.h>
124
121#ifndef OPENSSL_NO_ENGINE 125#ifndef OPENSSL_NO_ENGINE
122#include <openssl/engine.h> 126#include <openssl/engine.h>
123#endif 127#endif
128
124#ifndef OPENSSL_NO_OCSP 129#ifndef OPENSSL_NO_OCSP
125#include <openssl/ocsp.h> 130#include <openssl/ocsp.h>
126#endif 131#endif
127#include <openssl/ossl_typ.h>
128 132
129extern CONF *config; 133extern CONF *config;
130extern char *default_config_file; 134extern char *default_config_file;
131extern BIO *bio_err; 135extern BIO *bio_err;
132 136
133#include <signal.h>
134
135typedef struct args_st { 137typedef struct args_st {
136 char **data; 138 char **data;
137 int count; 139 int count;
diff --git a/src/lib/libssl/src/apps/asn1pars.c b/src/lib/libssl/src/apps/asn1pars.c
index a8af0aa4e9..2d56487669 100644
--- a/src/lib/libssl/src/apps/asn1pars.c
+++ b/src/lib/libssl/src/apps/asn1pars.c
@@ -63,11 +63,13 @@
63#include <stdio.h> 63#include <stdio.h>
64#include <stdlib.h> 64#include <stdlib.h>
65#include <string.h> 65#include <string.h>
66
66#include "apps.h" 67#include "apps.h"
68
67#include <openssl/err.h> 69#include <openssl/err.h>
68#include <openssl/evp.h> 70#include <openssl/evp.h>
69#include <openssl/x509.h>
70#include <openssl/pem.h> 71#include <openssl/pem.h>
72#include <openssl/x509.h>
71 73
72/* -inform arg - input format - default PEM (DER or PEM) 74/* -inform arg - input format - default PEM (DER or PEM)
73 * -in arg - input file - default stdin 75 * -in arg - input file - default stdin
@@ -77,7 +79,6 @@
77 * -oid file - extra oid description file 79 * -oid file - extra oid description file
78 */ 80 */
79 81
80
81int asn1parse_main(int, char **); 82int asn1parse_main(int, char **);
82 83
83static int do_generate(BIO * bio, char *genstr, char *genconf, BUF_MEM * buf); 84static int do_generate(BIO * bio, char *genstr, char *genconf, BUF_MEM * buf);
diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c
index c771598802..23c1318699 100644
--- a/src/lib/libssl/src/apps/ca.c
+++ b/src/lib/libssl/src/apps/ca.c
@@ -58,29 +58,31 @@
58 58
59/* The PPKI stuff has been donated by Jeff Barber <jeffb@issl.atl.hp.com> */ 59/* The PPKI stuff has been donated by Jeff Barber <jeffb@issl.atl.hp.com> */
60 60
61#include <sys/types.h>
62
63#ifndef W_OK
64#include <sys/file.h>
65#endif
66
67#include <ctype.h>
61#include <stdio.h> 68#include <stdio.h>
62#include <stdlib.h> 69#include <stdlib.h>
63#include <string.h> 70#include <string.h>
64#include <ctype.h>
65#include <unistd.h> 71#include <unistd.h>
66#include <sys/types.h> 72
67#include <openssl/conf.h> 73#include "apps.h"
74
68#include <openssl/bio.h> 75#include <openssl/bio.h>
69#include <openssl/err.h>
70#include <openssl/bn.h> 76#include <openssl/bn.h>
71#include <openssl/txt_db.h> 77#include <openssl/conf.h>
78#include <openssl/err.h>
72#include <openssl/evp.h> 79#include <openssl/evp.h>
73#include <openssl/x509.h>
74#include <openssl/x509v3.h>
75#include <openssl/objects.h> 80#include <openssl/objects.h>
76#include <openssl/ocsp.h> 81#include <openssl/ocsp.h>
77#include <openssl/pem.h> 82#include <openssl/pem.h>
78 83#include <openssl/txt_db.h>
79#ifndef W_OK 84#include <openssl/x509.h>
80#include <sys/file.h> 85#include <openssl/x509v3.h>
81#endif
82
83#include "apps.h"
84 86
85#ifndef W_OK 87#ifndef W_OK
86#define F_OK 0 88#define F_OK 0
@@ -89,7 +91,6 @@
89#define R_OK 4 91#define R_OK 4
90#endif 92#endif
91 93
92
93#define BASE_SECTION "ca" 94#define BASE_SECTION "ca"
94 95
95#define ENV_DEFAULT_CA "default_ca" 96#define ENV_DEFAULT_CA "default_ca"
diff --git a/src/lib/libssl/src/apps/ciphers.c b/src/lib/libssl/src/apps/ciphers.c
index 70d9a89409..0e3b8277da 100644
--- a/src/lib/libssl/src/apps/ciphers.c
+++ b/src/lib/libssl/src/apps/ciphers.c
@@ -59,11 +59,12 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62
62#include "apps.h" 63#include "apps.h"
64
63#include <openssl/err.h> 65#include <openssl/err.h>
64#include <openssl/ssl.h> 66#include <openssl/ssl.h>
65 67
66
67static const char *ciphers_usage[] = { 68static const char *ciphers_usage[] = {
68 "usage: ciphers args\n", 69 "usage: ciphers args\n",
69 " -v - verbose mode, a textual listing of the SSL/TLS ciphers in OpenSSL\n", 70 " -v - verbose mode, a textual listing of the SSL/TLS ciphers in OpenSSL\n",
diff --git a/src/lib/libssl/src/apps/cms.c b/src/lib/libssl/src/apps/cms.c
index fa1bd9a3a2..01b4a2a262 100644
--- a/src/lib/libssl/src/apps/cms.c
+++ b/src/lib/libssl/src/apps/cms.c
@@ -55,16 +55,17 @@
55 55
56#include <stdio.h> 56#include <stdio.h>
57#include <string.h> 57#include <string.h>
58
58#include "apps.h" 59#include "apps.h"
59 60
60#ifndef OPENSSL_NO_CMS 61#ifndef OPENSSL_NO_CMS
61 62
63#include <openssl/cms.h>
62#include <openssl/crypto.h> 64#include <openssl/crypto.h>
63#include <openssl/pem.h>
64#include <openssl/err.h> 65#include <openssl/err.h>
66#include <openssl/pem.h>
65#include <openssl/x509_vfy.h> 67#include <openssl/x509_vfy.h>
66#include <openssl/x509v3.h> 68#include <openssl/x509v3.h>
67#include <openssl/cms.h>
68 69
69static int save_certs(char *signerfile, STACK_OF(X509) * signers); 70static int save_certs(char *signerfile, STACK_OF(X509) * signers);
70static int cms_cb(int ok, X509_STORE_CTX * ctx); 71static int cms_cb(int ok, X509_STORE_CTX * ctx);
diff --git a/src/lib/libssl/src/apps/crl.c b/src/lib/libssl/src/apps/crl.c
index 50ac0e118d..0d17ba9153 100644
--- a/src/lib/libssl/src/apps/crl.c
+++ b/src/lib/libssl/src/apps/crl.c
@@ -59,13 +59,14 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62
62#include "apps.h" 63#include "apps.h"
64
63#include <openssl/bio.h> 65#include <openssl/bio.h>
64#include <openssl/err.h> 66#include <openssl/err.h>
67#include <openssl/pem.h>
65#include <openssl/x509.h> 68#include <openssl/x509.h>
66#include <openssl/x509v3.h> 69#include <openssl/x509v3.h>
67#include <openssl/pem.h>
68
69 70
70#define POSTFIX ".rvk" 71#define POSTFIX ".rvk"
71 72
diff --git a/src/lib/libssl/src/apps/crl2p7.c b/src/lib/libssl/src/apps/crl2p7.c
index f972a394d6..9d3552ab88 100644
--- a/src/lib/libssl/src/apps/crl2p7.c
+++ b/src/lib/libssl/src/apps/crl2p7.c
@@ -60,16 +60,19 @@
60 * and donated 'to the cause' along with lots and lots of other fixes to 60 * and donated 'to the cause' along with lots and lots of other fixes to
61 * the library. */ 61 * the library. */
62 62
63#include <sys/types.h>
64
63#include <stdio.h> 65#include <stdio.h>
64#include <string.h> 66#include <string.h>
65#include <sys/types.h> 67
66#include "apps.h" 68#include "apps.h"
69
67#include <openssl/err.h> 70#include <openssl/err.h>
68#include <openssl/evp.h> 71#include <openssl/evp.h>
69#include <openssl/x509.h>
70#include <openssl/pkcs7.h>
71#include <openssl/pem.h>
72#include <openssl/objects.h> 72#include <openssl/objects.h>
73#include <openssl/pem.h>
74#include <openssl/pkcs7.h>
75#include <openssl/x509.h>
73 76
74static int add_certs_from_file(STACK_OF(X509) * stack, char *certfile); 77static int add_certs_from_file(STACK_OF(X509) * stack, char *certfile);
75 78
diff --git a/src/lib/libssl/src/apps/dgst.c b/src/lib/libssl/src/apps/dgst.c
index f2c228cc3d..c1832297b2 100644
--- a/src/lib/libssl/src/apps/dgst.c
+++ b/src/lib/libssl/src/apps/dgst.c
@@ -57,20 +57,21 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h>
61#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h>
62
62#include "apps.h" 63#include "apps.h"
64
63#include <openssl/bio.h> 65#include <openssl/bio.h>
64#include <openssl/err.h> 66#include <openssl/err.h>
65#include <openssl/evp.h> 67#include <openssl/evp.h>
68#include <openssl/hmac.h>
66#include <openssl/objects.h> 69#include <openssl/objects.h>
67#include <openssl/x509.h>
68#include <openssl/pem.h> 70#include <openssl/pem.h>
69#include <openssl/hmac.h> 71#include <openssl/x509.h>
70 72
71#define BUFSIZE 1024*8 73#define BUFSIZE 1024*8
72 74
73
74int 75int
75do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout, 76do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout,
76 EVP_PKEY * key, unsigned char *sigin, int siglen, 77 EVP_PKEY * key, unsigned char *sigin, int siglen,
diff --git a/src/lib/libssl/src/apps/dh.c b/src/lib/libssl/src/apps/dh.c
index 7e5e142760..e7e6e1d874 100644
--- a/src/lib/libssl/src/apps/dh.c
+++ b/src/lib/libssl/src/apps/dh.c
@@ -57,20 +57,23 @@
57 * [including the GNU Public Licence.] 57 * [including the GNU Public Licence.]
58 */ 58 */
59 59
60#include <openssl/opensslconf.h>/* for OPENSSL_NO_DH */ 60#include <openssl/opensslconf.h> /* for OPENSSL_NO_DH */
61
61#ifndef OPENSSL_NO_DH 62#ifndef OPENSSL_NO_DH
63
62#include <stdio.h> 64#include <stdio.h>
63#include <stdlib.h> 65#include <stdlib.h>
64#include <time.h>
65#include <string.h> 66#include <string.h>
67#include <time.h>
68
66#include "apps.h" 69#include "apps.h"
70
67#include <openssl/bio.h> 71#include <openssl/bio.h>
68#include <openssl/err.h>
69#include <openssl/bn.h> 72#include <openssl/bn.h>
73#include <openssl/err.h>
70#include <openssl/dh.h> 74#include <openssl/dh.h>
71#include <openssl/x509.h>
72#include <openssl/pem.h> 75#include <openssl/pem.h>
73 76#include <openssl/x509.h>
74 77
75/* -inform arg - input format - default PEM (DER or PEM) 78/* -inform arg - input format - default PEM (DER or PEM)
76 * -outform arg - output format - default PEM 79 * -outform arg - output format - default PEM
diff --git a/src/lib/libssl/src/apps/dhparam.c b/src/lib/libssl/src/apps/dhparam.c
index 0cb99c5340..3973ad0586 100644
--- a/src/lib/libssl/src/apps/dhparam.c
+++ b/src/lib/libssl/src/apps/dhparam.c
@@ -109,25 +109,28 @@
109 * 109 *
110 */ 110 */
111 111
112#include <openssl/opensslconf.h>/* for OPENSSL_NO_DH */ 112#include <openssl/opensslconf.h> /* for OPENSSL_NO_DH */
113
113#ifndef OPENSSL_NO_DH 114#ifndef OPENSSL_NO_DH
115
114#include <stdio.h> 116#include <stdio.h>
115#include <stdlib.h> 117#include <stdlib.h>
116#include <time.h>
117#include <string.h> 118#include <string.h>
119#include <time.h>
120
118#include "apps.h" 121#include "apps.h"
122
119#include <openssl/bio.h> 123#include <openssl/bio.h>
120#include <openssl/err.h>
121#include <openssl/bn.h> 124#include <openssl/bn.h>
125#include <openssl/err.h>
122#include <openssl/dh.h> 126#include <openssl/dh.h>
123#include <openssl/x509.h>
124#include <openssl/pem.h> 127#include <openssl/pem.h>
128#include <openssl/x509.h>
125 129
126#ifndef OPENSSL_NO_DSA 130#ifndef OPENSSL_NO_DSA
127#include <openssl/dsa.h> 131#include <openssl/dsa.h>
128#endif 132#endif
129 133
130
131#define DEFBITS 512 134#define DEFBITS 512
132 135
133/* -inform arg - input format - default PEM (DER or PEM) 136/* -inform arg - input format - default PEM (DER or PEM)
diff --git a/src/lib/libssl/src/apps/dsa.c b/src/lib/libssl/src/apps/dsa.c
index 81040193c7..4026ba5d22 100644
--- a/src/lib/libssl/src/apps/dsa.c
+++ b/src/lib/libssl/src/apps/dsa.c
@@ -56,21 +56,24 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>/* for OPENSSL_NO_DSA */ 59#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */
60
60#ifndef OPENSSL_NO_DSA 61#ifndef OPENSSL_NO_DSA
62
61#include <stdio.h> 63#include <stdio.h>
62#include <stdlib.h> 64#include <stdlib.h>
63#include <string.h>
64#include <time.h> 65#include <time.h>
66#include <string.h>
67
65#include "apps.h" 68#include "apps.h"
69
66#include <openssl/bio.h> 70#include <openssl/bio.h>
67#include <openssl/err.h> 71#include <openssl/bn.h>
68#include <openssl/dsa.h> 72#include <openssl/dsa.h>
73#include <openssl/err.h>
69#include <openssl/evp.h> 74#include <openssl/evp.h>
70#include <openssl/x509.h>
71#include <openssl/pem.h> 75#include <openssl/pem.h>
72#include <openssl/bn.h> 76#include <openssl/x509.h>
73
74 77
75/* -inform arg - input format - default PEM (one of DER, NET or PEM) 78/* -inform arg - input format - default PEM (one of DER, NET or PEM)
76 * -outform arg - output format - default PEM 79 * -outform arg - output format - default PEM
diff --git a/src/lib/libssl/src/apps/dsaparam.c b/src/lib/libssl/src/apps/dsaparam.c
index 6488c4b69d..75ffa60e1e 100644
--- a/src/lib/libssl/src/apps/dsaparam.c
+++ b/src/lib/libssl/src/apps/dsaparam.c
@@ -56,7 +56,8 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>/* for OPENSSL_NO_DSA */ 59#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */
60
60/* Until the key-gen callbacks are modified to use newer prototypes, we allow 61/* Until the key-gen callbacks are modified to use newer prototypes, we allow
61 * deprecated functions for openssl-internal code */ 62 * deprecated functions for openssl-internal code */
62#ifdef OPENSSL_NO_DEPRECATED 63#ifdef OPENSSL_NO_DEPRECATED
@@ -64,19 +65,21 @@
64#endif 65#endif
65 66
66#ifndef OPENSSL_NO_DSA 67#ifndef OPENSSL_NO_DSA
68
67#include <assert.h> 69#include <assert.h>
68#include <stdio.h> 70#include <stdio.h>
69#include <stdlib.h> 71#include <stdlib.h>
70#include <time.h>
71#include <string.h> 72#include <string.h>
73#include <time.h>
74
72#include "apps.h" 75#include "apps.h"
76
73#include <openssl/bio.h> 77#include <openssl/bio.h>
74#include <openssl/err.h>
75#include <openssl/bn.h> 78#include <openssl/bn.h>
79#include <openssl/err.h>
76#include <openssl/dsa.h> 80#include <openssl/dsa.h>
77#include <openssl/x509.h>
78#include <openssl/pem.h> 81#include <openssl/pem.h>
79 82#include <openssl/x509.h>
80 83
81/* -inform arg - input format - default PEM (DER or PEM) 84/* -inform arg - input format - default PEM (DER or PEM)
82 * -outform arg - output format - default PEM 85 * -outform arg - output format - default PEM
diff --git a/src/lib/libssl/src/apps/ec.c b/src/lib/libssl/src/apps/ec.c
index 3f4a1d0045..6bd71c333a 100644
--- a/src/lib/libssl/src/apps/ec.c
+++ b/src/lib/libssl/src/apps/ec.c
@@ -57,17 +57,20 @@
57 */ 57 */
58 58
59#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
60#ifndef OPENSSL_NO_EC 61#ifndef OPENSSL_NO_EC
62
61#include <stdio.h> 63#include <stdio.h>
62#include <stdlib.h> 64#include <stdlib.h>
63#include <string.h> 65#include <string.h>
66
64#include "apps.h" 67#include "apps.h"
68
65#include <openssl/bio.h> 69#include <openssl/bio.h>
66#include <openssl/err.h> 70#include <openssl/err.h>
67#include <openssl/evp.h> 71#include <openssl/evp.h>
68#include <openssl/pem.h> 72#include <openssl/pem.h>
69 73
70
71/* -inform arg - input format - default PEM (one of DER, NET or PEM) 74/* -inform arg - input format - default PEM (one of DER, NET or PEM)
72 * -outform arg - output format - default PEM 75 * -outform arg - output format - default PEM
73 * -in arg - input file - default stdin 76 * -in arg - input file - default stdin
diff --git a/src/lib/libssl/src/apps/ecparam.c b/src/lib/libssl/src/apps/ecparam.c
index 84ecba72f5..9d517eaf43 100644
--- a/src/lib/libssl/src/apps/ecparam.c
+++ b/src/lib/libssl/src/apps/ecparam.c
@@ -70,20 +70,23 @@
70 */ 70 */
71 71
72#include <openssl/opensslconf.h> 72#include <openssl/opensslconf.h>
73
73#ifndef OPENSSL_NO_EC 74#ifndef OPENSSL_NO_EC
75
74#include <assert.h> 76#include <assert.h>
75#include <stdio.h> 77#include <stdio.h>
76#include <stdlib.h> 78#include <stdlib.h>
77#include <time.h>
78#include <string.h> 79#include <string.h>
80#include <time.h>
81
79#include "apps.h" 82#include "apps.h"
83
80#include <openssl/bio.h> 84#include <openssl/bio.h>
81#include <openssl/err.h>
82#include <openssl/bn.h> 85#include <openssl/bn.h>
83#include <openssl/ec.h> 86#include <openssl/ec.h>
84#include <openssl/x509.h> 87#include <openssl/err.h>
85#include <openssl/pem.h> 88#include <openssl/pem.h>
86 89#include <openssl/x509.h>
87 90
88/* -inform arg - input format - default PEM (DER or PEM) 91/* -inform arg - input format - default PEM (DER or PEM)
89 * -outform arg - output format - default PEM 92 * -outform arg - output format - default PEM
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c
index 0ac6a43f6a..b31d10357f 100644
--- a/src/lib/libssl/src/apps/enc.c
+++ b/src/lib/libssl/src/apps/enc.c
@@ -56,19 +56,21 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <ctype.h>
59#include <stdio.h> 60#include <stdio.h>
60#include <stdlib.h> 61#include <stdlib.h>
61#include <string.h> 62#include <string.h>
63
62#include "apps.h" 64#include "apps.h"
65
63#include <openssl/bio.h> 66#include <openssl/bio.h>
67#include <openssl/comp.h>
64#include <openssl/err.h> 68#include <openssl/err.h>
65#include <openssl/evp.h> 69#include <openssl/evp.h>
66#include <openssl/objects.h> 70#include <openssl/objects.h>
67#include <openssl/x509.h>
68#include <openssl/rand.h>
69#include <openssl/pem.h> 71#include <openssl/pem.h>
70#include <openssl/comp.h> 72#include <openssl/rand.h>
71#include <ctype.h> 73#include <openssl/x509.h>
72 74
73int set_hex(char *in, unsigned char *out, int size); 75int set_hex(char *in, unsigned char *out, int size);
74 76
diff --git a/src/lib/libssl/src/apps/engine.c b/src/lib/libssl/src/apps/engine.c
index 7b11ea57d9..2cf7bd2412 100644
--- a/src/lib/libssl/src/apps/engine.c
+++ b/src/lib/libssl/src/apps/engine.c
@@ -56,17 +56,17 @@
56 * 56 *
57 */ 57 */
58 58
59
60#include <stdio.h> 59#include <stdio.h>
61#include <stdlib.h> 60#include <stdlib.h>
62#include <string.h> 61#include <string.h>
62
63#include "apps.h" 63#include "apps.h"
64#include <openssl/err.h> 64
65#ifndef OPENSSL_NO_ENGINE 65#ifndef OPENSSL_NO_ENGINE
66#include <openssl/engine.h> 66#include <openssl/engine.h>
67#include <openssl/err.h>
67#include <openssl/ssl.h> 68#include <openssl/ssl.h>
68 69
69
70static const char *engine_usage[] = { 70static const char *engine_usage[] = {
71 "usage: engine opts [engine ...]\n", 71 "usage: engine opts [engine ...]\n",
72 " -v[v[v[v]]] - verbose mode, for each engine, list its 'control commands'\n", 72 " -v[v[v[v]]] - verbose mode, for each engine, list its 'control commands'\n",
diff --git a/src/lib/libssl/src/apps/errstr.c b/src/lib/libssl/src/apps/errstr.c
index 4605f098ab..5c724285a0 100644
--- a/src/lib/libssl/src/apps/errstr.c
+++ b/src/lib/libssl/src/apps/errstr.c
@@ -59,13 +59,14 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62
62#include "apps.h" 63#include "apps.h"
64
63#include <openssl/bio.h> 65#include <openssl/bio.h>
64#include <openssl/lhash.h>
65#include <openssl/err.h> 66#include <openssl/err.h>
67#include <openssl/lhash.h>
66#include <openssl/ssl.h> 68#include <openssl/ssl.h>
67 69
68
69int errstr_main(int, char **); 70int errstr_main(int, char **);
70 71
71int 72int
diff --git a/src/lib/libssl/src/apps/gendh.c b/src/lib/libssl/src/apps/gendh.c
index 4dd5c02a9e..4fd47092dd 100644
--- a/src/lib/libssl/src/apps/gendh.c
+++ b/src/lib/libssl/src/apps/gendh.c
@@ -58,6 +58,7 @@
58 */ 58 */
59 59
60#include <openssl/opensslconf.h> 60#include <openssl/opensslconf.h>
61
61/* Until the key-gen callbacks are modified to use newer prototypes, we allow 62/* Until the key-gen callbacks are modified to use newer prototypes, we allow
62 * deprecated functions for openssl-internal code */ 63 * deprecated functions for openssl-internal code */
63#ifdef OPENSSL_NO_DEPRECATED 64#ifdef OPENSSL_NO_DEPRECATED
@@ -65,18 +66,22 @@
65#endif 66#endif
66 67
67#ifndef OPENSSL_NO_DH 68#ifndef OPENSSL_NO_DH
68#include <stdio.h> 69
69#include <string.h>
70#include <sys/types.h> 70#include <sys/types.h>
71#include <sys/stat.h> 71#include <sys/stat.h>
72
73#include <stdio.h>
74#include <string.h>
75
72#include "apps.h" 76#include "apps.h"
77
73#include <openssl/bio.h> 78#include <openssl/bio.h>
74#include <openssl/rand.h>
75#include <openssl/err.h>
76#include <openssl/bn.h> 79#include <openssl/bn.h>
77#include <openssl/dh.h> 80#include <openssl/dh.h>
78#include <openssl/x509.h> 81#include <openssl/err.h>
79#include <openssl/pem.h> 82#include <openssl/pem.h>
83#include <openssl/rand.h>
84#include <openssl/x509.h>
80 85
81#define DEFBITS 512 86#define DEFBITS 512
82 87
diff --git a/src/lib/libssl/src/apps/gendsa.c b/src/lib/libssl/src/apps/gendsa.c
index df0993edb4..cada26b45c 100644
--- a/src/lib/libssl/src/apps/gendsa.c
+++ b/src/lib/libssl/src/apps/gendsa.c
@@ -56,19 +56,24 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>/* for OPENSSL_NO_DSA */ 59#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */
60
60#ifndef OPENSSL_NO_DSA 61#ifndef OPENSSL_NO_DSA
61#include <stdio.h> 62
62#include <string.h>
63#include <sys/types.h> 63#include <sys/types.h>
64#include <sys/stat.h> 64#include <sys/stat.h>
65
66#include <stdio.h>
67#include <string.h>
68
65#include "apps.h" 69#include "apps.h"
70
66#include <openssl/bio.h> 71#include <openssl/bio.h>
67#include <openssl/err.h>
68#include <openssl/bn.h> 72#include <openssl/bn.h>
69#include <openssl/dsa.h> 73#include <openssl/dsa.h>
70#include <openssl/x509.h> 74#include <openssl/err.h>
71#include <openssl/pem.h> 75#include <openssl/pem.h>
76#include <openssl/x509.h>
72 77
73#define DEFBITS 512 78#define DEFBITS 512
74 79
diff --git a/src/lib/libssl/src/apps/genpkey.c b/src/lib/libssl/src/apps/genpkey.c
index 1b3bc57e7d..5797de4057 100644
--- a/src/lib/libssl/src/apps/genpkey.c
+++ b/src/lib/libssl/src/apps/genpkey.c
@@ -55,12 +55,16 @@
55 * Hudson (tjh@cryptsoft.com). 55 * Hudson (tjh@cryptsoft.com).
56 * 56 *
57 */ 57 */
58
58#include <stdio.h> 59#include <stdio.h>
59#include <string.h> 60#include <string.h>
61
60#include "apps.h" 62#include "apps.h"
61#include <openssl/pem.h> 63
62#include <openssl/err.h> 64#include <openssl/err.h>
63#include <openssl/evp.h> 65#include <openssl/evp.h>
66#include <openssl/pem.h>
67
64#ifndef OPENSSL_NO_ENGINE 68#ifndef OPENSSL_NO_ENGINE
65#include <openssl/engine.h> 69#include <openssl/engine.h>
66#endif 70#endif
diff --git a/src/lib/libssl/src/apps/genrsa.c b/src/lib/libssl/src/apps/genrsa.c
index 7e5dd2b239..96a678cbb8 100644
--- a/src/lib/libssl/src/apps/genrsa.c
+++ b/src/lib/libssl/src/apps/genrsa.c
@@ -57,6 +57,7 @@
57 */ 57 */
58 58
59#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
60/* Until the key-gen callbacks are modified to use newer prototypes, we allow 61/* Until the key-gen callbacks are modified to use newer prototypes, we allow
61 * deprecated functions for openssl-internal code */ 62 * deprecated functions for openssl-internal code */
62#ifdef OPENSSL_NO_DEPRECATED 63#ifdef OPENSSL_NO_DEPRECATED
@@ -64,19 +65,23 @@
64#endif 65#endif
65 66
66#ifndef OPENSSL_NO_RSA 67#ifndef OPENSSL_NO_RSA
67#include <stdio.h> 68
68#include <string.h>
69#include <sys/types.h> 69#include <sys/types.h>
70#include <sys/stat.h> 70#include <sys/stat.h>
71
72#include <stdio.h>
73#include <string.h>
74
71#include "apps.h" 75#include "apps.h"
76
72#include <openssl/bio.h> 77#include <openssl/bio.h>
73#include <openssl/err.h>
74#include <openssl/bn.h> 78#include <openssl/bn.h>
75#include <openssl/rsa.h> 79#include <openssl/err.h>
76#include <openssl/evp.h> 80#include <openssl/evp.h>
77#include <openssl/x509.h>
78#include <openssl/pem.h> 81#include <openssl/pem.h>
79#include <openssl/rand.h> 82#include <openssl/rand.h>
83#include <openssl/rsa.h>
84#include <openssl/x509.h>
80 85
81#define DEFBITS 2048 86#define DEFBITS 2048
82 87
diff --git a/src/lib/libssl/src/apps/nseq.c b/src/lib/libssl/src/apps/nseq.c
index 0a1512afcf..d5271b1dcc 100644
--- a/src/lib/libssl/src/apps/nseq.c
+++ b/src/lib/libssl/src/apps/nseq.c
@@ -58,10 +58,11 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61
61#include "apps.h" 62#include "apps.h"
62#include <openssl/pem.h>
63#include <openssl/err.h>
64 63
64#include <openssl/err.h>
65#include <openssl/pem.h>
65 66
66int nseq_main(int, char **); 67int nseq_main(int, char **);
67 68
diff --git a/src/lib/libssl/src/apps/ocsp.c b/src/lib/libssl/src/apps/ocsp.c
index 95778210db..5e9e101bc5 100644
--- a/src/lib/libssl/src/apps/ocsp.c
+++ b/src/lib/libssl/src/apps/ocsp.c
@@ -61,14 +61,16 @@
61#include <stdlib.h> 61#include <stdlib.h>
62#include <string.h> 62#include <string.h>
63#include <time.h> 63#include <time.h>
64#include "apps.h" /* needs to be included before the openssl 64
65 * headers! */ 65/* Needs to be included before the openssl headers! */
66#include <openssl/e_os2.h> 66#include "apps.h"
67
68#include <openssl/bn.h>
67#include <openssl/crypto.h> 69#include <openssl/crypto.h>
70#include <openssl/e_os2.h>
68#include <openssl/err.h> 71#include <openssl/err.h>
69#include <openssl/ssl.h>
70#include <openssl/evp.h> 72#include <openssl/evp.h>
71#include <openssl/bn.h> 73#include <openssl/ssl.h>
72#include <openssl/x509v3.h> 74#include <openssl/x509v3.h>
73 75
74/* Maximum leeway in validity period: default 5 minutes */ 76/* Maximum leeway in validity period: default 5 minutes */
diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c
index 2250701f68..47428033cd 100644
--- a/src/lib/libssl/src/apps/openssl.c
+++ b/src/lib/libssl/src/apps/openssl.c
@@ -113,21 +113,25 @@
113#include <stdio.h> 113#include <stdio.h>
114#include <string.h> 114#include <string.h>
115#include <stdlib.h> 115#include <stdlib.h>
116
116#include "apps.h" 117#include "apps.h"
118
117#include <openssl/bio.h> 119#include <openssl/bio.h>
120#include <openssl/conf.h>
118#include <openssl/crypto.h> 121#include <openssl/crypto.h>
119#include <openssl/rand.h> 122#include <openssl/err.h>
120#include <openssl/lhash.h> 123#include <openssl/lhash.h>
121#include <openssl/conf.h>
122#include <openssl/x509.h>
123#include <openssl/pem.h> 124#include <openssl/pem.h>
125#include <openssl/rand.h>
124#include <openssl/ssl.h> 126#include <openssl/ssl.h>
127#include <openssl/x509.h>
128
125#ifndef OPENSSL_NO_ENGINE 129#ifndef OPENSSL_NO_ENGINE
126#include <openssl/engine.h> 130#include <openssl/engine.h>
127#endif 131#endif
132
128#include "progs.h" 133#include "progs.h"
129#include "s_apps.h" 134#include "s_apps.h"
130#include <openssl/err.h>
131 135
132static void openssl_startup(void); 136static void openssl_startup(void);
133static void openssl_shutdown(void); 137static void openssl_shutdown(void);
diff --git a/src/lib/libssl/src/apps/passwd.c b/src/lib/libssl/src/apps/passwd.c
index 30a38aafb8..e87aed38e7 100644
--- a/src/lib/libssl/src/apps/passwd.c
+++ b/src/lib/libssl/src/apps/passwd.c
@@ -15,16 +15,15 @@
15#include <openssl/err.h> 15#include <openssl/err.h>
16#include <openssl/evp.h> 16#include <openssl/evp.h>
17#include <openssl/rand.h> 17#include <openssl/rand.h>
18
18#ifndef OPENSSL_NO_DES 19#ifndef OPENSSL_NO_DES
19#include <openssl/des.h> 20#include <openssl/des.h>
20#endif 21#endif
22
21#ifndef NO_MD5CRYPT_1 23#ifndef NO_MD5CRYPT_1
22#include <openssl/md5.h> 24#include <openssl/md5.h>
23#endif 25#endif
24 26
25
26
27
28static unsigned const char cov_2char[64] = { 27static unsigned const char cov_2char[64] = {
29 /* from crypto/des/fcrypt.c */ 28 /* from crypto/des/fcrypt.c */
30 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 29 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c
index f23d902eb3..aca248a50a 100644
--- a/src/lib/libssl/src/apps/pkcs12.c
+++ b/src/lib/libssl/src/apps/pkcs12.c
@@ -57,21 +57,22 @@
57 */ 57 */
58 58
59#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
60#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1) 61#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
61 62
62#include <stdio.h> 63#include <stdio.h>
63#include <stdlib.h> 64#include <stdlib.h>
64#include <string.h> 65#include <string.h>
66
65#include "apps.h" 67#include "apps.h"
68
66#include <openssl/crypto.h> 69#include <openssl/crypto.h>
67#include <openssl/err.h> 70#include <openssl/err.h>
68#include <openssl/pem.h> 71#include <openssl/pem.h>
69#include <openssl/pkcs12.h> 72#include <openssl/pkcs12.h>
70 73
71
72const EVP_CIPHER *enc; 74const EVP_CIPHER *enc;
73 75
74
75#define NOKEYS 0x1 76#define NOKEYS 0x1
76#define NOCERTS 0x2 77#define NOCERTS 0x2
77#define INFO 0x4 78#define INFO 0x4
diff --git a/src/lib/libssl/src/apps/pkcs7.c b/src/lib/libssl/src/apps/pkcs7.c
index 8540a3f6c2..57e611f9ee 100644
--- a/src/lib/libssl/src/apps/pkcs7.c
+++ b/src/lib/libssl/src/apps/pkcs7.c
@@ -60,14 +60,15 @@
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62#include <time.h> 62#include <time.h>
63
63#include "apps.h" 64#include "apps.h"
65
64#include <openssl/err.h> 66#include <openssl/err.h>
65#include <openssl/objects.h>
66#include <openssl/evp.h> 67#include <openssl/evp.h>
67#include <openssl/x509.h> 68#include <openssl/objects.h>
68#include <openssl/pkcs7.h>
69#include <openssl/pem.h> 69#include <openssl/pem.h>
70 70#include <openssl/pkcs7.h>
71#include <openssl/x509.h>
71 72
72/* -inform arg - input format - default PEM (DER or PEM) 73/* -inform arg - input format - default PEM (DER or PEM)
73 * -outform arg - output format - default PEM 74 * -outform arg - output format - default PEM
diff --git a/src/lib/libssl/src/apps/pkcs8.c b/src/lib/libssl/src/apps/pkcs8.c
index ee6a48fc14..1f1a11e455 100644
--- a/src/lib/libssl/src/apps/pkcs8.c
+++ b/src/lib/libssl/src/apps/pkcs8.c
@@ -55,15 +55,17 @@
55 * Hudson (tjh@cryptsoft.com). 55 * Hudson (tjh@cryptsoft.com).
56 * 56 *
57 */ 57 */
58
58#include <stdio.h> 59#include <stdio.h>
59#include <string.h> 60#include <string.h>
61
60#include "apps.h" 62#include "apps.h"
61#include <openssl/pem.h> 63
62#include <openssl/err.h> 64#include <openssl/err.h>
63#include <openssl/evp.h> 65#include <openssl/evp.h>
66#include <openssl/pem.h>
64#include <openssl/pkcs12.h> 67#include <openssl/pkcs12.h>
65 68
66
67int pkcs8_main(int, char **); 69int pkcs8_main(int, char **);
68 70
69int 71int
diff --git a/src/lib/libssl/src/apps/pkey.c b/src/lib/libssl/src/apps/pkey.c
index 627278fabc..101ba5b239 100644
--- a/src/lib/libssl/src/apps/pkey.c
+++ b/src/lib/libssl/src/apps/pkey.c
@@ -55,13 +55,15 @@
55 * Hudson (tjh@cryptsoft.com). 55 * Hudson (tjh@cryptsoft.com).
56 * 56 *
57 */ 57 */
58
58#include <stdio.h> 59#include <stdio.h>
59#include <string.h> 60#include <string.h>
61
60#include "apps.h" 62#include "apps.h"
61#include <openssl/pem.h> 63
62#include <openssl/err.h> 64#include <openssl/err.h>
63#include <openssl/evp.h> 65#include <openssl/evp.h>
64 66#include <openssl/pem.h>
65 67
66int pkey_main(int, char **); 68int pkey_main(int, char **);
67 69
diff --git a/src/lib/libssl/src/apps/pkeyparam.c b/src/lib/libssl/src/apps/pkeyparam.c
index caeaf193df..d12ac0b86b 100644
--- a/src/lib/libssl/src/apps/pkeyparam.c
+++ b/src/lib/libssl/src/apps/pkeyparam.c
@@ -55,13 +55,15 @@
55 * Hudson (tjh@cryptsoft.com). 55 * Hudson (tjh@cryptsoft.com).
56 * 56 *
57 */ 57 */
58
58#include <stdio.h> 59#include <stdio.h>
59#include <string.h> 60#include <string.h>
61
60#include "apps.h" 62#include "apps.h"
61#include <openssl/pem.h> 63
62#include <openssl/err.h> 64#include <openssl/err.h>
63#include <openssl/evp.h> 65#include <openssl/evp.h>
64 66#include <openssl/pem.h>
65 67
66int pkeyparam_main(int, char **); 68int pkeyparam_main(int, char **);
67 69
diff --git a/src/lib/libssl/src/apps/pkeyutl.c b/src/lib/libssl/src/apps/pkeyutl.c
index c112c773b9..46392e6902 100644
--- a/src/lib/libssl/src/apps/pkeyutl.c
+++ b/src/lib/libssl/src/apps/pkeyutl.c
@@ -55,12 +55,13 @@
55 * 55 *
56 */ 56 */
57 57
58#include <string.h>
58 59
59#include "apps.h" 60#include "apps.h"
60#include <string.h> 61
61#include <openssl/err.h> 62#include <openssl/err.h>
62#include <openssl/pem.h>
63#include <openssl/evp.h> 63#include <openssl/evp.h>
64#include <openssl/pem.h>
64 65
65#define KEY_PRIVKEY 1 66#define KEY_PRIVKEY 1
66#define KEY_PUBKEY 2 67#define KEY_PUBKEY 2
@@ -68,8 +69,6 @@
68 69
69static void usage(void); 70static void usage(void);
70 71
71
72
73static EVP_PKEY_CTX *init_ctx(int *pkeysize, 72static EVP_PKEY_CTX *init_ctx(int *pkeysize,
74 char *keyfile, int keyform, int key_type, 73 char *keyfile, int keyform, int key_type,
75 char *passargin, int pkey_op, ENGINE * e); 74 char *passargin, int pkey_op, ENGINE * e);
diff --git a/src/lib/libssl/src/apps/prime.c b/src/lib/libssl/src/apps/prime.c
index c6f562a7e3..de8f232851 100644
--- a/src/lib/libssl/src/apps/prime.c
+++ b/src/lib/libssl/src/apps/prime.c
@@ -50,9 +50,8 @@
50#include <string.h> 50#include <string.h>
51 51
52#include "apps.h" 52#include "apps.h"
53#include <openssl/bn.h>
54
55 53
54#include <openssl/bn.h>
56 55
57int prime_main(int, char **); 56int prime_main(int, char **);
58 57
diff --git a/src/lib/libssl/src/apps/rand.c b/src/lib/libssl/src/apps/rand.c
index 355a42e184..c543e326b2 100644
--- a/src/lib/libssl/src/apps/rand.c
+++ b/src/lib/libssl/src/apps/rand.c
@@ -53,17 +53,16 @@
53 * 53 *
54 */ 54 */
55 55
56#include "apps.h"
57
58#include <ctype.h> 56#include <ctype.h>
59#include <stdio.h> 57#include <stdio.h>
60#include <string.h> 58#include <string.h>
61 59
60#include "apps.h"
61
62#include <openssl/bio.h> 62#include <openssl/bio.h>
63#include <openssl/err.h> 63#include <openssl/err.h>
64#include <openssl/rand.h> 64#include <openssl/rand.h>
65 65
66
67/* -out file - write to file 66/* -out file - write to file
68 * -rand file:file - PRNG seed files 67 * -rand file:file - PRNG seed files
69 * -base64 - base64 encode output 68 * -base64 - base64 encode output
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c
index 26a3e1196c..21ddb3b9c3 100644
--- a/src/lib/libssl/src/apps/req.c
+++ b/src/lib/libssl/src/apps/req.c
@@ -64,26 +64,30 @@
64 64
65#include <stdio.h> 65#include <stdio.h>
66#include <stdlib.h> 66#include <stdlib.h>
67#include <time.h>
68#include <string.h> 67#include <string.h>
68#include <time.h>
69
69#include "apps.h" 70#include "apps.h"
71
72#include <openssl/asn1.h>
70#include <openssl/bio.h> 73#include <openssl/bio.h>
71#include <openssl/evp.h> 74#include <openssl/bn.h>
72#include <openssl/conf.h> 75#include <openssl/conf.h>
73#include <openssl/err.h> 76#include <openssl/err.h>
74#include <openssl/asn1.h> 77#include <openssl/evp.h>
75#include <openssl/x509.h>
76#include <openssl/x509v3.h>
77#include <openssl/objects.h> 78#include <openssl/objects.h>
78#include <openssl/pem.h> 79#include <openssl/pem.h>
79#include <openssl/bn.h> 80#include <openssl/x509.h>
80#ifndef OPENSSL_NO_RSA 81#include <openssl/x509v3.h>
81#include <openssl/rsa.h> 82
82#endif
83#ifndef OPENSSL_NO_DSA 83#ifndef OPENSSL_NO_DSA
84#include <openssl/dsa.h> 84#include <openssl/dsa.h>
85#endif 85#endif
86 86
87#ifndef OPENSSL_NO_RSA
88#include <openssl/rsa.h>
89#endif
90
87#define SECTION "req" 91#define SECTION "req"
88 92
89#define BITS "default_bits" 93#define BITS "default_bits"
diff --git a/src/lib/libssl/src/apps/rsa.c b/src/lib/libssl/src/apps/rsa.c
index 3e0b2ebfac..0b9c87dd99 100644
--- a/src/lib/libssl/src/apps/rsa.c
+++ b/src/lib/libssl/src/apps/rsa.c
@@ -57,20 +57,23 @@
57 */ 57 */
58 58
59#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
60#ifndef OPENSSL_NO_RSA 61#ifndef OPENSSL_NO_RSA
62
61#include <stdio.h> 63#include <stdio.h>
62#include <stdlib.h> 64#include <stdlib.h>
63#include <string.h> 65#include <string.h>
64#include <time.h> 66#include <time.h>
67
65#include "apps.h" 68#include "apps.h"
69
66#include <openssl/bio.h> 70#include <openssl/bio.h>
71#include <openssl/bn.h>
67#include <openssl/err.h> 72#include <openssl/err.h>
68#include <openssl/rsa.h>
69#include <openssl/evp.h> 73#include <openssl/evp.h>
70#include <openssl/x509.h>
71#include <openssl/pem.h> 74#include <openssl/pem.h>
72#include <openssl/bn.h> 75#include <openssl/rsa.h>
73 76#include <openssl/x509.h>
74 77
75/* -inform arg - input format - default PEM (one of DER, NET or PEM) 78/* -inform arg - input format - default PEM (one of DER, NET or PEM)
76 * -outform arg - output format - default PEM 79 * -outform arg - output format - default PEM
diff --git a/src/lib/libssl/src/apps/rsautl.c b/src/lib/libssl/src/apps/rsautl.c
index 04992ae609..55c89b271b 100644
--- a/src/lib/libssl/src/apps/rsautl.c
+++ b/src/lib/libssl/src/apps/rsautl.c
@@ -57,10 +57,13 @@
57 */ 57 */
58 58
59#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
60#ifndef OPENSSL_NO_RSA 61#ifndef OPENSSL_NO_RSA
61 62
62#include "apps.h"
63#include <string.h> 63#include <string.h>
64
65#include "apps.h"
66
64#include <openssl/err.h> 67#include <openssl/err.h>
65#include <openssl/pem.h> 68#include <openssl/pem.h>
66#include <openssl/rsa.h> 69#include <openssl/rsa.h>
@@ -76,8 +79,6 @@
76 79
77static void usage(void); 80static void usage(void);
78 81
79
80
81int rsautl_main(int argc, char **); 82int rsautl_main(int argc, char **);
82 83
83int 84int
diff --git a/src/lib/libssl/src/apps/s_cb.c b/src/lib/libssl/src/apps/s_cb.c
index 9da5825f05..977dd75c5f 100644
--- a/src/lib/libssl/src/apps/s_cb.c
+++ b/src/lib/libssl/src/apps/s_cb.c
@@ -109,18 +109,22 @@
109 * 109 *
110 */ 110 */
111 111
112#include <sys/socket.h>
113
114#include <netinet/in.h>
115
116#include <netdb.h>
112#include <stdio.h> 117#include <stdio.h>
113#include <stdlib.h> 118#include <stdlib.h>
114#include <string.h> 119#include <string.h>
115#include <netdb.h>
116#include <sys/socket.h>
117#include <netinet/in.h>
118 120
119#include "apps.h" 121#include "apps.h"
122
120#include <openssl/err.h> 123#include <openssl/err.h>
121#include <openssl/rand.h> 124#include <openssl/rand.h>
122#include <openssl/x509.h>
123#include <openssl/ssl.h> 125#include <openssl/ssl.h>
126#include <openssl/x509.h>
127
124#include "s_apps.h" 128#include "s_apps.h"
125 129
126#define COOKIE_SECRET_LENGTH 16 130#define COOKIE_SECRET_LENGTH 16
diff --git a/src/lib/libssl/src/apps/s_client.c b/src/lib/libssl/src/apps/s_client.c
index 7549c980e0..d29f14709a 100644
--- a/src/lib/libssl/src/apps/s_client.c
+++ b/src/lib/libssl/src/apps/s_client.c
@@ -137,33 +137,33 @@
137 137
138#include <sys/types.h> 138#include <sys/types.h>
139#include <sys/ioctl.h> 139#include <sys/ioctl.h>
140#include <sys/socket.h>
140 141
141#include <netinet/in.h> 142#include <netinet/in.h>
143
142#include <assert.h> 144#include <assert.h>
143#include <ctype.h> 145#include <ctype.h>
146#include <limits.h>
147#include <netdb.h>
144#include <stdio.h> 148#include <stdio.h>
145#include <stdlib.h> 149#include <stdlib.h>
146#include <limits.h>
147#include <string.h> 150#include <string.h>
148#include <unistd.h> 151#include <unistd.h>
149#include <openssl/e_os2.h>
150#include <netdb.h>
151#include <sys/socket.h>
152#include <netinet/in.h>
153 152
154#include "apps.h" 153#include "apps.h"
155#include <openssl/x509.h> 154
156#include <openssl/ssl.h> 155#include <openssl/bn.h>
156#include <openssl/e_os2.h>
157#include <openssl/err.h> 157#include <openssl/err.h>
158#include <openssl/ocsp.h>
158#include <openssl/pem.h> 159#include <openssl/pem.h>
159#include <openssl/rand.h> 160#include <openssl/rand.h>
160#include <openssl/ocsp.h> 161#include <openssl/ssl.h>
161#include <openssl/bn.h> 162#include <openssl/x509.h>
163
162#include "s_apps.h" 164#include "s_apps.h"
163#include "timeouts.h" 165#include "timeouts.h"
164 166
165
166
167/*#define SSL_HOST_NAME "www.netscape.com" */ 167/*#define SSL_HOST_NAME "www.netscape.com" */
168/*#define SSL_HOST_NAME "193.118.187.102" */ 168/*#define SSL_HOST_NAME "193.118.187.102" */
169#define SSL_HOST_NAME "localhost" 169#define SSL_HOST_NAME "localhost"
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c
index 67886bbb58..333e09f3ca 100644
--- a/src/lib/libssl/src/apps/s_server.c
+++ b/src/lib/libssl/src/apps/s_server.c
@@ -146,7 +146,9 @@
146#undef OPENSSL_NO_DEPRECATED 146#undef OPENSSL_NO_DEPRECATED
147#endif 147#endif
148 148
149#include <sys/types.h>
149#include <sys/ioctl.h> 150#include <sys/ioctl.h>
151#include <sys/socket.h>
150 152
151#include <assert.h> 153#include <assert.h>
152#include <ctype.h> 154#include <ctype.h>
@@ -154,31 +156,30 @@
154#include <stdlib.h> 156#include <stdlib.h>
155#include <string.h> 157#include <string.h>
156#include <unistd.h> 158#include <unistd.h>
157#include <sys/socket.h>
158 159
159#include <openssl/e_os2.h> 160#include "apps.h"
160
161#include <sys/types.h>
162 161
163#include <openssl/lhash.h>
164#include <openssl/bn.h> 162#include <openssl/bn.h>
165#include "apps.h" 163#include <openssl/e_os2.h>
166#include <openssl/err.h> 164#include <openssl/err.h>
165#include <openssl/lhash.h>
166#include <openssl/ocsp.h>
167#include <openssl/pem.h> 167#include <openssl/pem.h>
168#include <openssl/x509.h>
169#include <openssl/ssl.h>
170#include <openssl/rand.h> 168#include <openssl/rand.h>
171#include <openssl/ocsp.h> 169#include <openssl/ssl.h>
170#include <openssl/x509.h>
171
172#ifndef OPENSSL_NO_DH 172#ifndef OPENSSL_NO_DH
173#include <openssl/dh.h> 173#include <openssl/dh.h>
174#endif 174#endif
175
175#ifndef OPENSSL_NO_RSA 176#ifndef OPENSSL_NO_RSA
176#include <openssl/rsa.h> 177#include <openssl/rsa.h>
177#endif 178#endif
179
178#include "s_apps.h" 180#include "s_apps.h"
179#include "timeouts.h" 181#include "timeouts.h"
180 182
181
182#ifndef OPENSSL_NO_RSA 183#ifndef OPENSSL_NO_RSA
183static RSA *tmp_rsa_cb(SSL * s, int is_export, int keylength); 184static RSA *tmp_rsa_cb(SSL * s, int is_export, int keylength);
184#endif 185#endif
diff --git a/src/lib/libssl/src/apps/s_socket.c b/src/lib/libssl/src/apps/s_socket.c
index 919ab40cd5..a9bbe97ddf 100644
--- a/src/lib/libssl/src/apps/s_socket.c
+++ b/src/lib/libssl/src/apps/s_socket.c
@@ -56,23 +56,24 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <sys/socket.h>
60
61#include <netinet/in.h>
62
63#include <errno.h>
64#include <netdb.h>
65#include <signal.h>
59#include <stdio.h> 66#include <stdio.h>
60#include <stdlib.h> 67#include <stdlib.h>
61#include <string.h> 68#include <string.h>
62#include <errno.h>
63#include <signal.h>
64#include <netdb.h>
65#include <unistd.h> 69#include <unistd.h>
66#include <sys/socket.h>
67#include <netinet/in.h>
68
69#include <openssl/e_os2.h>
70 70
71#include "apps.h" 71#include "apps.h"
72#include "s_apps.h"
73#include <openssl/ssl.h>
74 72
73#include <openssl/e_os2.h>
74#include <openssl/ssl.h>
75 75
76#include "s_apps.h"
76 77
77static int ssl_sock_init(void); 78static int ssl_sock_init(void);
78static int init_server(int *sock, int port, int type); 79static int init_server(int *sock, int port, int type);
@@ -81,7 +82,6 @@ static int do_accept(int acc_sock, int *sock, char **host);
81 82
82#define SOCKET_PROTOCOL IPPROTO_TCP 83#define SOCKET_PROTOCOL IPPROTO_TCP
83 84
84
85static int 85static int
86ssl_sock_init(void) 86ssl_sock_init(void)
87{ 87{
diff --git a/src/lib/libssl/src/apps/s_time.c b/src/lib/libssl/src/apps/s_time.c
index 4cf62ffea6..e242037cc8 100644
--- a/src/lib/libssl/src/apps/s_time.c
+++ b/src/lib/libssl/src/apps/s_time.c
@@ -63,19 +63,21 @@
63 Written and donated by Larry Streepy <streepy@healthcare.com> 63 Written and donated by Larry Streepy <streepy@healthcare.com>
64 -----------------------------------------*/ 64 -----------------------------------------*/
65 65
66#include <sys/socket.h>
67
66#include <stdio.h> 68#include <stdio.h>
67#include <stdlib.h> 69#include <stdlib.h>
68#include <string.h> 70#include <string.h>
69#include <sys/socket.h> 71#include <unistd.h>
70 72
71#include "apps.h" 73#include "apps.h"
72#include <openssl/x509.h> 74
73#include <openssl/ssl.h>
74#include <openssl/pem.h>
75#include "s_apps.h"
76#include <openssl/err.h> 75#include <openssl/err.h>
77#include <unistd.h> 76#include <openssl/pem.h>
77#include <openssl/ssl.h>
78#include <openssl/x509.h>
78 79
80#include "s_apps.h"
79 81
80#define SSL_CONNECT_NAME "localhost:4433" 82#define SSL_CONNECT_NAME "localhost:4433"
81 83
diff --git a/src/lib/libssl/src/apps/sess_id.c b/src/lib/libssl/src/apps/sess_id.c
index 49766fdb65..f255f25f1b 100644
--- a/src/lib/libssl/src/apps/sess_id.c
+++ b/src/lib/libssl/src/apps/sess_id.c
@@ -59,13 +59,14 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62
62#include "apps.h" 63#include "apps.h"
64
63#include <openssl/bio.h> 65#include <openssl/bio.h>
64#include <openssl/err.h> 66#include <openssl/err.h>
65#include <openssl/x509.h>
66#include <openssl/pem.h> 67#include <openssl/pem.h>
67#include <openssl/ssl.h> 68#include <openssl/ssl.h>
68 69#include <openssl/x509.h>
69 70
70static const char *sess_id_usage[] = { 71static const char *sess_id_usage[] = {
71 "usage: sess_id args\n", 72 "usage: sess_id args\n",
diff --git a/src/lib/libssl/src/apps/smime.c b/src/lib/libssl/src/apps/smime.c
index f7d56b3005..78d783de46 100644
--- a/src/lib/libssl/src/apps/smime.c
+++ b/src/lib/libssl/src/apps/smime.c
@@ -60,10 +60,12 @@
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <string.h> 62#include <string.h>
63
63#include "apps.h" 64#include "apps.h"
65
64#include <openssl/crypto.h> 66#include <openssl/crypto.h>
65#include <openssl/pem.h>
66#include <openssl/err.h> 67#include <openssl/err.h>
68#include <openssl/pem.h>
67#include <openssl/x509_vfy.h> 69#include <openssl/x509_vfy.h>
68#include <openssl/x509v3.h> 70#include <openssl/x509v3.h>
69 71
diff --git a/src/lib/libssl/src/apps/speed.c b/src/lib/libssl/src/apps/speed.c
index f96e901917..6bcb943bff 100644
--- a/src/lib/libssl/src/apps/speed.c
+++ b/src/lib/libssl/src/apps/speed.c
@@ -89,12 +89,14 @@
89#include <string.h> 89#include <string.h>
90#include <unistd.h> 90#include <unistd.h>
91 91
92#include "apps.h"
93
92#include <openssl/bn.h> 94#include <openssl/bn.h>
93#include <openssl/crypto.h> 95#include <openssl/crypto.h>
94#include <openssl/err.h> 96#include <openssl/err.h>
95#include <openssl/evp.h> 97#include <openssl/evp.h>
96#include <openssl/objects.h>
97#include <openssl/modes.h> 98#include <openssl/modes.h>
99#include <openssl/objects.h>
98#include <openssl/rand.h> 100#include <openssl/rand.h>
99#include <openssl/x509.h> 101#include <openssl/x509.h>
100 102
@@ -159,8 +161,6 @@
159#include <openssl/whrlpool.h> 161#include <openssl/whrlpool.h>
160#endif 162#endif
161 163
162#include "apps.h"
163
164#ifndef OPENSSL_NO_DSA 164#ifndef OPENSSL_NO_DSA
165#include "./testdsa.h" 165#include "./testdsa.h"
166#endif 166#endif
diff --git a/src/lib/libssl/src/apps/spkac.c b/src/lib/libssl/src/apps/spkac.c
index 8fa21d9826..2fa7eac6b2 100644
--- a/src/lib/libssl/src/apps/spkac.c
+++ b/src/lib/libssl/src/apps/spkac.c
@@ -57,19 +57,21 @@
57 * Hudson (tjh@cryptsoft.com). 57 * Hudson (tjh@cryptsoft.com).
58 * 58 *
59 */ 59 */
60
60#include <stdio.h> 61#include <stdio.h>
61#include <stdlib.h> 62#include <stdlib.h>
62#include <string.h> 63#include <string.h>
63#include <time.h> 64#include <time.h>
65
64#include "apps.h" 66#include "apps.h"
67
65#include <openssl/bio.h> 68#include <openssl/bio.h>
66#include <openssl/conf.h> 69#include <openssl/conf.h>
67#include <openssl/err.h> 70#include <openssl/err.h>
68#include <openssl/evp.h> 71#include <openssl/evp.h>
69#include <openssl/lhash.h> 72#include <openssl/lhash.h>
70#include <openssl/x509.h>
71#include <openssl/pem.h> 73#include <openssl/pem.h>
72 74#include <openssl/x509.h>
73 75
74/* -in arg - input file - default stdin 76/* -in arg - input file - default stdin
75 * -out arg - output file - default stdout 77 * -out arg - output file - default stdout
diff --git a/src/lib/libssl/src/apps/ts.c b/src/lib/libssl/src/apps/ts.c
index c2d333cf7e..2bb343d13c 100644
--- a/src/lib/libssl/src/apps/ts.c
+++ b/src/lib/libssl/src/apps/ts.c
@@ -59,14 +59,15 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62
62#include "apps.h" 63#include "apps.h"
64
63#include <openssl/bio.h> 65#include <openssl/bio.h>
66#include <openssl/bn.h>
64#include <openssl/err.h> 67#include <openssl/err.h>
65#include <openssl/pem.h> 68#include <openssl/pem.h>
66#include <openssl/rand.h> 69#include <openssl/rand.h>
67#include <openssl/ts.h> 70#include <openssl/ts.h>
68#include <openssl/bn.h>
69
70 71
71/* Length of the nonce of the request in bits (must be a multiple of 8). */ 72/* Length of the nonce of the request in bits (must be a multiple of 8). */
72#define NONCE_LENGTH 64 73#define NONCE_LENGTH 64
diff --git a/src/lib/libssl/src/apps/verify.c b/src/lib/libssl/src/apps/verify.c
index b73956bc57..b691460a9e 100644
--- a/src/lib/libssl/src/apps/verify.c
+++ b/src/lib/libssl/src/apps/verify.c
@@ -59,13 +59,14 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62
62#include "apps.h" 63#include "apps.h"
64
63#include <openssl/bio.h> 65#include <openssl/bio.h>
64#include <openssl/err.h> 66#include <openssl/err.h>
67#include <openssl/pem.h>
65#include <openssl/x509.h> 68#include <openssl/x509.h>
66#include <openssl/x509v3.h> 69#include <openssl/x509v3.h>
67#include <openssl/pem.h>
68
69 70
70static int cb(int ok, X509_STORE_CTX * ctx); 71static int cb(int ok, X509_STORE_CTX * ctx);
71static int check(X509_STORE * ctx, char *file, STACK_OF(X509) * uchain, 72static int check(X509_STORE * ctx, char *file, STACK_OF(X509) * uchain,
diff --git a/src/lib/libssl/src/apps/version.c b/src/lib/libssl/src/apps/version.c
index e7c58b5ae0..cac5b6f145 100644
--- a/src/lib/libssl/src/apps/version.c
+++ b/src/lib/libssl/src/apps/version.c
@@ -112,23 +112,28 @@
112#include <stdio.h> 112#include <stdio.h>
113#include <stdlib.h> 113#include <stdlib.h>
114#include <string.h> 114#include <string.h>
115
115#include "apps.h" 116#include "apps.h"
116#include <openssl/evp.h> 117
117#include <openssl/crypto.h>
118#include <openssl/bn.h> 118#include <openssl/bn.h>
119#ifndef OPENSSL_NO_RC4 119#include <openssl/crypto.h>
120#include <openssl/rc4.h> 120#include <openssl/evp.h>
121
122#ifndef OPENSSL_NO_BF
123#include <openssl/blowfish.h>
121#endif 124#endif
125
122#ifndef OPENSSL_NO_DES 126#ifndef OPENSSL_NO_DES
123#include <openssl/des.h> 127#include <openssl/des.h>
124#endif 128#endif
129
125#ifndef OPENSSL_NO_IDEA 130#ifndef OPENSSL_NO_IDEA
126#include <openssl/idea.h> 131#include <openssl/idea.h>
127#endif 132#endif
128#ifndef OPENSSL_NO_BF
129#include <openssl/blowfish.h>
130#endif
131 133
134#ifndef OPENSSL_NO_RC4
135#include <openssl/rc4.h>
136#endif
132 137
133int version_main(int, char **); 138int version_main(int, char **);
134 139
diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c
index 389b752151..a488623c41 100644
--- a/src/lib/libssl/src/apps/x509.c
+++ b/src/lib/libssl/src/apps/x509.c
@@ -60,23 +60,26 @@
60#include <stdio.h> 60#include <stdio.h>
61#include <stdlib.h> 61#include <stdlib.h>
62#include <string.h> 62#include <string.h>
63
63#include "apps.h" 64#include "apps.h"
64#include <openssl/bio.h> 65
65#include <openssl/asn1.h> 66#include <openssl/asn1.h>
66#include <openssl/err.h> 67#include <openssl/bio.h>
67#include <openssl/bn.h> 68#include <openssl/bn.h>
69#include <openssl/err.h>
68#include <openssl/evp.h> 70#include <openssl/evp.h>
69#include <openssl/x509.h>
70#include <openssl/x509v3.h>
71#include <openssl/objects.h> 71#include <openssl/objects.h>
72#include <openssl/pem.h> 72#include <openssl/pem.h>
73#ifndef OPENSSL_NO_RSA 73#include <openssl/x509.h>
74#include <openssl/rsa.h> 74#include <openssl/x509v3.h>
75#endif 75
76#ifndef OPENSSL_NO_DSA 76#ifndef OPENSSL_NO_DSA
77#include <openssl/dsa.h> 77#include <openssl/dsa.h>
78#endif 78#endif
79 79
80#ifndef OPENSSL_NO_RSA
81#include <openssl/rsa.h>
82#endif
80 83
81#define POSTFIX ".srl" 84#define POSTFIX ".srl"
82#define DEF_DAYS 30 85#define DEF_DAYS 30