Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl.c - ignores opensslconf.h & fails to link #8430

Closed
fsbruva opened this issue Apr 23, 2022 · 1 comment
Closed

openssl.c - ignores opensslconf.h & fails to link #8430

fsbruva opened this issue Apr 23, 2022 · 1 comment

Comments

@fsbruva
Copy link
Contributor

fsbruva commented Apr 23, 2022

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

fsbruva added a commit to fsbruva/php-src that referenced this issue Apr 23, 2022
If openssl is configured and compiled without one or more of the subject
ciphers using the no-<cipher> option, then building php will fail during
linking due to undefined symbol(s). Remove pre-compiler directive based on
presence of md2.h file, and add pre-compiler directives to check the openssl
configuration options within opensslconf.h.

Fixes php#8430
Lex-2008 pushed a commit to Lex-2008/buildscripts that referenced this issue Jul 19, 2022
no-md2
no-md4
no-md5
no-rmd160

according to php/php-src#8430
Lex-2008 pushed a commit to Lex-2008/buildscripts that referenced this issue Jul 21, 2022
also remove no-ssl from solaris

Note that:

PHP doesn't work without these:

no-md2
no-md4
no-md5
no-rmd160

according to php/php-src#8430

And also no-ec:

php/php-src#9064
vpodzime pushed a commit to Lex-2008/buildscripts that referenced this issue Aug 2, 2022
also remove no-asm from solaris

Note that:

PHP doesn't work without these:

no-md2
no-md4
no-md5
no-rmd160

according to php/php-src#8430

And also no-ec:

php/php-src#9064
vpodzime pushed a commit to Lex-2008/buildscripts that referenced this issue Aug 2, 2022
also remove no-asm from solaris

Note that:

PHP doesn't work without these:

no-md2
no-md4
no-md5
no-rmd160

according to php/php-src#8430

And also no-ec:

php/php-src#9064
Lex-2008 pushed a commit to Lex-2008/buildscripts that referenced this issue Aug 19, 2022
also remove no-asm from solaris

Note that:

PHP doesn't work without these:

no-md2
no-md4
no-md5
no-rmd160

according to php/php-src#8430

And also no-ec:

php/php-src#9064
Lex-2008 pushed a commit to Lex-2008/buildscripts that referenced this issue Sep 12, 2022
also remove no-asm from solaris

Note that:

PHP doesn't work without these:

no-md2
no-md4
no-md5
no-rmd160

according to php/php-src#8430

And also no-ec:

php/php-src#9064
Lex-2008 pushed a commit to Lex-2008/buildscripts that referenced this issue Sep 12, 2022
Also, store all openssl config flags in dedicated files, to be stored
centrally and used on all platforms.

Also run configdata.pm --dump to show enabled features

Also note that this removes no-asm from solaris

Ticket: ENT-8933

Note that PHP doesn't work without: md2 md4 md5 rmd160, according to
php/php-src#8430

And also without ec, according to
php/php-src#9064
Lex-2008 pushed a commit to Lex-2008/buildscripts that referenced this issue Sep 21, 2022
Also, store all openssl config flags in dedicated files, to be stored
centrally and used on all platforms.

Also run configdata.pm --dump to show enabled features

Also note that this removes no-asm from solaris

Ticket: ENT-8933

Note that PHP doesn't work without: md2 md4 md5 rmd160, according to
php/php-src#8430

And also without ec, according to
php/php-src#9064
Lex-2008 pushed a commit to Lex-2008/buildscripts that referenced this issue Sep 22, 2022
Also, store all openssl config flags in dedicated files, to be stored
centrally and used on all platforms.

Also run configdata.pm --dump to show enabled features

Also note that this removes no-asm from solaris

Ticket: ENT-8933

Note that PHP doesn't work without: md2 md4 md5 rmd160, according to
php/php-src#8430

And also without ec, according to
php/php-src#9064
@bukka bukka closed this as completed in fa1b6ab Oct 22, 2022
@bukka
Copy link
Member

bukka commented Oct 22, 2022

Fixed except no-md5 which was removed in OpenSSL 1.1.0. It actually did not even work with OpenSSL 1.0.2. And we still have default MD5 alg for SPKI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@bukka @fsbruva @Girgias and others