﻿{"id":1183,"date":"2014-04-25T01:09:29","date_gmt":"2014-04-24T17:09:29","guid":{"rendered":"http:\/\/nick.txtcc.com\/?p=1183"},"modified":"2014-07-05T01:06:12","modified_gmt":"2014-07-04T17:06:12","slug":"5%e5%88%86%e9%92%9f%e5%ae%8c%e6%88%90nginx-ssl%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/linux\/1183","title":{"rendered":"5\u5206\u949f\u5b8c\u6210nginx ssl\u914d\u7f6e"},"content":{"rendered":"<p><strong>1.\u51c6\u5907\u73af\u5883<\/strong><\/p>\n<p>\u4e0b\u8f7d<a href=\"http:\/\/pan.baidu.com\/share\/link?shareid=954115906&#038;uk=3003569915\" target=\"_blank\">openssl for windows<\/a><\/p>\n<p><strong>2.\u751f\u6210\u8bc1\u4e66<\/strong><\/p>\n<div id=\"\">\n<div>\n<div>Shell\u4ee3\u7801\u00a0\u00a0<a title=\"\u6536\u85cf\u8fd9\u6bb5\u4ee3\u7801\"><img decoding=\"async\" alt=\"\u6536\u85cf\u4ee3\u7801\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2014\/04\/1709292Rn.png\"><\/a><\/div>\n<\/div>\n<ol start=\"1\">\n    <li>openssl\u00a0genrsa\u00a0-des3\u00a0-out\u00a0openssl.key\u00a01024<\/li>\n    <li>\n    <li>openssl\u00a0req\u00a0-new\u00a0-x509\u00a0-key\u00a0openssl.key\u00a0-out\u00a0openssl.crt\u00a0-days\u00a03650<\/li>\n    <li>\n    <li>openssl\u00a0rsa\u00a0-in\u00a0openssl.key\u00a0-out\u00a0openssl_nopass.key<\/li>\n<\/ol>\n<\/div>\n<p>\u5177\u4f53\u64cd\u4f5c<\/p>\n<img loading=\"lazy\" decoding=\"async\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u59cb\u5927\u5c0f\u56fe\u7247\" alt=\"\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2014\/04\/170930k0F.png\" width=\"699\" height=\"303\" \/>\n<p>\u62a5\u9519 \uff1aUnable to load config info from \/usr\/local\/ssl\/openssl.cnf<\/p>\n<p>\u4e0b\u8f7d:\u00a0<a href=\"http:\/\/dl.iteye.com\/topics\/download\/4fa4e2a2-7e7d-3f66-a6b1-3332580d75c5\" target=\"_blank\">openssl.conf\u00a0<\/a>\u00a0\u4f7f\u7528\u53c2\u6570 -config openssl.conf \u6307\u5b9a<\/p>\n<p>&nbsp;<\/p>\n<p>\u8bc1\u4e66\u6587\u4ef6<\/p>\n<img decoding=\"async\" alt=\"\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2014\/04\/170930JLL.png\" \/>\n<p><strong>3.nginx \u914d\u7f6essl<\/strong><\/p>\n<img decoding=\"async\" alt=\"\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2014\/04\/170930Kad.png\" \/>\n<p><strong>4.\u9a8c\u8bc1\u7ed3\u679c<\/strong><\/p>\n<img loading=\"lazy\" decoding=\"async\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u59cb\u5927\u5c0f\u56fe\u7247\" alt=\"\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2014\/04\/170931N14.png\" width=\"700\" height=\"303\" \/>\n<p><strong>\u5b8c\u6210!\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>linux\u4e0ewindows\u914d\u7f6e\u5dee\u4e0d\u591a.<\/p>\n<p>&nbsp;<\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528openssl\u81ea\u8ba4\u8bc1\u8bc1\u4e66,\u5546\u7528\u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u673a\u6784\u8ba4\u8bc1<\/p>\n<p>openssl req -new -key openssl.key -out openssl.csr<\/p>\n<p><b>openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr<\/b><\/p>\n<p>openssl x509 -req -days 3650 -in openssl.csr -CA openssl.crt -CAkey openssl.key -CAcreateserial -out openssl.crt<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<pre># \u751f\u6210\u4e00\u4e2aRSA\u5bc6\u94a5 \n$ openssl genrsa -des3 -out 33iq.key 1024\n\n# \u62f7\u8d1d\u4e00\u4e2a\u4e0d\u9700\u8981\u8f93\u5165\u5bc6\u7801\u7684\u5bc6\u94a5\u6587\u4ef6\n$ openssl rsa -in 33iq.key -out 33iq_nopass.key\n\n# \u751f\u6210\u4e00\u4e2a\u8bc1\u4e66\u8bf7\u6c42\n$ openssl req -new -key 33iq.key -out 33iq.csr\n\n# \u81ea\u5df1\u7b7e\u53d1\u8bc1\u4e66\n$ openssl x509 -req -days 365 -in 33iq.csr -signkey 33iq.key -out 33iq.crt\n\n<\/pre>","protected":false},"excerpt":{"rendered":"<p>1.\u51c6\u5907\u73af\u5883 \u4e0b\u8f7dopenssl for windows 2.\u751f\u6210\u8bc1\u4e66 Shell\u4ee3\u7801\u00a0\u00a0 openssl\u00a0genrsa\u00a0-des3\u00a0-out\u00a0openssl.key\u00a01024 openssl\u00a0req&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[268,365],"class_list":["post-1183","post","type-post","status-publish","format-standard","hentry","category-linux","tag-nginx","tag-ssl"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=1183"}],"version-history":[{"count":5,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1183\/revisions"}],"predecessor-version":[{"id":1226,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1183\/revisions\/1226"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=1183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=1183"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=1183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}