I want to learn OpenSSL but I’m just getting boolean false when I am trying to use this code:
$config = array('private_key_bits' => 512);
$privKey = openssl_pkey_new($config);
var_dump($privKey);
The OpenSSL extension is activated on my server. Have I missed something?
Use openssl_error_string() after your openssl_* function is called:
On my Windows it outputs:
See the first note at this function openssl_pkey_new():