Define OPENSSL_NO_SSL2 under OpenSSL 1.1.0
authorChristopher Dykes <cdykes@fb.com>
Thu, 6 Jul 2017 19:33:46 +0000 (12:33 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 6 Jul 2017 19:42:13 +0000 (12:42 -0700)
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

index 9e1241e6b5b4dba9080857c36024ea53d4a7bb97..624cf6e2f6c3a95e1f885d39a6ec36fd3afab4dc 100644 (file)
@@ -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
 }
 }