$OpenBSD$ Index: src/mongo/util/net/ssl_manager_openssl.cpp --- src/mongo/util/net/ssl_manager_openssl.cpp.orig +++ src/mongo/util/net/ssl_manager_openssl.cpp @@ -238,18 +238,6 @@ IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(ASN1_SEQUE #endif // MONGO_CONFIG_NEEDS_ASN1_ANY_DEFINITIONS // clang-format on -#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ - (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) -// Copies of OpenSSL after 1.1.0 define new functions for interaction with -// X509 and DH structures. We must polyfill used definitions to interact with older OpenSSL -// versions. -const STACK_OF(X509_EXTENSION) * X509_get0_extensions(const X509* peerCert) { - return peerCert->cert_info->extensions; -} -inline int X509_NAME_ENTRY_set(const X509_NAME_ENTRY* ne) { - return ne->set; -} - // On OpenSSL < 1.1.0, this chain isn't attached to // the SSL session, so we need it to dispose of itself. struct VerifiedChainDeleter { @@ -293,12 +281,6 @@ void DH_get0_pqg(const DH* dh, const BIGNUM** p, const *g = dh->g; } } -#else -// No-op deleter for OpenSSL >= 1.1.0 -struct VerifiedChainDeleter { - void operator()(STACK_OF(X509) * chain) {} -}; -#endif using UniqueVerifiedChainPolyfill = std::unique_ptr; UniqueVerifiedChainPolyfill SSLgetVerifiedChain(SSL* s) {