diff options
author | tb <> | 2022-07-07 17:08:28 +0000 |
---|---|---|
committer | tb <> | 2022-07-07 17:08:28 +0000 |
commit | 0f81b27a837a0e86c8aea447eff19040d47151ce (patch) | |
tree | 8a2a946a9462cbb866898427e5cffaf696959449 | |
parent | f7277e127cd34eb2dc81ee25bd005d8768bafe25 (diff) | |
download | openbsd-0f81b27a837a0e86c8aea447eff19040d47151ce.tar.gz openbsd-0f81b27a837a0e86c8aea447eff19040d47151ce.tar.bz2 openbsd-0f81b27a837a0e86c8aea447eff19040d47151ce.zip |
Use a local bits variable to avoid ugly line break due to nested function
calls.
ok jsing
-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 |