dn
privkey
privkey
should be set to a private key that was previously generated by openssl_pkey_new() (or otherwise obtained from the other openssl_pkey family of functions). The corresponding public portion of the key will be used to sign the CSR. configargs
configargs
configargs
behave as their equivalents in the openssl.conf, as listed in the table below. configargs key | type | openssl.conf equivalent | description |
---|---|---|---|
digest_alg | string | default_md | Digest method or signature hash, usually one of openssl_get_md_methods() |
x509_extensions | string | x509_extensions | Selects which extensions should be used when creating an x509 certificate |
req_extensions | string | req_extensions | Selects which extensions should be used when creating a CSR |
private_key_bits | integer | default_bits | Specifies how many bits should be used to generate a private key |
private_key_type | integer | none | Specifies the type of private key to create. This can be one of OPENSSL_KEYTYPE_DSA , OPENSSL_KEYTYPE_DH , OPENSSL_KEYTYPE_RSA or OPENSSL_KEYTYPE_EC . The default value is OPENSSL_KEYTYPE_RSA . |
encrypt_key | boolean | encrypt_key | Should an exported key (with passphrase) be encrypted? |
encrypt_key_cipher | integer | none | One of cipher constants. |
curve_name | string | none | One of openssl_get_curve_names(). |
config | string | N/A | Path to your own alternative openssl.conf file. |
extraattribs
extraattribs
is used to specify additional configuration options for the CSR. Both dn
and extraattribs
are associative arrays whose keys are converted to OIDs and applied to the relevant part of the request.