Quite a few of the openssl functions require a key or a certificate parameter. Following methods may be used to get them:
Certificates
OpenSSL X.509
)
returned from openssl_x509_read()
-----BEGIN CERTIFICATE-----
Certificate Signing Requests (CSRs)
OpenSSL X.509 CSR
)
returned from openssl_csr_new()
-----BEGIN CERTIFICATE REQUEST-----
Public/Private Keys
OpenSSL key
)
returned from openssl_get_publickey() or
openssl_get_privatekey()
OpenSSL X.509
)
-----BEGIN PUBLIC KEY-----
array($key, $passphrase)
where $key represents a
key specified using the file:// or textual content notation above, and
$passphrase represents a string containing the passphrase for that
private key