Bug #75219 [Com]: openssl_pkey_new does not work with libressl

From: Date: Fri, 29 Sep 2017 12:31:48 +0000
Subject: Bug #75219 [Com]: openssl_pkey_new does not work with libressl
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211451@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75219&edit=1 ID: 75219 Comment by: peterkokot at gmail dot com Reported by: chingis at wodby dot com Summary: openssl_pkey_new does not work with libressl Status: Closed Type: Bug Package: OpenSSL related Operating System: Alpine 3.6 PHP Version: 7.1.9 Block user comment: N Private report: N New Comment: Good. to know. I've added pull request also to main Alpine PHP repository here: https://github.com/alpinelinux/aports/pull/2410 so this gets solved also in the Alpine packages. Previous Comments: ------------------------------------------------------------------------ [2017-09-29 03:12:22] chingis at wodby dot com Closing it. ------------------------------------------------------------------------ [2017-09-29 03:11:54] chingis at wodby dot com Yes, you're right, I expected libressl/openssl to be installed in the official php image. Reported https://github.com/docker-library/php/issues/494. Thank you. ------------------------------------------------------------------------ [2017-09-29 00:20:55] peterkokot at gmail dot com As it seems the issue is that some openssl_* functions require to have a file openssl.cnf. Possible quick fixes: 1.) apk add --no-cache libressl or 2.) mkdir -p /etc/ssl/ && touch /etc/ssl/openssl.cnf There should be added either a patch in the php-src if the openssl.cnf file is not present or a patch in the Alpine repositories (additional dependency for the php7-openssl package - libressl) ------------------------------------------------------------------------ [2017-09-18 07:03:09] chingis at wodby dot com Description: ------------ Function openssl_pkey_new does not work with libressl (2.5.5) on Alpine Linux (3.6) Test script: --------------- $rsa_key = openssl_pkey_new([ 'private_key_bits' => 1024, 'private_key_type' => OPENSSL_KEYTYPE_RSA ]); if (!$rsa_key) { throw new RuntimeException(openssl_error_string()); } echo 'OK', PHP_EOL; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75219&edit=1

« previous php.bugs (#211451) next »