diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2016-03-18 19:02:17 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-05-18 10:44:08 +0100 |
commit | bde136c89f87b66d49e9d03e3b34c68b6b1d1e26 (patch) | |
tree | 9614f7e40c5d06dac817df5cfe9cf8d8d7a831cd /apps/s_server.c | |
parent | d2dfd4820bf03b958bc9c3adafe0d3f112e54b2a (diff) |
Few cleanups in s_client, s_server apps.
Discard useless static engine_id
Add a const qualifier
Fix some spelling
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps/s_server.c')
-rw-r--r-- | apps/s_server.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index 3e1e1ae686..dd12475869 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -146,9 +146,6 @@ static int async = 0; static unsigned int split_send_fragment = 0; static unsigned int max_pipelines = 0; -#ifndef OPENSSL_NO_ENGINE -static char *engine_id = NULL; -#endif static const char *session_id_prefix = NULL; #ifndef OPENSSL_NO_DTLS @@ -305,9 +302,6 @@ static void s_server_init(void) async = 0; split_send_fragment = 0; max_pipelines = 0; -#ifndef OPENSSL_NO_ENGINE - engine_id = NULL; -#endif } static int local_argc = 0; @@ -919,12 +913,12 @@ OPTIONS s_server_options[] = { #ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, #endif - {NULL} + {NULL, OPT_EOF, 0, NULL} }; int s_server_main(int argc, char *argv[]) { - ENGINE *e = NULL; + ENGINE *engine = NULL; EVP_PKEY *s_key = NULL, *s_dkey = NULL; SSL_CONF_CTX *cctx = NULL; const SSL_METHOD *meth = TLS_server_method(); @@ -1396,7 +1390,7 @@ int s_server_main(int argc, char *argv[]) session_id_prefix = opt_arg(); break; case OPT_ENGINE: - e = setup_engine(opt_arg(), 1); + engine = setup_engine(opt_arg(), 1); break; case OPT_RAND: inrand = opt_arg(); @@ -1502,7 +1496,7 @@ int s_server_main(int argc, char *argv[]) goto end; if (nocert == 0) { - s_key = load_key(s_key_file, s_key_format, 0, pass, e, + s_key = load_key(s_key_file, s_key_format, 0, pass, engine, "server certificate private key file"); if (!s_key) { ERR_print_errors(bio_err); @@ -1523,7 +1517,7 @@ int s_server_main(int argc, char *argv[]) } if (tlsextcbp.servername) { - s_key2 = load_key(s_key_file2, s_key_format, 0, pass, e, + s_key2 = load_key(s_key_file2, s_key_format, 0, pass, engine, "second server certificate private key file"); if (!s_key2) { ERR_print_errors(bio_err); @@ -1582,7 +1576,7 @@ int s_server_main(int argc, char *argv[]) s_dkey_file = s_dcert_file; s_dkey = load_key(s_dkey_file, s_dkey_format, - 0, dpass, e, "second certificate private key file"); + 0, dpass, engine, "second certificate private key file"); if (!s_dkey) { ERR_print_errors(bio_err); goto end; |