From 9c5c580189747398c04aa7892670b854aa5eb50f Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 6 Jul 2017 12:33:46 -0700 Subject: [PATCH] Define OPENSSL_NO_SSL2 under OpenSSL 1.1.0 Summary: OpenSSL 1.1.0 drops support for SSLv2, and in doing so also removes the define that user-code used to guard on whether SSLv2 was supported. This adds the define to the portability header to indicate SSLv2 is not supported. Reviewed By: anirudhvr Differential Revision: D5376869 fbshipit-source-id: 04708db138dc13e7747cfff582f4cfed291648b3 --- folly/portability/OpenSSL.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/folly/portability/OpenSSL.h b/folly/portability/OpenSSL.h index 9e1241e6..624cf6e2 100644 --- a/folly/portability/OpenSSL.h +++ b/folly/portability/OpenSSL.h @@ -146,6 +146,10 @@ bool RSA_set0_key(RSA* r, BIGNUM* n, BIGNUM* e, BIGNUM* d); // Note: this was a type and has been fixed upstream, so the next 1.1.0 // minor version upgrade will need to remove this #define OPENSSL_lh_new OPENSSL_LH_new + +// OpenSSL v1.1.0 removed support for SSLv2, and also removed the define that +// indicates it isn't supported. +#define OPENSSL_NO_SSL2 #endif } } -- 2.34.1