openssl_csr_sign

Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Sign a CSR with another certificate (or itself) and generate a certificate
openssl_csr_sign(¬†¬†¬†¬†OpenSSLCertificateSigningRequest|string $csr,¬†¬†¬†¬†OpenSSLCertificate|string|null $ca_certificate,¬†¬†¬†¬†OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key,¬†¬†¬†¬†int $days,¬†¬†¬†¬†?array $options null,¬†¬†¬†¬†int $serial 0): OpenSSLCertificate|false
$privkey openssl_pkey_new();

$cert openssl_csr_new($dn$privkey);

$cert openssl_csr_sign($certnull$privkey3650);




openssl_x509_export($cert$out);