openssl_pkey_new() generates a new private and public
key pair. The public component of the key can be obtained using
You can finetune the key generation (such as specifying the number of
openssl_csr_new() for more information about
Note: You need to have a valid openssl.cnf installed for this function to operate correctly. See the notes under the installation section for more information.