Fix various OPENSSL_NO_* options

This fixes compilation with various OPENSSL_NO_* options that got broken
during the big apps cleanup.

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Matt Caswell
2015-05-15 09:42:08 +01:00
parent 6b41b3f5ea
commit a7f82a1ab2
3 changed files with 40 additions and 12 deletions

View File

@@ -721,6 +721,20 @@ int s_client_main(int argc, char **argv)
#endif #endif
#ifdef OPENSSL_NO_SSL_TRACE #ifdef OPENSSL_NO_SSL_TRACE
case OPT_TRACE: case OPT_TRACE:
#endif
#ifdef OPENSSL_NO_PSK
case OPT_PSK_IDENTITY:
case OPT_PSK:
#endif
#ifdef OPENSSL_NO_SSL3
case OPT_SSL3:
#endif
#ifdef OPENSSL_NO_DTLS1
case OPT_DTLS:
case OPT_DTLS1:
case OPT_DTLS1_2:
case OPT_TIMEOUT:
case OPT_MTU:
#endif #endif
case OPT_EOF: case OPT_EOF:
case OPT_ERR: case OPT_ERR:

View File

@@ -997,7 +997,10 @@ int s_server_main(int argc, char *argv[])
char *CApath = NULL, *CAfile = NULL, *chCApath = NULL, *chCAfile = NULL; char *CApath = NULL, *CAfile = NULL, *chCApath = NULL, *chCAfile = NULL;
char *dhfile = NULL, *dpassarg = NULL, *dpass = NULL, *inrand = NULL; char *dhfile = NULL, *dpassarg = NULL, *dpass = NULL, *inrand = NULL;
char *passarg = NULL, *pass = NULL, *vfyCApath = NULL, *vfyCAfile = NULL; char *passarg = NULL, *pass = NULL, *vfyCApath = NULL, *vfyCAfile = NULL;
char *crl_file = NULL, *prog, *p; char *crl_file = NULL, *prog;
#ifndef OPENSSL_NO_PSK
char *p;
#endif
const char *unix_path = NULL; const char *unix_path = NULL;
#ifndef NO_SYS_UN_H #ifndef NO_SYS_UN_H
int unlink_unix_path = 0; int unlink_unix_path = 0;
@@ -1046,6 +1049,18 @@ int s_server_main(int argc, char *argv[])
prog = opt_init(argc, argv, s_server_options); prog = opt_init(argc, argv, s_server_options);
while ((o = opt_next()) != OPT_EOF) { while ((o = opt_next()) != OPT_EOF) {
switch (o) { switch (o) {
#ifdef OPENSSL_NO_PSK
case OPT_PSK_HINT:
case OPT_PSK:
#endif
#ifdef OPENSSL_NO_DTLS1
case OPT_DTLS:
case OPT_DTLS1:
case OPT_DTLS1_2:
case OPT_TIMEOUT:
case OPT_MTU:
case OPT_CHAIN:
#endif
case OPT_EOF: case OPT_EOF:
case OPT_ERR: case OPT_ERR:
opthelp: opthelp:

View File

@@ -67,7 +67,6 @@
#include <openssl/txt_db.h> #include <openssl/txt_db.h>
#include <openssl/buffer.h> #include <openssl/buffer.h>
#include <openssl/srp.h> #include <openssl/srp.h>
#include "apps.h" #include "apps.h"
# define BASE_SECTION "srp" # define BASE_SECTION "srp"