php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66501 EC key type not supported in this PHP build
Submitted: 2014-01-16 20:42 UTC Modified: 2014-02-15 04:49 UTC
From: php-mark at zedwood dot com Assigned: rdlowrey (profile)
Status: Closed Package: OpenSSL related
PHP Version: 5.5.8 OS: Ubuntu 12.04
Private report: No CVE-ID: None
 [2014-01-16 20:42 UTC] php-mark at zedwood dot com
Description:
------------
I get this error:

PHP Warning:  openssl_sign(): key type not supported in this PHP build! in /home/mjones/orange.php on line 7


Test script:
---------------
<?php
exec('openssl ecparam -genkey -text -name prime256v1 -out example-ecc.key');
exec('openssl req -new -key example-ecc.key -sha384 -out example-ecc.csr -subj "/C=US/O=x/CN=test"');

$data ='alpha';
$key = openssl_pkey_get_private("file://example-ecc.key");
$res = openssl_sign($data, $sign, $key, 'ecdsa-with-SHA1');
echo base64_encode($sign)."\n";


Expected result:
----------------
MEUCIHIqeyYqn0qzFEqAfhS2eJp1RHcHAd6FebfMoadZ3oRyAiEArZTEqgtDhCQEinrBWZE2MQ0vvyRyX8MmspPGK0ZQ+wg=

Actual result:
--------------
PHP Warning:  openssl_sign(): key type not supported in this PHP build! in /home/mjones/orange.php on line 7
MEUCIHIqeyYqn0qzFEqAfhS2eJp1RHcHAd6FebfMoadZ3oRyAiEArZTEqgtDhCQEinrBWZE2MQ0vvyRyX8MmspPGK0ZQ+wg=

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-15 04:48 UTC] rdlowrey@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: rdlowrey
 [2014-02-15 04:48 UTC] rdlowrey@php.net
This fix is now merged into the 5.4, 5.5, 5.6 and master branches.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC