summaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-10-14 17:30:17 +0100
committerMatt Caswell <matt@openssl.org>2020-11-18 14:14:52 +0000
commit9912be1b33bf2a65672d70ad75e07e0d63d33df3 (patch)
tree557eafa0fc7ec953d0453c3078f2bec2f29935a7 /apps/s_server.c
parent8b7df247b7538e97133c50aaf27813d30677f729 (diff)
Remove deprecated functionality from s_server
This will be added back in by a later commit Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13368)
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index cd76ababe0..18d0fad174 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -2048,12 +2048,16 @@ int s_server_main(int argc, char *argv[])
if (dh == NULL) {
SSL_CTX_set_dh_auto(ctx, 1);
- } else if (!SSL_CTX_set_tmp_dh(ctx, dh)) {
+ }
+# ifndef OPENSSL_NO_DEPRECATED_3_0
+ /* TODO(3.0): We need a 3.0 friendly way of doing this */
+ else if (!SSL_CTX_set_tmp_dh(ctx, dh)) {
BIO_puts(bio_err, "Error setting temp DH parameters\n");
ERR_print_errors(bio_err);
DH_free(dh);
goto end;
}
+# endif
if (ctx2 != NULL) {
if (!dhfile) {
@@ -2068,12 +2072,16 @@ int s_server_main(int argc, char *argv[])
}
if (dh == NULL) {
SSL_CTX_set_dh_auto(ctx2, 1);
- } else if (!SSL_CTX_set_tmp_dh(ctx2, dh)) {
+ }
+# ifndef OPENSSL_NO_DEPRECATED_3_0
+ /* TODO(3.0): We need a 3.0 friendly way of doing this */
+ else if (!SSL_CTX_set_tmp_dh(ctx2, dh)) {
BIO_puts(bio_err, "Error setting temp DH parameters\n");
ERR_print_errors(bio_err);
DH_free(dh);
goto end;
}
+# endif
}
DH_free(dh);
}
@@ -3006,6 +3014,8 @@ static void print_connection_info(SSL *con)
#ifndef OPENSSL_NO_DH
static DH *load_dh_param(const char *dhfile)
{
+# ifndef OPENSSL_NO_DEPRECATED_3_0
+ /* TODO(3.0): Use a decoder for this */
DH *ret = NULL;
BIO *bio;
@@ -3015,6 +3025,9 @@ static DH *load_dh_param(const char *dhfile)
err:
BIO_free(bio);
return ret;
+# else
+ return NULL;
+# endif
}
#endif