[php-src] Issue #8430: openssl.c - ignores opensslconf.h & fails to link
| From: | fsbruva | Date: | Sat, 23 Apr 2022 15:10:29 +0000 |
| Subject: | [php-src] Issue #8430: openssl.c - ignores opensslconf.h & fails to link | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-241194@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8430
Author: fsbruva
### Description
If openssl 1.1.1n is configured & built with any combination of the
Configure
[no-<cipher> ...] options:
```
no-md2
no-md4
no-md5
no-rmd160
```
While building php 8.0.18, linking results in this output (or similar):
```
ld: error: undefined symbol: EVP_md4
>>> referenced by openssl.c
>>> ext/openssl/openssl.o:(php_openssl_get_evp_md_from_algo)
>>> did you mean: EVP_md5
>>> defined in: /usr/local/lib/libcrypto.so
```
But I expected this output instead:
```
Build complete.
Don't forget to run 'make test'.
```
This has two causes. First is that the existing precompiler test for MD2 merely checks for the
presence of the include/openssl/md2.h file, rather than the actual capabilities of the compiled
library. The second cause is that openssl.c does not consult include/openssl/opensslconf.h for the
other listed options. I have a patch, and will submit a PR once I get the bug number.
### PHP Version
8.0.18
### Operating System
FreeBSD 12.3-RELEASE