diff options
Diffstat (limited to 'src/lib/libssl/ssl_seclevel.c')
| -rw-r--r-- | src/lib/libssl/ssl_seclevel.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/lib/libssl/ssl_seclevel.c b/src/lib/libssl/ssl_seclevel.c index b9c724e262..4ccd957689 100644 --- a/src/lib/libssl/ssl_seclevel.c +++ b/src/lib/libssl/ssl_seclevel.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_seclevel.c,v 1.21 2022/07/07 13:04:39 tb Exp $ */ | 1 | /* $OpenBSD: ssl_seclevel.c,v 1.22 2022/07/07 17:08:28 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2020 Theo Buehler <tb@openbsd.org> |
| 4 | * | 4 | * |
| @@ -229,8 +229,11 @@ ssl_security(const SSL *ssl, int secop, int bits, int nid, void *other) | |||
| 229 | int | 229 | int |
| 230 | ssl_security_sigalg_check(const SSL *ssl, const EVP_PKEY *pkey) | 230 | ssl_security_sigalg_check(const SSL *ssl, const EVP_PKEY *pkey) |
| 231 | { | 231 | { |
| 232 | return ssl_security(ssl, SSL_SECOP_SIGALG_CHECK, | 232 | int bits; |
| 233 | EVP_PKEY_security_bits(pkey), 0, NULL); | 233 | |
| 234 | bits = EVP_PKEY_security_bits(pkey); | ||
| 235 | |||
| 236 | return ssl_security(ssl, SSL_SECOP_SIGALG_CHECK, bits, 0, NULL); | ||
| 234 | } | 237 | } |
| 235 | 238 | ||
| 236 | int | 239 | int |
| @@ -272,14 +275,21 @@ ssl_security_supported_cipher(const SSL *ssl, SSL_CIPHER *cipher) | |||
| 272 | int | 275 | int |
| 273 | ssl_ctx_security_dh(const SSL_CTX *ctx, DH *dh) | 276 | ssl_ctx_security_dh(const SSL_CTX *ctx, DH *dh) |
| 274 | { | 277 | { |
| 275 | return ssl_ctx_security(ctx, SSL_SECOP_TMP_DH, DH_security_bits(dh), 0, | 278 | int bits; |
| 276 | dh); | 279 | |
| 280 | bits = DH_security_bits(dh); | ||
| 281 | |||
| 282 | return ssl_ctx_security(ctx, SSL_SECOP_TMP_DH, bits, 0, dh); | ||
| 277 | } | 283 | } |
| 278 | 284 | ||
| 279 | int | 285 | int |
| 280 | ssl_security_dh(const SSL *ssl, DH *dh) | 286 | ssl_security_dh(const SSL *ssl, DH *dh) |
| 281 | { | 287 | { |
| 282 | return ssl_security(ssl, SSL_SECOP_TMP_DH, DH_security_bits(dh), 0, dh); | 288 | int bits; |
| 289 | |||
| 290 | bits = DH_security_bits(dh); | ||
| 291 | |||
| 292 | return ssl_security(ssl, SSL_SECOP_TMP_DH, bits, 0, dh); | ||
| 283 | } | 293 | } |
| 284 | 294 | ||
| 285 | static int | 295 | static int |
