Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions UPGRADE-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ UPGRADE FROM 1.x to 2.0
* The constructor of `MongoDB\BSON\UTCDateTime` no longer accepts a `string`
argument. To pass 64-bit integers on 32-bit platforms, use the
`MongoDB\BSON\Int64` class instead.
* The `--with-openssl-dir` configure option has been removed. If using OpenSSL,
ensure that it is detected by `pkg-config`.
Copy link
Member Author

@jmikola jmikola Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that we never added a warning when using the option in 1.x. Opened PHPC-2452 and #1677 to address that.

17 changes: 3 additions & 14 deletions scripts/autotools/libmongoc/CheckSSL.m4
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ fi

PHP_MONGODB_VALIDATE_ARG([PHP_MONGODB_SSL], [auto openssl libressl darwin no])

PHP_ARG_WITH([openssl-dir],
[deprecated option for OpenSSL library path],
[AS_HELP_STRING([--with-openssl-dir=@<:@auto/DIR@:>@],
[MongoDB: OpenSSL library path (deprecated for pkg-config) [default=auto]])],
[auto],
[no])

AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
found_openssl="no"

Expand All @@ -50,13 +43,10 @@ AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
unset OPENSSL_INCDIR
unset OPENSSL_LIBDIR

dnl Use a list of directories from PHP_SETUP_OPENSSL by default.
dnl Support documented "auto" and older, undocumented "yes" options
if test "$PHP_OPENSSL_DIR" = "auto" -o "$PHP_OPENSSL_DIR" = "yes"; then
PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
fi
dnl Use a list of directories from PHP_SETUP_OPENSSL by default.
OPENSSL_SEARCH_PATHS="/usr/local/ssl /usr/local /usr /usr/local/openssl"

for i in $PHP_OPENSSL_DIR; do
for i in $OPENSSL_SEARCH_PATHS; do
if test -r $i/include/openssl/evp.h; then
OPENSSL_INCDIR="$i/include"
fi
Expand All @@ -76,7 +66,6 @@ AS_IF([test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"],[
[have_crypto_lib="no"],
[$OPENSSL_LIBDIR_LDFLAG])


dnl Check whether OpenSSL >= 1.1.0 is available
PHP_CHECK_LIBRARY([ssl],
[OPENSSL_init_ssl],
Expand Down