EC key type not supported in this PHP build
| 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
Pull Requests
Pull requests:
History
AllCommentsChangesGit/SVN commits
[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