1--TEST--
2openssl_pkey_derive() X448
3--EXTENSIONS--
4openssl
5--SKIPIF--
6<?php if (!defined("OPENSSL_KEYTYPE_X448")) print "skip"; ?>
7--FILE--
8<?php
9
10$priv = openssl_pkey_get_private("-----BEGIN PRIVATE KEY-----
11MEYCAQAwBQYDK2VvBDoEOABW8gZe1+BFOHcZVBkfQzh3zmBiw6FXptYcDF7ojpt3
12FpYcdiiwj9ETnLHzDXBXxucgdfg866TM
13-----END PRIVATE KEY-----
14");
15
16$pub = openssl_pkey_get_details(openssl_pkey_get_private("-----BEGIN PRIVATE KEY-----
17MEYCAQAwBQYDK2VvBDoEOKSnpre4xISbWGaOu7URKR1lmr/p4diTP7rN7R/+hTv3
18l098WrtwPEBim4nNogxKVHs9z7lqm2LF
19-----END PRIVATE KEY-----
20"))["key"];
21
22echo bin2hex(openssl_pkey_derive($pub, $priv));
23echo "\n";
24?>
25--EXPECT--
26f57eea2028d773685334f3117d87d7f3b97d99373ff532a3ab50fbab8002c2e55bb4b39c11fc835d59e83d3d00c649e8566c013e0062fe9b
27