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