File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,16 @@ $d2 = openssl_pkey_get_details($key2);
35
35
// Compare array
36
36
var_dump ($ d1 === $ d2 );
37
37
38
+ // Check that the public key info is computed from the private key if it is missing.
39
+ $ d1_priv = $ d1 ;
40
+ unset($ d1_priv ["ec " ]["x " ]);
41
+ unset($ d1_priv ["ec " ]["y " ]);
42
+
43
+ $ key3 = openssl_pkey_new ($ d1_priv );
44
+ var_dump ($ key3 );
45
+ $ d3 = openssl_pkey_get_details ($ key3 );
46
+ var_dump ($ d1 === $ d3 );
47
+
38
48
$ dn = array (
39
49
"countryName " => "BR " ,
40
50
"stateOrProvinceName " => "Rio Grande do Sul " ,
@@ -95,6 +105,9 @@ bool(true)
95
105
object(OpenSSLAsymmetricKey)#%d (0) {
96
106
}
97
107
bool(true)
108
+ object(OpenSSLAsymmetricKey)#%d (0) {
109
+ }
110
+ bool(true)
98
111
Testing openssl_csr_new with key generation
99
112
NULL
100
113
object(OpenSSLAsymmetricKey)#%d (0) {
You can’t perform that action at this time.
0 commit comments