diff options
author | matthew <> | 2014-04-17 22:44:34 +0000 |
---|---|---|
committer | matthew <> | 2014-04-17 22:44:34 +0000 |
commit | 934b5ddbd810d7a899481637c58455698974e7e8 (patch) | |
tree | 0a530df36859b4523c94160356dc1d0459ace957 /src | |
parent | 4eaf48dd2cdab352d97fac22655d61c3da773d72 (diff) | |
download | openbsd-934b5ddbd810d7a899481637c58455698974e7e8.tar.gz openbsd-934b5ddbd810d7a899481637c58455698974e7e8.tar.bz2 openbsd-934b5ddbd810d7a899481637c58455698974e7e8.zip |
Make MONOLITH the default and only option
ok deraadt
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/src/apps/apps.h | 18 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/openssl.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/req.c | 23 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/s_server.c | 6 | ||||
-rw-r--r-- | src/usr.sbin/openssl/Makefile | 4 |
5 files changed, 3 insertions, 52 deletions
diff --git a/src/lib/libssl/src/apps/apps.h b/src/lib/libssl/src/apps/apps.h index b2e78e12fb..ad8ae9d146 100644 --- a/src/lib/libssl/src/apps/apps.h +++ b/src/lib/libssl/src/apps/apps.h | |||
@@ -137,27 +137,11 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read, | |||
137 | * (see e_os.h). The string is | 137 | * (see e_os.h). The string is |
138 | * destroyed! */ | 138 | * destroyed! */ |
139 | 139 | ||
140 | #ifndef MONOLITH | ||
141 | |||
142 | #define MAIN(a,v) main(a,v) | ||
143 | |||
144 | #ifndef NON_MAIN | ||
145 | CONF *config = NULL; | ||
146 | BIO *bio_err = NULL; | ||
147 | #else | ||
148 | extern CONF *config; | ||
149 | extern BIO *bio_err; | ||
150 | #endif | ||
151 | |||
152 | #else | ||
153 | |||
154 | #define MAIN(a,v) PROG(a,v) | 140 | #define MAIN(a,v) PROG(a,v) |
155 | extern CONF *config; | 141 | extern CONF *config; |
156 | extern char *default_config_file; | 142 | extern char *default_config_file; |
157 | extern BIO *bio_err; | 143 | extern BIO *bio_err; |
158 | 144 | ||
159 | #endif | ||
160 | |||
161 | #include <signal.h> | 145 | #include <signal.h> |
162 | 146 | ||
163 | #define do_pipe_sig() signal(SIGPIPE,SIG_IGN) | 147 | #define do_pipe_sig() signal(SIGPIPE,SIG_IGN) |
@@ -168,7 +152,7 @@ extern BIO *bio_err; | |||
168 | #define zlib_cleanup() COMP_zlib_cleanup() | 152 | #define zlib_cleanup() COMP_zlib_cleanup() |
169 | #endif | 153 | #endif |
170 | 154 | ||
171 | #if defined(MONOLITH) && !defined(OPENSSL_C) | 155 | #if !defined(OPENSSL_C) |
172 | # define apps_startup() \ | 156 | # define apps_startup() \ |
173 | do_pipe_sig() | 157 | do_pipe_sig() |
174 | # define apps_shutdown() | 158 | # define apps_shutdown() |
diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c index 8f0d11ddd5..0221eb0085 100644 --- a/src/lib/libssl/src/apps/openssl.c +++ b/src/lib/libssl/src/apps/openssl.c | |||
@@ -145,12 +145,8 @@ static void list_cipher(BIO *out); | |||
145 | static void list_md(BIO *out); | 145 | static void list_md(BIO *out); |
146 | char *default_config_file=NULL; | 146 | char *default_config_file=NULL; |
147 | 147 | ||
148 | /* Make sure there is only one when MONOLITH is defined */ | ||
149 | #ifdef MONOLITH | ||
150 | CONF *config=NULL; | 148 | CONF *config=NULL; |
151 | BIO *bio_err=NULL; | 149 | BIO *bio_err=NULL; |
152 | #endif | ||
153 | |||
154 | 150 | ||
155 | static void lock_dbg_cb(int mode, int type, const char *file, int line) | 151 | static void lock_dbg_cb(int mode, int type, const char *file, int line) |
156 | { | 152 | { |
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c index 690ec0d625..d28a1f3258 100644 --- a/src/lib/libssl/src/apps/req.c +++ b/src/lib/libssl/src/apps/req.c | |||
@@ -147,9 +147,6 @@ static int check_end(const char *str, const char *end); | |||
147 | static EVP_PKEY_CTX *set_keygen_ctx(BIO *err, const char *gstr, int *pkey_type, | 147 | static EVP_PKEY_CTX *set_keygen_ctx(BIO *err, const char *gstr, int *pkey_type, |
148 | long *pkeylen, char **palgnam, | 148 | long *pkeylen, char **palgnam, |
149 | ENGINE *keygen_engine); | 149 | ENGINE *keygen_engine); |
150 | #ifndef MONOLITH | ||
151 | static char *default_config_file=NULL; | ||
152 | #endif | ||
153 | static CONF *req_conf=NULL; | 150 | static CONF *req_conf=NULL; |
154 | static int batch=0; | 151 | static int batch=0; |
155 | 152 | ||
@@ -189,10 +186,6 @@ int MAIN(int argc, char **argv) | |||
189 | int multirdn = 0; | 186 | int multirdn = 0; |
190 | const EVP_MD *md_alg=NULL,*digest=NULL; | 187 | const EVP_MD *md_alg=NULL,*digest=NULL; |
191 | unsigned long chtype = MBSTRING_ASC; | 188 | unsigned long chtype = MBSTRING_ASC; |
192 | #ifndef MONOLITH | ||
193 | char *to_free; | ||
194 | long errline; | ||
195 | #endif | ||
196 | 189 | ||
197 | req_conf = NULL; | 190 | req_conf = NULL; |
198 | #ifndef OPENSSL_NO_DES | 191 | #ifndef OPENSSL_NO_DES |
@@ -456,18 +449,6 @@ bad: | |||
456 | goto end; | 449 | goto end; |
457 | } | 450 | } |
458 | 451 | ||
459 | #ifndef MONOLITH /* else this has happened in openssl.c (global `config') */ | ||
460 | /* Lets load up our environment a little */ | ||
461 | p=getenv("OPENSSL_CONF"); | ||
462 | if (p == NULL) | ||
463 | p=getenv("SSLEAY_CONF"); | ||
464 | if (p == NULL) | ||
465 | p=to_free=make_config_name(); | ||
466 | default_config_file=p; | ||
467 | config=NCONF_new(NULL); | ||
468 | i=NCONF_load(config, p, &errline); | ||
469 | #endif | ||
470 | |||
471 | if (template != NULL) | 452 | if (template != NULL) |
472 | { | 453 | { |
473 | long errline = -1; | 454 | long errline = -1; |
@@ -1066,10 +1047,6 @@ loop: | |||
1066 | } | 1047 | } |
1067 | ex=0; | 1048 | ex=0; |
1068 | end: | 1049 | end: |
1069 | #ifndef MONOLITH | ||
1070 | if(to_free) | ||
1071 | free(to_free); | ||
1072 | #endif | ||
1073 | if (ex) | 1050 | if (ex) |
1074 | { | 1051 | { |
1075 | ERR_print_errors(bio_err); | 1052 | ERR_print_errors(bio_err); |
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c index ca1873d9e4..7fafe56359 100644 --- a/src/lib/libssl/src/apps/s_server.c +++ b/src/lib/libssl/src/apps/s_server.c | |||
@@ -199,9 +199,7 @@ static DH *load_dh_param(const char *dhfile); | |||
199 | static DH *get_dh512(void); | 199 | static DH *get_dh512(void); |
200 | #endif | 200 | #endif |
201 | 201 | ||
202 | #ifdef MONOLITH | ||
203 | static void s_server_init(void); | 202 | static void s_server_init(void); |
204 | #endif | ||
205 | 203 | ||
206 | #ifndef OPENSSL_NO_DH | 204 | #ifndef OPENSSL_NO_DH |
207 | static unsigned char dh512_p[]={ | 205 | static unsigned char dh512_p[]={ |
@@ -404,7 +402,6 @@ static int ssl_srp_server_param_cb(SSL *s, int *ad, void *arg) | |||
404 | 402 | ||
405 | #endif | 403 | #endif |
406 | 404 | ||
407 | #ifdef MONOLITH | ||
408 | static void s_server_init(void) | 405 | static void s_server_init(void) |
409 | { | 406 | { |
410 | accept_socket=-1; | 407 | accept_socket=-1; |
@@ -435,7 +432,6 @@ static void s_server_init(void) | |||
435 | engine_id=NULL; | 432 | engine_id=NULL; |
436 | #endif | 433 | #endif |
437 | } | 434 | } |
438 | #endif | ||
439 | 435 | ||
440 | static void sv_usage(void) | 436 | static void sv_usage(void) |
441 | { | 437 | { |
@@ -811,9 +807,7 @@ int MAIN(int argc, char *argv[]) | |||
811 | local_argv=argv; | 807 | local_argv=argv; |
812 | 808 | ||
813 | apps_startup(); | 809 | apps_startup(); |
814 | #ifdef MONOLITH | ||
815 | s_server_init(); | 810 | s_server_init(); |
816 | #endif | ||
817 | 811 | ||
818 | if (bio_err == NULL) | 812 | if (bio_err == NULL) |
819 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | 813 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); |
diff --git a/src/usr.sbin/openssl/Makefile b/src/usr.sbin/openssl/Makefile index 5b050ae548..2a2df8f2e6 100644 --- a/src/usr.sbin/openssl/Makefile +++ b/src/usr.sbin/openssl/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.24 2014/04/17 20:46:29 tedu Exp $ | 1 | # $OpenBSD: Makefile,v 1.25 2014/04/17 22:44:34 matthew Exp $ |
2 | 2 | ||
3 | PROG= openssl | 3 | PROG= openssl |
4 | LDADD= -lssl -lcrypto | 4 | LDADD= -lssl -lcrypto |
@@ -10,7 +10,7 @@ SSLEAY_SRC= ${.CURDIR}/../../${SSLEAYDIST}/apps | |||
10 | SSLEAY_SRC_TOP= ${.CURDIR}/../../${SSLEAYDIST} | 10 | SSLEAY_SRC_TOP= ${.CURDIR}/../../${SSLEAYDIST} |
11 | 11 | ||
12 | CFLAGS+= -Wall | 12 | CFLAGS+= -Wall |
13 | CFLAGS+= -DMONOLITH -DTERMIOS -DANSI_SOURCE -DOPENSSL_NO_RC5 | 13 | CFLAGS+= -DTERMIOS -DANSI_SOURCE -DOPENSSL_NO_RC5 |
14 | CFLAGS+= -DOPENSSL_NO_SSL2 | 14 | CFLAGS+= -DOPENSSL_NO_SSL2 |
15 | CFLAGS+= -I${SSLEAY_SRC_TOP} | 15 | CFLAGS+= -I${SSLEAY_SRC_TOP} |
16 | 16 | ||