diff options
author | tb <> | 2022-06-29 08:30:04 +0000 |
---|---|---|
committer | tb <> | 2022-06-29 08:30:04 +0000 |
commit | eba7e5662aacc7be4c98c01cb78204ee337e99ef (patch) | |
tree | 9bc7960741c35d37a08c36dd66b06fc316e04c94 /src/lib/libssl/s3_lib.c | |
parent | d514ed3f0a5ed2d924983d4533a179823bf09ca0 (diff) | |
download | openbsd-eba7e5662aacc7be4c98c01cb78204ee337e99ef.tar.gz openbsd-eba7e5662aacc7be4c98c01cb78204ee337e99ef.tar.bz2 openbsd-eba7e5662aacc7be4c98c01cb78204ee337e99ef.zip |
Also check the security level of the 'tmp dh'
ok beck jsing
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r-- | src/lib/libssl/s3_lib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 624841a7a4..b4ad11dc6e 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_lib.c,v 1.228 2022/03/17 17:24:37 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.229 2022/06/29 08:30:04 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -1706,6 +1706,11 @@ _SSL_set_tmp_dh(SSL *s, DH *dh) | |||
1706 | return 0; | 1706 | return 0; |
1707 | } | 1707 | } |
1708 | 1708 | ||
1709 | if (!ssl_security_dh(s, dh)) { | ||
1710 | SSLerror(s, SSL_R_DH_KEY_TOO_SMALL); | ||
1711 | return 0; | ||
1712 | } | ||
1713 | |||
1709 | if ((dhe_params = DHparams_dup(dh)) == NULL) { | 1714 | if ((dhe_params = DHparams_dup(dh)) == NULL) { |
1710 | SSLerror(s, ERR_R_DH_LIB); | 1715 | SSLerror(s, ERR_R_DH_LIB); |
1711 | return 0; | 1716 | return 0; |
@@ -2138,6 +2143,11 @@ _SSL_CTX_set_tmp_dh(SSL_CTX *ctx, DH *dh) | |||
2138 | return 0; | 2143 | return 0; |
2139 | } | 2144 | } |
2140 | 2145 | ||
2146 | if (!ssl_ctx_security_dh(ctx, dh)) { | ||
2147 | SSLerrorx(SSL_R_DH_KEY_TOO_SMALL); | ||
2148 | return 0; | ||
2149 | } | ||
2150 | |||
2141 | if ((dhe_params = DHparams_dup(dh)) == NULL) { | 2151 | if ((dhe_params = DHparams_dup(dh)) == NULL) { |
2142 | SSLerrorx(ERR_R_DH_LIB); | 2152 | SSLerrorx(ERR_R_DH_LIB); |
2143 | return 0; | 2153 | return 0; |