From b2d6550179220e85a31645eb9708244d1ad1b456 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 5 Mar 2017 21:36:52 +0900 Subject: [PATCH] src: BoringSSL only requires CRYPTO_library_init --- src/ssl.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ssl.cc b/src/ssl.cc index 5c6de55a..9c28c7d8 100644 --- a/src/ssl.cc +++ b/src/ssl.cc @@ -154,15 +154,14 @@ bool check_http2_requirement(SSL *ssl) { void libssl_init() { #if OPENSSL_1_1_API // No explicit initialization is required. -#else // !OPENSSL_1_1_API -// OPENSSL_config() is not available in BoringSSL. -#if !defined(OPENSSL_IS_BORINGSSL) +#elif defined(OPENSSL_IS_BORINGSSL) + CRYPTO_library_init(); +#else // !OPENSSL_1_1_API && !defined(OPENSSL_IS_BORINGSSL) OPENSSL_config(nullptr); -#endif // !defined(OPENSSL_IS_BORINGSSL) SSL_load_error_strings(); SSL_library_init(); OpenSSL_add_all_algorithms(); -#endif // !OPENSSL_1_1_API +#endif // !OPENSSL_1_1_API && !defined(OPENSSL_IS_BORINGSSL) } int ssl_ctx_set_proto_versions(SSL_CTX *ssl_ctx, int min, int max) {