#include <boost/noncopyable.hpp>
#include <errno.h>
#include <fcntl.h>
-#include <openssl/err.h>
-#include <openssl/asn1.h>
-#include <openssl/ssl.h>
#include <sys/types.h>
#include <chrono>
#include <folly/io/async/DelayedDestruction.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/ssl/OpenSSLPtrTypes.h>
+#include <folly/portability/OpenSSL.h>
#include <folly/portability/SysUio.h>
-#include <openssl/ssl.h>
-
constexpr bool kOpenSslModeMoveBufferOwnership =
#ifdef SSL_MODE_MOVE_BUFFER_OWNERSHIP
true
#include "SSLContext.h"
-#include <openssl/err.h>
-#include <openssl/rand.h>
-#include <openssl/ssl.h>
-#include <openssl/x509v3.h>
-
#include <folly/Format.h>
#include <folly/Memory.h>
#include <folly/Random.h>
#include <string>
#include <random>
-// This has to come before SSL.
-#include <folly/portability/OpenSSL.h>
-#include <folly/portability/Sockets.h>
-
-#include <openssl/ssl.h>
-#include <openssl/tls1.h>
-
#include <glog/logging.h>
#ifndef FOLLY_NO_CONFIG
#include <folly/Range.h>
#include <folly/io/async/ssl/OpenSSLPtrTypes.h>
#include <folly/io/async/ssl/OpenSSLUtils.h>
+#include <folly/portability/OpenSSL.h>
namespace folly {
#include <glog/logging.h>
-// This needs to be before any OpenSSL includes.
-#include <folly/portability/OpenSSL.h>
-
-#include <openssl/asn1.h>
-#include <openssl/bio.h>
-#include <openssl/bn.h>
-#ifndef OPENSSL_NO_EC
-#include <openssl/ec.h>
-#include <openssl/ecdsa.h>
-#endif
-#include <openssl/evp.h>
-#include <openssl/hmac.h>
-#include <openssl/rsa.h>
-#include <openssl/ssl.h>
-#include <openssl/x509.h>
-
#include <folly/Memory.h>
+#include <folly/portability/OpenSSL.h>
namespace folly {
namespace ssl {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <folly/io/async/ssl/OpenSSLUtils.h>
-#include <folly/ScopeGuard.h>
-#include <folly/portability/OpenSSL.h>
-#include <folly/portability/Sockets.h>
+
#include <glog/logging.h>
-#include <openssl/bio.h>
-#include <openssl/err.h>
-#include <openssl/rand.h>
-#include <openssl/ssl.h>
-#include <openssl/x509v3.h>
+
#include <unordered_map>
+#include <folly/ScopeGuard.h>
+#include <folly/portability/Sockets.h>
+
namespace {
#ifdef OPENSSL_IS_BORINGSSL
// BoringSSL doesn't (as of May 2016) export the equivalent
#include <folly/Range.h>
#include <folly/io/async/ssl/OpenSSLPtrTypes.h>
+#include <folly/portability/OpenSSL.h>
#include <folly/portability/Sockets.h>
-#include <openssl/ssl.h>
-#include <openssl/x509v3.h>
-
namespace folly {
namespace ssl {
#include <folly/io/async/ssl/SSLErrors.h>
#include <folly/portability/GTest.h>
-
-#include <openssl/err.h>
-#include <openssl/x509.h>
+#include <folly/portability/OpenSSL.h>
using namespace testing;
using namespace folly;
*/
#include <folly/io/async/test/AsyncSSLSocketTest.h>
-#include <signal.h>
-
#include <folly/SocketAddress.h>
+#include <folly/io/Cursor.h>
#include <folly/io/async/AsyncSSLSocket.h>
#include <folly/io/async/EventBase.h>
#include <folly/portability/GMock.h>
#include <folly/io/async/test/BlockingSocket.h>
#include <fcntl.h>
-#include <folly/io/Cursor.h>
-#include <openssl/bio.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/utsname.h>
+
#include <fstream>
#include <iostream>
#include <list>
#include <folly/io/async/AsyncSocketException.h>
#include <folly/io/async/ssl/SSLErrors.h>
-#include <folly/portability/GTest.h>
-#include <openssl/ssl.h>
+#include <folly/portability/GTest.h>
+#include <folly/portability/OpenSSL.h>
using namespace testing;
#include <folly/Portability.h>
+#include <openssl/opensslv.h>
+
+#include <openssl/asn1.h>
+#include <openssl/bio.h>
+#include <openssl/crypto.h>
#include <openssl/dh.h>
+#include <openssl/err.h>
#include <openssl/evp.h>
+#include <openssl/hmac.h>
+#include <openssl/rand.h>
+#include <openssl/rsa.h>
+#include <openssl/sha.h>
#include <openssl/ssl.h>
+#include <openssl/tls1.h>
#include <openssl/x509.h>
+#include <openssl/x509v3.h>
+
+#ifndef OPENSSL_NO_EC
+#include <openssl/ec.h>
+#include <openssl/ecdsa.h>
+#endif
// BoringSSL doesn't have notion of versioning although it defines
// OPENSSL_VERSION_NUMBER to maintain compatibility. The following variables are
* limitations under the License.
*/
#include <folly/ssl/OpenSSLCertUtils.h>
-#include <folly/String.h>
-#include <folly/io/async/ssl/OpenSSLPtrTypes.h>
-
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
#include <folly/ScopeGuard.h>
+#include <folly/String.h>
+#include <folly/io/async/ssl/OpenSSLPtrTypes.h>
namespace folly {
namespace ssl {
#include <string>
#include <vector>
-#include <openssl/x509.h>
-
#include <folly/Optional.h>
+#include <folly/portability/OpenSSL.h>
namespace folly {
namespace ssl {
#pragma once
-#include <folly/io/async/ssl/OpenSSLPtrTypes.h>
-#include <folly/portability/OpenSSL.h>
-#include <openssl/evp.h>
-#include <openssl/hmac.h>
-#include <openssl/sha.h>
-
#include <folly/Range.h>
#include <folly/io/IOBuf.h>
+#include <folly/io/async/ssl/OpenSSLPtrTypes.h>
+#include <folly/portability/OpenSSL.h>
namespace folly {
namespace ssl {
#include <folly/Conv.h>
#include <folly/portability/OpenSSL.h>
-#include <openssl/crypto.h>
-#include <openssl/opensslv.h>
-
// This is used to find the OpenSSL version at runtime. Just returning
// OPENSSL_VERSION_NUMBER is insufficient as runtime version may be different
// from the compile-time version
#include <folly/ssl/OpenSSLCertUtils.h>
-#include <openssl/bio.h>
-#include <openssl/evp.h>
-
#include <folly/Range.h>
#include <folly/String.h>
#include <folly/io/async/ssl/OpenSSLPtrTypes.h>