1--TEST-- 2openssl_pkey_get_details() with EC key 3--SKIPIF-- 4<?php 5if (!extension_loaded("openssl")) die("skip"); 6if (!defined('OPENSSL_KEYTYPE_EC')) die("skip no EC available"); 7?> 8--FILE-- 9<?php 10$key = openssl_pkey_get_private('file://' . dirname(__FILE__) . '/private_ec.key'); 11 12print_r(openssl_pkey_get_details($key)); 13?> 14--EXPECTF-- 15Array 16( 17 [bits] => 256 18 [key] => -----BEGIN PUBLIC KEY-----%a 19-----END PUBLIC KEY----- 20 21 [ec] => Array 22 ( 23 [curve_name] => prime256v1 24 [curve_oid] => 1.2.840.10045.3.1.7 25 ) 26 27 [type] => 3 28) 29