Arne Schwabe has uploaded this change for review. ( https://gerrit.openvpn.net/c/openvpn/+/2066?usp=email )
Change subject: Avoid polluting OpenSSL error stack for "none" cipher/digest ...................................................................... Avoid polluting OpenSSL error stack for "none" cipher/digest There is certain parts in OpenVPN where we check cipher_kt_mode_cbc for the cipher and also. This especially causes some cipher/digest not found when querying the "none" cipher or digest. Especially since AEAD ciphers use "none" internally as the HMAC algorithm. Change-Id: I3878195ceedd75a1a4ba6adcbffd1adbfda66e66 Signed-off-by: Arne Schwabe <[email protected]> --- M src/openvpn/crypto_openssl.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/66/2066/1 diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index e6abd8f..714e6c7 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -568,6 +568,13 @@ { ASSERT(ciphername); + /* For the "none" cipher we just immediately return NULL here to avoid + * putting errors on the OpenSSL error stack */ + if (!strcmp("none", ciphername)) + { + return NULL; + } + ciphername = translate_cipher_name_from_openvpn(ciphername); return EVP_CIPHER_fetch(NULL, ciphername, NULL); } @@ -979,6 +986,11 @@ static evp_md_type * md_get(const char *digest) { + /* Avoid pollution the OpenSSL error stack for the "none" dummy digest */ + if (!strcmp("none", digest)) + { + return NULL; + } evp_md_type *md = NULL; ASSERT(digest); md = EVP_MD_fetch(NULL, digest, NULL); -- To view, visit https://gerrit.openvpn.net/c/openvpn/+/2066?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I3878195ceedd75a1a4ba6adcbffd1adbfda66e66 Gerrit-Change-Number: 2066 Gerrit-PatchSet: 1 Gerrit-Owner: Arne Schwabe <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
