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://" . __DIR__ . "/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            [x] => %a
26            [y] => %a
27            [d] => %a
28        )
29
30    [type] => 3
31)
32