This commit is contained in:
Dengke Tang
2023-03-22 15:34:55 -07:00
parent 2744f5ca94
commit 517bdbd055
2 changed files with 13 additions and 3 deletions
+11
View File
@@ -16,8 +16,19 @@ ifneq (OFF,$(USE_OPENSSL))
ifneq (ON,$(USE_OPENSSL))
CMAKE_PREFIX_PATH=-DCMAKE_PREFIX_PATH=$(USE_OPENSSL)
endif
else
# Hide symbols from libcrypto.a
# This avoids problems when an application ends up using both libcrypto.a and libcrypto.so.
#
# An example of this happening is the aws-c-io tests.
# All the C libs are compiled statically, but then a PKCS#11 library is
# loaded at runtime which happens to use libcrypto.so from OpenSSL.
# If the symbols from libcrypto.a aren't hidden, then SOME function calls use the libcrypto.a implementation
# and SOME function calls use the libcrypto.so implementation, and this mismatch leads to weird crashes.
EXTRA_LDFLAGS="-Wl,--exclude-libs,libcrypto.a"
endif
CMAKE_CONFIGURE = $(CMAKE) \
-DCMAKE_SOURCE_DIR=$(srcdir) \
-DCMAKE_BINARY_DIR=$(CMAKE_BUILD_DIR) \
+2 -3
View File
@@ -105,10 +105,9 @@ the system default php.
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
## Knowning OpenSSL related issue (Unix only)
## Known OpenSSL related issue (Unix only)
* With php5.5 and openssl-3.0.2, signing functions will not work
* When your php loads a different version of openssl than your system openssl version, awscrt may fail to load.
* When your php loads a different version of openssl than your system openssl version, awscrt may fail to load or weirdly crash. You can find the openssl version php linked via: `php -i | grep 'OpenSSL'`, and awscrt linked from the build log, which will be `Found OpenSSL: * (found version *)`
The easiest workaround to those issue is to build from source and get aws-lc as libscrypto for awscrt to depend on instead of your local openssl. Same instructions as [here](#building-from-github-source), but use `USE_OPENSSL=OFF make` instead of `make`