aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStevie Graham <[email protected]>2018-07-26 14:27:07 +0100
committerStevie Graham <[email protected]>2018-08-01 15:39:17 +0100
commit209d778c494d66445326bb3da4232f567298327a (patch)
tree3c37c3aa1394c0b169b7d7fd68d522f25639c785
parent6a98a4b05ae77739d27f2a9fb018786906e6918c (diff)
downloadotp-209d778c494d66445326bb3da4232f567298327a.tar.gz
otp-209d778c494d66445326bb3da4232f567298327a.tar.bz2
otp-209d778c494d66445326bb3da4232f567298327a.zip
Fixes ERL-675
RSA options rsa_mgf1_md, rsa_oaep_md, and rsa_oaep_label do not work. PR #838, which reimplemented various parts of the crypto application to use OpenSSL EVP APIs was merged manually. During the manual merge the macro define for HAVE_RSA_OAEP_MD was lost. The result being that setting rsa_mgf1_md and rsa_oaep_md for any other value than sha causes the nif to return not_sup. Support for configurable MGF1 digests and OAEP labels is available in OpenSSL version 1.1.0, a cursory look at libressl does not seem to reveal support, so it is not added in this PR. The defective functionality has been returned by defining HAVE_RSA_OAEP_MD alongside HAVE_CHACHA20_POLY1305, i.e. OpenSSL >= 1.1.0 and NOT libressl.
-rw-r--r--lib/crypto/c_src/crypto.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 6eeebb67a2..2fa1082dbb 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -179,6 +179,7 @@
#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
# ifndef HAS_LIBRESSL
# define HAVE_CHACHA20_POLY1305
+# define HAVE_RSA_OAEP_MD
# endif
#endif