summaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2018-03-21 16:01:24 -0400
committerRich Salz <rsalz@openssl.org>2018-03-21 16:15:50 -0400
commit1fb6b0bf3e895c6b30f9c95a23284f93e4fa19b0 (patch)
tree291b42ebcad064e05d004c37dcb7b98ff50a3505 /apps/s_server.c
parentab0a3914a64d8f1fce22795c02269e1288df52b1 (diff)
Unify s_client/s_server srtp profiles option handling
Add missing guards around STRP-related fields Remove two unneeded global variables: my 2'cents to #4679 Merge definition and instantiation of srpsrvparm global. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4908)
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index bfa1345e6c..9b5106d02f 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -236,6 +236,7 @@ typedef struct srpsrvparm_st {
SRP_VBASE *vb;
SRP_user_pwd *user;
} srpsrvparm;
+static srpsrvparm srp_callback_parm;
/*
* This callback pretends to require some asynchronous logic in order to
@@ -722,13 +723,6 @@ static int not_resumable_sess_cb(SSL *s, int is_forward_secure)
return is_forward_secure;
}
-#ifndef OPENSSL_NO_SRP
-static srpsrvparm srp_callback_parm;
-#endif
-#ifndef OPENSSL_NO_SRTP
-static char *srtp_profiles = NULL;
-#endif
-
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_ENGINE,
OPT_4, OPT_6, OPT_ACCEPT, OPT_PORT, OPT_UNIX, OPT_UNLINK, OPT_NACCEPT,
@@ -1024,6 +1018,7 @@ int s_server_main(int argc, char *argv[])
char *srpuserseed = NULL;
char *srp_verifier_file = NULL;
#endif
+ char *srtp_profiles = NULL;
int min_version = 0, max_version = 0, prot_opt = 0, no_prot_opt = 0;
int s_server_verify = SSL_VERIFY_NONE;
int s_server_session_id_context = 1; /* anything will do */
@@ -1529,9 +1524,7 @@ int s_server_main(int argc, char *argv[])
alpn_in = opt_arg();
break;
case OPT_SRTP_PROFILES:
-#ifndef OPENSSL_NO_SRTP
srtp_profiles = opt_arg();
-#endif
break;
case OPT_KEYMATEXPORT:
keymatexportlabel = opt_arg();