📄 keygentls.php
字号:
<?
$dn = array(
"countryName" => 'IT',
"stateOrProvinceName" => 'Alessandria',
"localityName" => 'Cassine',
"organizationName" => 'Lupin',
"organizationalUnitName" => 'Whatever',
"commonName" => 'Lupin',
"emailAddress" => 'kiss@my.ass'
);
$privkeypass = '1234';
$numberofdays = 365;
$privkey = openssl_pkey_new();
$csr = openssl_csr_new($dn, $privkey);
$sscert = openssl_csr_sign($csr, null, $privkey, $numberofdays);
openssl_x509_export($sscert, $publickey);
openssl_pkey_export($privkey, $privatekey, $privkeypass);
openssl_csr_export($csr, $csrStr);
//echo $privatekey; // Will hold the exported PriKey
//echo $publickey; // Will hold the exported PubKey
//echo $csrStr; // Will hold the exported Certificate
echo "
<PRE>Private Key:
\n$privatekey
\nPublic Key:
\n$publickey
\nCertificate Signing Request:
\n$csrStr
\n</PRE>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -