⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keygentls.php

📁 vpn虚拟专用网络的一个开源搭建工具
💻 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 + -