<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[运维进行时]]></title> 
<link>https://blog.liuts.com/index.php</link> 
<description><![CDATA[互联网运维与架构]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[运维进行时]]></copyright>
<item>
<link>https://blog.liuts.com/post//</link>
<title><![CDATA[生成apache证书(https应用)]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[Apache]]></category>
<pubDate>Tue, 14 Aug 2007 13:44:26 +0000</pubDate> 
<guid>https://blog.liuts.com/post//</guid> 
<description>
<![CDATA[ 
	# cd /usr/local/apache2/conf<br/># tar zxvf ssl.ca-0.1.tar.gz<br/># cd ssl.ca-0.1<br/><span style="color: #0000FF;"><strong>生成根证书：</strong></span><br/># ./new-root-ca.sh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (生成根证书)<br/>No Root CA key round. Generating one<br/>Generating RSA private key, 1024 bit long modulus<br/>...........................++++++<br/>....++++++<br/>e is 65537 (0x10001)<br/>Enter pass phrase for ca.key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(输入一个密码)<br/>Verifying - Enter pass phrase for ca.key:&nbsp;&nbsp;(再输入一次密码)<br/>......<br/>Self-sign the root CA...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (签署根证书)<br/>Enter pass phrase for ca.key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(输入刚刚设置的密码)<br/>........<br/>........&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (下面开始签署)<br/>Country Name (2 letter code) [MY]:CN<br/>State or Province Name (full name) [Perak]:HaiNan<br/>Locality Name (eg, city) [Sitiawan]:HaiKou<br/>Organization Name (eg, company) [My Directory Sdn Bhd]:Wiscom System Co.,Ltd<br/>Organizational Unit Name (eg, section) [Certification Services Division]:ACSTAR<br/>Common Name (eg, MD Root CA) []:WISCOM CA<br/>Email Address []:acmail@wiscom.com.cn<br/><br/>这样就生成了ca.key和ca.crt两个文件，下面还要为我们的服务器生成一个证书：<br/><span style="color: #0000FF;"><strong>生成server证书：</strong></span><br/># ./new-server-cert.sh server&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(这个证书的名字是server)<br/>......<br/>......<br/>Country Name (2 letter code) [MY]:CN<br/>State or Province Name (full name) [Perak]:HaiNan<br/>Locality Name (eg, city) [Sitiawan]:HaiKou<br/>Organization Name (eg, company) [My Directory Sdn Bhd]:Wiscom System Co.,Ltd<br/>Organizational Unit Name (eg, section) [Secure Web Server]:ACSTAR<br/>Common Name (eg, www.domain.com) []:acmail.wiscom.com.cn<br/>Email Address []:acmail@wiscom.com.cn<br/><br/>这样就生成了server.csr和server.key这两个文件。<br/><span style="color: #0000FF;"><strong>签署server证书：</strong></span><br/># ./sign-server-cert.sh server<br/>CA signing: server.csr -> server.crt:<br/>Using configuration from ca.config<br/>Enter pass phrase for ./ca.key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (输入上面设置的根证书密码)<br/>Check that the request matches the signature<br/>Signature ok<br/>The Subject's Distinguished Name is as follows<br/>countryName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :PRINTABLE:'CN'<br/>stateOrProvinceName&nbsp;&nbsp; :PRINTABLE:'JiangSu'<br/>localityName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:PRINTABLE:'NanJing'<br/>organizationName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:PRINTABLE:'Wiscom System Co.,Ltd'<br/>organizationalUnitName:PRINTABLE:'ACSTAR'<br/>commonName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:PRINTABLE:'acmail.wiscom.com.cn'<br/>emailAddress&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:IA5STRING:'acmail@wiscom.com.cn'<br/>Certificate is to be certified until Jul 16 12:55:34 2005 GMT (365 days)<br/>Sign the certificate? [y/n]:y<br/>1 out of 1 certificate requests certified, commit? [y/n]y<br/>Write out database with 1 new entries<br/>Data Base Updated<br/>CA verifying: server.crt <-> CA cert<br/>server.crt: OK<br/> (如果这里出现错误，最好重新来过，删除ssl.ca-0.1这个目录，从解压缩处重新开始。)<br/><br/>下面要按照ssl.conf里面的设置，将证书放在适当的位置。<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"># chmod 400 server.key<br/># cd ..<br/># mkdir ssl.key<br/># mv ssl.ca-0.1/server.key ssl.key<br/># mkdir ssl.crt<br/># mv ssl.ca-0.1/server.crt ssl.crt</div></div><br/>然后就可以启动啦！<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"># cd /usr/local/apache2<br/># ./bin/apachectl startssl</div></div><br/>Tags - <a href="https://blog.liuts.com/tags/apache/" rel="tag">apache</a> , <a href="https://blog.liuts.com/tags/https/" rel="tag">https</a> , <a href="https://blog.liuts.com/tags/%25E8%25AF%2581%25E4%25B9%25A6/" rel="tag">证书</a>
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post//#blogcomment</link>
<title><![CDATA[[评论] 生成apache证书(https应用)]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://blog.liuts.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>