diff options
author | tb <> | 2024-01-04 20:02:10 +0000 |
---|---|---|
committer | tb <> | 2024-01-04 20:02:10 +0000 |
commit | 9b0d7f74716797d98c976afcf9e6f70430df0931 (patch) | |
tree | c02708455e0436d0a8d703564fc0da294ce837a8 /src | |
parent | f2a7290c2bb7399b90fac477d310553dc6fdf435 (diff) | |
download | openbsd-9b0d7f74716797d98c976afcf9e6f70430df0931.tar.gz openbsd-9b0d7f74716797d98c976afcf9e6f70430df0931.tar.bz2 openbsd-9b0d7f74716797d98c976afcf9e6f70430df0931.zip |
Remove last external call to EVP_PKEY_meth_find()
In order to determine whether GOST is properly enabled, libssl has various
weird dances. In this specific case, it calls EVP_PKEY_meth_find() to see
whether the relevant cipher is around. Check the same thing with an #ifdef
instead.
ok jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/ssl_ciph.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c index 38ebea1629..cea4d3e6f4 100644 --- a/src/lib/libssl/ssl_ciph.c +++ b/src/lib/libssl/ssl_ciph.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_ciph.c,v 1.137 2023/11/19 15:51:49 tb Exp $ */ | 1 | /* $OpenBSD: ssl_ciph.c,v 1.138 2024/01/04 20:02:10 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 | * |
@@ -142,6 +142,7 @@ | |||
142 | 142 | ||
143 | #include <stdio.h> | 143 | #include <stdio.h> |
144 | 144 | ||
145 | #include <openssl/evp.h> | ||
145 | #include <openssl/objects.h> | 146 | #include <openssl/objects.h> |
146 | #include <openssl/opensslconf.h> | 147 | #include <openssl/opensslconf.h> |
147 | 148 | ||
@@ -655,10 +656,10 @@ ssl_cipher_get_disabled(unsigned long *mkey, unsigned long *auth, | |||
655 | * algorithms. If they are not available disable the associated | 656 | * algorithms. If they are not available disable the associated |
656 | * authentication and key exchange algorithms. | 657 | * authentication and key exchange algorithms. |
657 | */ | 658 | */ |
658 | if (EVP_PKEY_meth_find(NID_id_GostR3410_2001) == NULL) { | 659 | #if defined(OPENSSL_NO_GOST) || !defined(EVP_PKEY_GOSTR01) |
659 | *auth |= SSL_aGOST01; | 660 | *auth |= SSL_aGOST01; |
660 | *mkey |= SSL_kGOST; | 661 | *mkey |= SSL_kGOST; |
661 | } | 662 | #endif |
662 | 663 | ||
663 | #ifdef SSL_FORBID_ENULL | 664 | #ifdef SSL_FORBID_ENULL |
664 | *enc |= SSL_eNULL; | 665 | *enc |= SSL_eNULL; |