Bug #80368 [Com]: OpenSSL extension fails to build against LibreSSL due to lack of OCB support

From: Date: Sat, 28 Nov 2020 13:51:55 +0000
Subject: Bug #80368 [Com]: OpenSSL extension fails to build against LibreSSL due to lack of OCB support
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230694@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80368&edit=1

 ID:                 80368
 Comment by:         izorkin at elven dot pw
 Reported by:        izorkin at elven dot pw
 Summary:            OpenSSL extension fails to build against LibreSSL
                     due to lack of OCB support
 Status:             Closed
 Type:               Bug
 Package:            OpenSSL related
 Operating System:   NixOS 20.09
 PHP Version:        8.0.0RC4
 Block user comment: N
 Private report:     N

 New Comment:

Patch not working:

/build/php-src-8.0.0/ext/openssl/openssl.c: In function 'php_openssl_load_cipher_mode':
/build/php-src-8.0.0/ext/openssl/openssl.c:6892:8: error: 'EVP_CIPH_OCB_MODE' undeclared
(first use in this function); did you mean 'EVP_CIPH_OFB_MODE'?
 6892 |   case EVP_CIPH_OCB_MODE:
      |        ^~~~~~~~~~~~~~~~~
      |        EVP_CIPH_OFB_MODE
/build/php-src-8.0.0/ext/openssl/openssl.c:6892:8: note: each undeclared identifier is reported only
once for each function it appears in
/build/php-src-8.0.0/ext/openssl/openssl.c:6900:30: error: 'EVP_CTRL_AEAD_GET_TAG'
undeclared (first use in this function); did you mean 'EVP_CTRL_CCM_GET_TAG'?
 6900 |    mode->aead_get_tag_flag = EVP_CTRL_AEAD_GET_TAG;
      |                              ^~~~~~~~~~~~~~~~~~~~~
      |                              EVP_CTRL_CCM_GET_TAG
/build/php-src-8.0.0/ext/openssl/openssl.c:6901:30: error: 'EVP_CTRL_AEAD_SET_TAG'
undeclared (first use in this function); did you mean 'EVP_CTRL_GCM_SET_TAG'?
 6901 |    mode->aead_set_tag_flag = EVP_CTRL_AEAD_SET_TAG;
      |                              ^~~~~~~~~~~~~~~~~~~~~
      |                              EVP_CTRL_GCM_SET_TAG
/build/php-src-8.0.0/ext/openssl/openssl.c:6902:28: error: 'EVP_CTRL_AEAD_SET_IVLEN'
undeclared (first use in this function); did you mean 'EVP_CTRL_GCM_SET_IVLEN'?
 6902 |    mode->aead_ivlen_flag = EVP_CTRL_AEAD_SET_IVLEN;
      |                            ^~~~~~~~~~~~~~~~~~~~~~~
      |                            EVP_CTRL_GCM_SET_IVLEN
make: *** [Makefile:799: ext/openssl/openssl.lo] Error 1
make: *** Waiting for unfinished jobs....


Previous Comments:
------------------------------------------------------------------------
[2020-11-27 09:58:57] nikic@php.net

Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=0f579fd7c8171cb0f7ecc8db912933df450f3861
Log: Fixed bug #80368

------------------------------------------------------------------------
[2020-11-27 09:45:50] alex at ozo dot com

I filed an libressl-portable upstream bug report about this issue here: https://github.com/libressl-portable/portable/issues/642

------------------------------------------------------------------------
[2020-11-27 09:19:11] alex at ozo dot com

Greetings, I am on a 32bit gentoo rolling release system with libressl-3.3.0 & gnutls-3.6.15

I got this exact error when emerging/compiling php-7.4.13


it would be cool to have a workaround solution until libressl addresses this issue

------------------------------------------------------------------------
[2020-11-15 13:28:40] cmb@php.net

Proper support for OCB mode has recently been added[1], and this
requires OpenSSL >= 1.1.  However, we're assuming that LibreSSL
>= 2.7 supports everything that OpenSSL >= 1.1 supports[2], what
is obviously not the case for EVP support for OCB mode.

[1] <https://github.com/php/php-src/pull/6337>
[2] <https://github.com/php/php-src/blob/php-8.0.0RC4/ext/openssl/php_openssl.h#L31-L35>

------------------------------------------------------------------------
[2020-11-14 09:01:00] izorkin at elven dot pw

Description:
------------
Error build openssl extension with libressl 3.1.4
Output error:
/build/php-src-8.0.0-rc-4/ext/openssl/openssl.c: In function
'php_openssl_load_cipher_mode':
/build/php-src-8.0.0-rc-4/ext/openssl/openssl.c:6906:8: error: 'EVP_CIPH_OCB_MODE'
undeclared (first use in this function); did you mean 'EVP_CIPH_OFB_MODE'?
 6906 |   case EVP_CIPH_OCB_MODE:
      |        ^~~~~~~~~~~~~~~~~
      |        EVP_CIPH_OFB_MODE
/build/php-src-8.0.0-rc-4/ext/openssl/openssl.c:6906:8: note: each undeclared identifier is reported
only once for each function it appears in
/build/php-src-8.0.0-rc-4/ext/openssl/openssl.c:6914:30: error: 'EVP_CTRL_AEAD_GET_TAG'
undeclared (first use in this function); did you mean 'EVP_CTRL_CCM_GET_TAG'?
 6914 |    mode->aead_get_tag_flag = EVP_CTRL_AEAD_GET_TAG;
      |                              ^~~~~~~~~~~~~~~~~~~~~
      |                              EVP_CTRL_CCM_GET_TAG
/build/php-src-8.0.0-rc-4/ext/openssl/openssl.c:6915:30: error: 'EVP_CTRL_AEAD_SET_TAG'
undeclared (first use in this function); did you mean 'EVP_CTRL_GCM_SET_TAG'?
 6915 |    mode->aead_set_tag_flag = EVP_CTRL_AEAD_SET_TAG;
      |                              ^~~~~~~~~~~~~~~~~~~~~
      |                              EVP_CTRL_GCM_SET_TAG
/build/php-src-8.0.0-rc-4/ext/openssl/openssl.c:6916:28: error: 'EVP_CTRL_AEAD_SET_IVLEN'
undeclared (first use in this function); did you mean 'EVP_CTRL_GCM_SET_IVLEN'?
 6916 |    mode->aead_ivlen_flag = EVP_CTRL_AEAD_SET_IVLEN;
      |                            ^~~~~~~~~~~~~~~~~~~~~~~
      |                            EVP_CTRL_GCM_SET_IVLEN
make: *** [Makefile:798: ext/openssl/openssl.lo] Error 1
make: *** Waiting for unfinished jobs....



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80368&edit=1


Thread (10 messages)

« previous php.bugs (#230694) next »