Skip to content

Commit b41c0d3

Browse files
committed
Merged pull request #668
2 parents 0fc2923 + a140e61 commit b41c0d3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

config.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ if test "$MONGODB" != "no"; then
295295
AC_SUBST(MONGOC_ENABLE_SSL, 1)
296296
AC_SUBST(MONGOC_ENABLE_CRYPTO_LIBCRYPTO, 1)
297297
AC_SUBST(MONGOC_ENABLE_SSL_OPENSSL, 1)
298+
299+
AC_CHECK_DECLS([ASN1_STRING_get0_data], [AC_SUBST(MONGOC_HAVE_ASN1_STRING_GET0_DATA, 1)], [AC_SUBST(MONGOC_HAVE_ASN1_STRING_GET0_DATA, 1)], [[#include <openssl/asn1.h>]])
298300
])
299301

300302
if test "$PHP_SYSTEM_CIPHERS" != "no"; then

config.w32

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ if (PHP_MONGODB != "no") {
170170
/* PHP 7.1.2 introduced SETUP_OPENSSL(), which supports OpenSSL 1.1.x. Earlier
171171
* versions will use the legacy check for OpenSSL 1.0.x and lower. */
172172
if (typeof SETUP_OPENSSL === 'function') {
173-
mongoc_ssl_found = SETUP_OPENSSL("mongodb", mongoc_ssl_path_to_check) > 0;
173+
openssl_type = SETUP_OPENSSL("mongodb", mongoc_ssl_path_to_check);
174+
mongoc_ssl_found = openssl_type > 0;
175+
if (openssl_type >= 2) {
176+
mongoc_opts.MONGOC_HAVE_ASN1_STRING_GET0_DATA = 1;
177+
}
174178
} else if (CHECK_LIB("ssleay32.lib", "mongodb", mongoc_ssl_path_to_check) &&
175179
CHECK_LIB("libeay32.lib", "mongodb", mongoc_ssl_path_to_check) &&
176180
CHECK_LIB("crypt32.lib", "mongodb", mongoc_ssl_path_to_check) &&

0 commit comments

Comments
 (0)