Add OpenSSL portability layer
authorAnirudh Ramachandran <avr@fb.com>
Thu, 29 Dec 2016 02:54:04 +0000 (18:54 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 29 Dec 2016 03:03:37 +0000 (19:03 -0800)
commit87659d07c32268836a18c5ccafb60612b8ffbdd4
tree1c6afbc02b69c3f6f784f50210f531a833f828df
parentec5f59cf16844e37c3915f9df69099bba63062b1
Add OpenSSL portability layer

Summary:
Enable folly to build with OpenSSL alternatives (e.g., BoringSSL).

Some SSL-related tests are disabled:

 - Async session cache ones (BoringSSL has an async cache impl but with a different API)
 - TFO tests
 - Some changes to error tests which expect specific error strings. This is
   flaky as a test because it will break everytime even within a version, so we
   should fix that first.

This should be a noop for OpenSSL 1.0.2.

BoringSSL commit used is 35c8afd3143289c99aa3820e01950c564d7aced8 (10/26/2016)

Closes: https://github.com/facebook/folly/issues/198
Reviewed By: siyengar

Differential Revision: D3280382

fbshipit-source-id: 4141d992e0d8dd797ac4af479cfe90844a23278f
15 files changed:
folly/Makefile.am
folly/io/async/AsyncSSLSocket.cpp
folly/io/async/SSLContext.cpp
folly/io/async/SSLContext.h
folly/io/async/ssl/OpenSSLUtils.cpp
folly/io/async/ssl/test/SSLErrorsTest.cpp
folly/io/async/test/AsyncSSLSocketTest.cpp
folly/io/async/test/AsyncSSLSocketTest.h
folly/io/async/test/AsyncSSLSocketTest2.cpp
folly/portability/OpenSSL.cpp [new file with mode: 0644]
folly/portability/OpenSSL.h [new file with mode: 0644]
folly/ssl/OpenSSLVersionFinder.h [new file with mode: 0644]
folly/ssl/SSLSession.h
folly/ssl/detail/OpenSSLVersionFinder.h [deleted file]
folly/ssl/detail/SSLSessionImpl.cpp