diff options
author | Matt Caswell <matt@openssl.org> | 2015-12-15 10:43:44 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-12-15 11:26:38 +0000 |
commit | 8caab744f5698ed2b55eca20f032540f713327fd (patch) | |
tree | 595b532b5149361b2a71decd6ecafdcbf1964142 /apps/s_cb.c | |
parent | 73cd6175b970fa63c9c70d769febd91f3c7b5cdd (diff) | |
download | openssl-8caab744f5698ed2b55eca20f032540f713327fd.tar.gz |
Fix s_server problem with no-ec
s_server was trying to set the ECDH curve when no-ec was defined. This also
highlighted the fact that the -no_ecdhe option to s_server is broken, and
doesn't make any sense any more (ECDHE is on by default and the only way it
can be disabled is through the cipherstring). Therefore this commit removes
the option.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'apps/s_cb.c')
-rw-r--r-- | apps/s_cb.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/apps/s_cb.c b/apps/s_cb.c index 7a4bf297cc..0a9616655f 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -1195,7 +1195,7 @@ void print_ssl_summary(SSL *s) } int config_ctx(SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, - SSL_CTX *ctx, int no_ecdhe, int no_jpake) + SSL_CTX *ctx, int no_jpake) { int i; @@ -1203,9 +1203,6 @@ int config_ctx(SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, for (i = 0; i < sk_OPENSSL_STRING_num(str); i += 2) { const char *flag = sk_OPENSSL_STRING_value(str, i); const char *arg = sk_OPENSSL_STRING_value(str, i + 1); - /* If no_ecdhe or named curve already specified don't need a default. */ - if (!no_ecdhe && strcmp(flag, "-named_curve") == 0) - no_ecdhe = 1; #ifndef OPENSSL_NO_JPAKE if (!no_jpake && (strcmp(flag, "-cipher") == 0)) { BIO_puts(bio_err, "JPAKE sets cipher to PSK\n"); @@ -1222,18 +1219,6 @@ int config_ctx(SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, return 0; } } - /* - * This is a special case to keep existing s_server functionality: if we - * don't have any curve specified *and* we haven't disabled ECDHE then - * use P-256. - */ - if (!no_ecdhe) { - if (SSL_CONF_cmd(cctx, "-named_curve", "P-256") <= 0) { - BIO_puts(bio_err, "Error setting EC curve\n"); - ERR_print_errors(bio_err); - return 0; - } - } #ifndef OPENSSL_NO_JPAKE if (!no_jpake) { if (SSL_CONF_cmd(cctx, "-cipher", "PSK") <= 0) { |