Bug #66501 [NEW]: EC key type not supported in this PHP build

From: Date: Thu, 16 Jan 2014 20:42:06 +0000
Subject: Bug #66501 [NEW]: EC key type not supported in this PHP build
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183850@lists.php.net to get a copy of this message
From:             php-mark at zedwood dot com
Operating system: Ubuntu 12.04
PHP version:      5.5.8
Package:          OpenSSL related
Bug Type:         Bug
Bug description:EC key type not supported in this PHP build

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=

-- 
Edit bug report at https://bugs.php.net/bug.php?id=66501&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=66501&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=66501&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=66501&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=66501&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=66501&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=66501&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=66501&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=66501&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=66501&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=66501&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=66501&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=66501&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=66501&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66501&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=66501&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=66501&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=66501&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66501&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=66501&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=66501&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#183850) next »