-
-#ifdef OPENSSL_IS_BORINGSSL
-////////////////////////////////////////////////////////////////////////////////
-// APIs needed in BoringSSL only
-////////////////////////////////////////////////////////////////////////////////
-int SSL_CTX_set1_sigalgs_list(SSL_CTX*, const char*) {
- return 1; // 0 implies error
-}
-
-int TLS1_get_client_version(SSL* s) {
- // Note that this isn't the client version, and the API to
- // get this has been hidden. It may be found by parsing the
- // ClientHello (there is a callback via the SSL_HANDSHAKE struct)
- return s->version;
-}
-
-#elif FOLLY_OPENSSL_IS_102 || FOLLY_OPENSSL_IS_101 || FOLLY_OPENSSL_IS_100
-////////////////////////////////////////////////////////////////////////////////
-// APIs needed in 1.0.2 and 1.0.1/1.0.0 (both deprecated)
-////////////////////////////////////////////////////////////////////////////////
-int SSL_CTX_up_ref(SSL_CTX* ctx) {
- return CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX);
-}
-
-int SSL_SESSION_up_ref(SSL_SESSION* session) {
- return CRYPTO_add(&session->references, 1, CRYPTO_LOCK_SSL_SESSION);
-}
-
-int X509_up_ref(X509* x) {
- return CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509);
-}
-
-#if FOLLY_OPENSSL_IS_101 || FOLLY_OPENSSL_IS_100
-////////////////////////////////////////////////////////////////////////////////
-// APIs needed in 1.0.1/1.0.0 (both deprecated)
-////////////////////////////////////////////////////////////////////////////////
-int X509_get_signature_nid(X509* cert) {
- return OBJ_obj2nid(cert->sig_alg->algorithm);
-}
-