{"id":203,"date":"2017-11-14T00:48:27","date_gmt":"2017-11-13T16:48:27","guid":{"rendered":"https:\/\/damogame.cn\/?p=203"},"modified":"2019-06-25T19:51:28","modified_gmt":"2019-06-25T11:51:28","slug":"ssl%e4%b8%ad%ef%bc%8c%e5%85%ac%e9%92%a5%e3%80%81%e7%a7%81%e9%92%a5%e3%80%81%e8%af%81%e4%b9%a6%e7%9a%84%e5%90%8e%e7%bc%80%e5%90%8d%e9%83%bd%e6%98%af%e4%ba%9b%e5%95%a5%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/203","title":{"rendered":"SSL\u4e2d\uff0c\u516c\u94a5\u3001\u79c1\u94a5\u3001\u8bc1\u4e66\u7684\u540e\u7f00\u540d\u90fd\u662f\u4e9b\u5565\uff1f"},"content":{"rendered":"<div data-zop-question=\"{&quot;title&quot;:&quot;SSL\u4e2d\uff0c\u516c\u94a5\u3001\u79c1\u94a5\u3001\u8bc1\u4e66\u7684\u540e\u7f00\u540d\u90fd\u662f\u4e9b\u5565\uff1f&quot;,&quot;topics&quot;:[{&quot;name&quot;:&quot;\u6280\u672f&quot;,&quot;id&quot;:&quot;19550912&quot;},{&quot;name&quot;:&quot;SSL&quot;,&quot;id&quot;:&quot;19567919&quot;},{&quot;name&quot;:&quot;SSL \u8bc1\u4e66&quot;,&quot;id&quot;:&quot;19568370&quot;},{&quot;name&quot;:&quot;Nginx&quot;,&quot;id&quot;:&quot;19574050&quot;},{&quot;name&quot;:&quot;Apache Tomcat&quot;,&quot;id&quot;:&quot;19584682&quot;}],&quot;id&quot;:29620953,&quot;isEditable&quot;:false}\" data-reactid=\"59\" data-za-module=\"QuestionItem\" data-za-module-info=\"{&quot;card&quot;:{&quot;content&quot;:{&quot;type&quot;:&quot;Question&quot;,&quot;token&quot;:&quot;29620953&quot;}}}\">\n<div class=\"QuestionHeader\" data-reactid=\"61\" data-za-module=\"QuestionDescription\" data-za-module-info=\"{&quot;card&quot;:{&quot;content&quot;:{&quot;type&quot;:&quot;Question&quot;,&quot;token&quot;:&quot;29620953&quot;}}}\">\n<div class=\"QuestionHeader-content\" data-reactid=\"62\">\n<div class=\"QuestionHeader-main\" data-reactid=\"63\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"Question-main\" data-reactid=\"179\">\n<div class=\"Question-mainColumn\" data-reactid=\"180\">\n<div data-reactid=\"181\">\n<div id=\"QuestionAnswers-answers\" class=\"QuestionAnswers-answers\" data-zop-feedlistmap=\"0,0,1,0\" data-reactid=\"182\" data-za-module=\"ContentList\" data-za-module-info=\"{&quot;card&quot;:{&quot;content&quot;:null}}\">\n<div class=\"Card\" data-reactid=\"183\">\n<div class=\"List\" data-reactid=\"184\">\n<div data-reactid=\"199\">\n<div class=\"List-item\" data-reactid=\"200\">\n<div class=\"ContentItem AnswerItem\" data-za-index=\"0\" data-zop=\"{&quot;authorName&quot;:&quot;\u5218\u957f\u5143&quot;,&quot;itemId&quot;:45012411,&quot;title&quot;:&quot;SSL\u4e2d\uff0c\u516c\u94a5\u3001\u79c1\u94a5\u3001\u8bc1\u4e66\u7684\u540e\u7f00\u540d\u90fd\u662f\u4e9b\u5565\uff1f&quot;,&quot;type&quot;:&quot;answer&quot;}\" data-reactid=\"201\" data-za-module=\"AnswerItem\" data-za-module-info=\"{&quot;card&quot;:{&quot;has_image&quot;:false,&quot;has_video&quot;:false,&quot;content&quot;:{&quot;type&quot;:&quot;Answer&quot;,&quot;token&quot;:&quot;45012411&quot;,&quot;upvote_num&quot;:42,&quot;comment_num&quot;:11,&quot;publish_timestamp&quot;:null,&quot;parent_token&quot;:&quot;29620953&quot;,&quot;author_member_hash_id&quot;:&quot;994c9c675c1e9be05e2fe98c041ce820&quot;}}}\">\n<div class=\"ContentItem-meta\" data-reactid=\"202\">\n<div class=\"AnswerItem-meta AnswerItem-meta--related\" data-reactid=\"203\">\n<div class=\"AnswerItem-extraInfo\" data-reactid=\"225\">\u7eaf\u7cb9\u4e2a\u4eba\u7406\u89e3\uff0c\u56e0\u4e3aSSL\u672c\u8eab\u786e\u5b9e\u6bd4\u8f83\u590d\u6742\uff0c\u6b22\u8fce\u7ea0\u6b63\u3002<\/div>\n<\/div>\n<\/div>\n<div class=\"RichContent RichContent--unescapable\" data-reactid=\"236\">\n<div class=\"RichContent-inner\" data-reactid=\"237\"><span class=\"RichText CopyrightRichText-richText\" data-reactid=\"238\"><span class=\"RichText CopyrightRichText-richText\" data-reactid=\"238\">\u6211\u628aSSL\u7cfb\u7edf\u6bd4\u55bb\u4e3a\u5de5\u5546\u5c40\u7cfb\u7edf\u3002<br \/>\n\u9996\u5148\u6709SSL\u5c31\u6709CA\uff0ccertificate authority\u3002\u8bc1\u4e66\u5c40\uff0c\u7528\u4e8e\u5236\u4f5c\u3001\u8ba4\u8bc1\u8bc1\u4e66\u7684\u7b2c\u4e09\u65b9\u673a\u6784\uff0c\u6211\u4eec\u5047\u8bbe\u8425\u4e1a\u6267\u7167\u975e\u5e38\u96be\u5236\u4f5c\uff0c\u5c31\u50cf\u8eab\u4efd\u8bc1\u4e00\u6837\uff0c\u9700\u8981\u6709\u5236\u8bc1\u516c\u53f8\u6765\u63d0\u4f9b\uff0c\u5e76\u4e14\u63d0\u4f9b\u6280\u672f\u5e2e\u52a9\u5de5\u5546\u5c40\u9a8c\u8bc1\u6267\u7167\u7684\u771f\u4f2a\u3002<br \/>\n\u7136\u540eCA\u662f\u53ef\u4ee5\u6709\u591a\u4e2a\u7684\uff0c\u4e5f\u5c31\u662f\u53ef\u4ee5\u6709\u591a\u4e2a\u5236\u8bc1\u516c\u53f8\uff0c\u4f46\u5de5\u5546\u5c40\u5c31\u53ea\u6709\u4e00\u4e2a\uff0c\u5b83\u6765\u8bf4\u90a3\u4e2a\u5236\u8bc1\u516c\u53f8\u662f\u53ef\u4fe1\u7684\uff0c\u90a3\u4e9b\u662f\u5047\u7684\uff0c\u9700\u8981\u6253\u51fb\u3002\u5728SSL\u7684\u4e16\u754c\u4e2d\uff0c\u5fae\u8f6f\u3001Google\u548cMozilla\u626e\u6f14\u4e86\u4e00\u90e8\u5206\u8fd9\u4e2a\u89d2\u8272\u3002\u4e5f\u5c31\u662f\u8bf4\uff0cIE\u3001Chrome\u3001Firefox\u4e2d\u5185\u7f6e\u6709\u4e00\u4e9bCA\uff0c\u7ecf\u8fc7\u8fd9\u4e9bCA\u9881\u53d1\uff0c\u9a8c\u8bc1\u8fc7\u7684\u8bc1\u4e66\u90fd\u662f\u53ef\u4ee5\u4fe1\u7684\uff0c\u5426\u5219\u5c31\u4f1a\u63d0\u793a\u4f60\u4e0d\u5b89\u5168\u3002<br \/>\n\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u524d\u51e0\u5929Chrome\u51b3\u5b9a\u5c4f\u853dCNNIC\u7684CA\u65f6\uff0cCNNIC\u90a3\u4e48\u9057\u61be\u4e86\u3002<br \/>\n\u4e5f\u56e0\u4e3a\u5185\u7f6e\u7684CA\u662f\u76f8\u5bf9\u56fa\u5b9a\u7684\uff0c\u6240\u4ee5\u5f53\u4f60\u51b3\u5b9a\u8981\u65b0\u5efa\u7f51\u7ad9\u65f6\uff0c\u5c31\u9700\u8981\u8d2d\u4e70\u8fd9\u4e9b\u5185\u7f6eCA\u9881\u53d1\u7684\u8bc1\u4e66\u6765\u8ba9\u7528\u6237\u770b\u5230\u4f60\u7684\u57df\u540d\u524d\u9762\u662f\u7eff\u8272\u7684\uff0c\u800c\u4e0d\u662f\u7ea2\u8272\u3002\u800c\u8fd9\u4e2a\u6700\u5927\u7684\u5356\u8bc1\u4e66\u7684\u516c\u53f8\u5c31\u662fVeriSign\u5982\u679c\u4f60\u542c\u8bf4\u8fc7\u7684\u8bdd\uff0c\u5f53\u7136\u5b83\u88ab\u5356\u7ed9\u4e86Symantec\uff0c\u8fd9\u5bb6\u4f19\u4e0d\u53ea\u51faGhost\uff0c\u8fd8\u662f\u4e2a\u5356\u8bc1\u4e66\u7684\u516c\u53f8\u3002<\/span><\/span>\u8981\u5f00\u5e97\u7684\u8001\u677f\u53bb\u7533\u8bf7\u8425\u4e1a\u6267\u7167\u7684\u65f6\u5019\u662f\u9700\u8981\u4ea4\u4ed6\u7684\u8eab\u4efd\u8bc1\u7684\uff0c\u7136\u540e\u529e\u51fa\u6765\u7684\u8425\u4e1a\u6267\u7167\u4e0a\u4e5f\u4f1a\u6709\u4ed6\u7684\u7167\u7247\u548c\u540d\u5b57\u3002\u8eab\u4efd\u8bc1\u76f8\u5f53\u4e8e\u79c1\u94a5\uff0c\u8425\u4e1a\u6267\u7167\u5c31\u662f\u8bc1\u4e66\uff0cCeritficate\uff0c.cer\u6587\u4ef6\u3002<\/p>\n<p>\u7136\u540e\u5173\u4e8e\u79c1\u94a5\u548c\u516c\u94a5\u5982\u4f55\u89e3\u91ca\u6211\u6ca1\u60f3\u597d\uff0c\u800c\u5b83\u4eec\u5728\u6570\u636e\u52a0\u5bc6\u5c42\u9762\uff0c\u6570\u636e\u7684\u6d41\u5411\u662f\u8fd9\u6837\u7684\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">\u6d88\u606f--&gt;[\u516c\u94a5]--&gt;\u52a0\u5bc6\u540e\u7684\u4fe1\u606f--&gt;[\u79c1\u94a5]--&gt;\u6d88\u606f\r\n<\/code><\/pre>\n<\/div>\n<p><span class=\"RichText CopyrightRichText-richText\" data-reactid=\"238\">\u516c\u94a5\u662f\u53ef\u4ee5\u968f\u4fbf\u6254\u7ed9\u8c01\u7684\uff0c\u4ed6\u628a\u6d88\u606f\u52a0\u4e86\u5bc6\u4f20\u7ed9\u6211\u3002\u5bf9\u4e86\uff0c\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3\uff0c\u6211\u6709\u4e00\u4e2a\u7bb1\u5b50\uff0c\u4e00\u628a\u9501\u548c\u4e00\u628a\u94a5\u5319\uff0c\u6211\u628a\u7bb1\u5b50\u548c\u5f00\u7740\u7684\u9501\u7ed9\u522b\u4eba\uff0c\u4ed6\u5199\u4e86\u4fe1\u653e\u7bb1\u5b50\u91cc\uff0c\u9501\u4e0a\uff0c\u7136\u540e\u4f20\u9012\u56de\u6211\u624b\u4e0a\u7684\u9014\u4e2d\u8c01\u90fd\u662f\u6253\u4e0d\u5f00\u7bb1\u5b50\u7684\uff0c\u53ea\u6709\u6211\u53ef\u4ee5\u7528\u539f\u6765\u7684\u94a5\u5319\u6253\u5f00\uff0c\u8fd9\u5c31\u662fSSL\uff0c\u516c\u94a5\uff0c\u79c1\u94a5\u4f20\u9012\u52a0\u5bc6\u6d88\u606f\u7684\u65b9\u5f0f\u3002\u8fd9\u91cc\u7684\u5bc6\u94a5\u5c31\u662fkey\u6587\u4ef6\u3002<\/span><\/p>\n<p>\u4e8e\u662f\u6211\u4eec\u5c31\u6709\u4e86.cer\u548c.key\u6587\u4ef6\u3002\u63a5\u4e0b\u6765\u8bf4keystore<\/p>\n<p>\u4e0d\u540c\u7684\u8bed\u8a00\u3001\u5de5\u5177\u5e8f\u5217SSL\u76f8\u5173\u6587\u4ef6\u7684\u683c\u5f0f\u548c\u6269\u5c55\u540d\u662f\u4e0d\u4e00\u6837\u7684\u3002<br \/>\n\u5176\u4e2dJava\u7cfb\u559c\u6b22\u7528keystore, truststore\u6765\u5e72\u6d3b\uff0c\u4f60\u770b\u5b83\u7684\u540d\u5b57\uff0cStore\uff0c\u4ed3\u5e93\uff0c\u5b83\u91cc\u9762\u5b58\u653e\u7740key\u548c\u4fe1\u4efb\u7684CA\uff0ckey\u548cCA\u53ef\u4ee5\u6709\u591a\u4e2a\u3002<br \/>\n\u8fd9\u91cc\u7684truststore\u5c31\u50cf\u4f60\u81ea\u5df1\u7535\u8111\u7684\u8bc1\u4e66\u7ba1\u7406\u5668\u4e00\u6837\uff0c\u5982\u679c\u4f60\u6253\u5f00Chrome\u7684\u8bbe\u7f6e\uff0c\u627e\u5230HTTP SSL\uff0c\u5c31\u53ef\u4ee5\u770b\u5230\u91cc\u9762\u6709\u5f88\u591aCA\uff0ctruststore\u5c31\u662f\u5e72\u8fd9\u4e2a\u6d3b\u513f\u7684\uff0c\u5b83\u4e5f\u91cc\u9762\u4e5f\u662f\u5b58\u4e00\u4e2a\u6216\u591a\u4e2aCA\u8ba9Tomcat\u6216Java\u7a0b\u5e8f\u6765\u8c03\u7528\u3002<br \/>\n\u800ckeystore\u5c31\u662f\u7528\u6765\u5b58\u5bc6\u94a5\u6587\u4ef6\u7684\uff0c\u53ef\u4ee5\u5b58\u653e\u591a\u4e2a\u3002<\/p>\n<p>\u7136\u540e\u662fPEM\uff0c\u5b83\u662f\u7531RFC1421\u81f31424\u5b9a\u4e49\u7684\u4e00\u79cd\u6570\u636e\u683c\u5f0f\u3002\u5176\u5b9e\u524d\u9762\u7684.cert\u548c.key\u6587\u4ef6\u90fd\u662fPEM\u683c\u5f0f\u7684\uff0c\u53ea\u4e0d\u8fc7\u5728\u6709\u4e9b\u7cfb\u7edf\u4e2d\uff08\u6bd4\u5982Windows\uff09\u4f1a\u6839\u636e\u6269\u5c55\u540d\u4e0d\u540c\u800c\u505a\u4e0d\u540c\u7684\u4e8b\u3002\u6240\u4ee5\u5f53\u4f60\u770b\u5230.pem\u6587\u4ef6\u65f6\uff0c\u5b83\u91cc\u9762\u7684\u5185\u5bb9\u53ef\u80fd\u662fcertificate\u4e5f\u53ef\u80fd\u662fkey\uff0c\u4e5f\u53ef\u80fd\u4e24\u4e2a\u90fd\u6709\uff0c\u8981\u770b\u5177\u4f53\u60c5\u51b5\u3002\u53ef\u4ee5\u901a\u8fc7openssl\u67e5\u770b\u3002<\/p>\n<p>RFC1421\u7684\u7b2c\u4e00\u8282\u662f\u8fd9\u6837\u8bf4\u7684<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">1.  Executive Summary\r\n\r\n   This document defines message encryption and authentication\r\n   procedures, in order to provide privacy-enhanced mail (PEM) services\r\n   for electronic mail transfer in the Internet.  It is intended to\r\n   become one member of a related set of four RFCs.  The procedures\r\n   defined in the current document are intended to be compatible with a\r\n   wide range of key management approaches, including both symmetric\r\n   (secret-key) and asymmetric (public-key) approaches for encryption of\r\n   data encrypting keys.  Use of symmetric cryptography for message text\r\n   encryption and\/or integrity check computation is anticipated. RFC1422 specifies supporting key management mechanisms based on the use\r\n   of public-key certificates.  RFC 1423 specifies algorithms, modes,\r\n   and associated identifiers relevant to the current RFC and to RFC1422.  RFC 1424 provides details of paper and electronic formats and\r\n   procedures for the key management infrastructure being established in\r\n   support of these services.\r\n\r\n   \u672c\u6587\u6863\u5b9a\u4e49\u4e86Internet\u4e2d\u6d88\u606f\u52a0\u5bc6\u548c\u8eab\u4efd\u8ba4\u8bc1\u7684\u6d41\u7a0b\uff0c\u5b83\u7528\u4e8e\u4e3a\u7535\u5b50\u90ae\u4ef6\u4f20\u8f93\u63d0\u4f9b\u589e\u5f3a\u7684\u79c1\u5bc6\u90ae\u4ef6\u670d\u52a1(PEM)\u3002\u5b83\u662f4\u4e2a\u76f8\u5173RFC\u7ec4\u4e2d\u7684\u4e00\u4e2a\uff0c\u5f53\u524d\u6587\u6863\u4e2d\u5b9a\u4e49\u7684\u6d41\u7a0b\u6253\u7b97\u4e0e\u5404\u79cd\u5bc6\u94a5\u7ba1\u7406\u65b9\u6cd5\u517c\u5bb9\uff0c\u5305\u542b\u5bf9\u79f0\u548c\u4e0d\u5bf9\u79f0\u6570\u636e\u52a0\u5bc6\u534f\u8bae\u3002\u4f7f\u7528\u5bf9\u79f0\u65b9\u5f0f\u6765\u52a0\u5bc6\u6587\u672c\u6d88\u606f\u548c\u5b8c\u6574\u6027\u68c0\u67e5\u662f\u53ef\u4ee5\u9884\u671f\u7684\u3002RFC1422\u63cf\u8ff0\u4e86\u57fa\u4e8e\u516c\u94a5\u8bc1\u4e66\u548c\u5bc6\u94a5\u7ba1\u7406\u673a\u5236\uff0cRFC1423\u63cf\u8ff0\u4e86\u7b97\u6cd5\uff0c\u6a21\u5f0f\u548c\u4e0eRFC1421\/1422\u76f8\u5173\u7684\u8eab\u4efd\u8ba4\u8bc1\u7684\u5185\u5bb9\uff0cRFC1424\u63d0\u4f9b\u4e86\u8be6\u5c3d\u7684\u7eb8\u5236\/\u7535\u5b50\u683c\u5f0f\u548c\u6d41\u7a0b\uff0c\u6765\u63cf\u8ff0\u5982\u4f55\u6784\u5efa\u652f\u6301\u8fd9\u4e9b\u534f\u8bae\u7684\u5bc6\u94a5\u7ba1\u7406\u57fa\u7840\u8bbe\u65bd\u3002\r\n\r\n   Privacy enhancement services (confidentiality, authentication,\r\n   message integrity assurance, and non-repudiation of origin) are\r\n   offered through the use of end-to-end cryptography between originator\r\n   and recipient processes at or above the User Agent level.  No special\r\n   processing requirements are imposed on the Message Transfer System at\r\n   endpoints or at intermediate relay sites.  This approach allows\r\n   privacy enhancement facilities to be incorporated selectively on a\r\n   site-by-site or user-by-user basis without impact on other Internet\r\n   entities.  Interoperability among heterogeneous components and mail\r\n   transport facilities is supported.\r\n\r\n   The current specification's scope is confined to PEM processing\r\n   procedures for the RFC-822 textual mail environment, and defines the\r\n   Content-Domain indicator value \"RFC822\" to signify this usage.\r\n   Follow-on work in integration of PEM capabilities with other\r\n   messaging environments (e.g., MIME) is anticipated and will be\r\n   addressed in separate and\/or successor documents, at which point\r\n   additional Content-Domain indicator values will be defined.\r\n<\/code><\/pre>\n<\/div>\n<p><span class=\"RichText CopyrightRichText-richText\" data-reactid=\"238\"><br \/>\n\u81f3\u4e8eCAS4.0\u8fd9\u4e2a\u4e1c\u897f\uff0c\u7f51\u4e0a\u4e00\u5806\u7684\u6559\u7a0b\uff0c\u4e2d\u6587\u7684\u3001\u82f1\u6587\u7684\uff0c\u5148\u81ea\u5df1\u505a\u5427\uff0c\u9047\u5230\u95ee\u9898\u65f6\u628a\u4f60\u7684\u64cd\u4f5c\u8fc7\u7a0b\uff0c\u5728\u4ec0\u4e48\u6b65\u9aa4\u9047\u5230\u4ec0\u4e48\u95ee\u9898\uff0c\u51fa\u73b0\u4ec0\u4e48\u9519\u8bef\uff0c\u4f60\u600e\u4e48\u7406\u89e3\u90fd\u5199\u51fa\u6765\uff0c\u6210\u957f\u6bd4\u4f60\u6210\u529f\u90e8\u7f72\u4e00\u4e2aCAS\u8981\u5927\u591a\u4e86\u3002<\/span><\/p>\n<p>\u6700\u540e\uff0c\u770b\u5230\u4e00\u7bc7\u6587\u7ae0\u5199\u7684\u4e0d\u9519\uff0c\u5728\u8fd9\u91cc\u7ffb\u8bd1\u4e00\u90e8\u5206\u3002<br \/>\n<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/www.tldp.org\/HOWTO\/SSL-Certificates-HOWTO\/x64.html\" target=\"_blank\" rel=\"nofollow noreferrer noopener\">What is SSL and what are Certificates?<i class=\"icon-external\"><\/i><\/a><\/p>\n<p>The Secure Socket Layer protocol was created by Netscape to ensure secure transactions between web servers and browsers. The protocol uses a third party, a Certificate Authority (CA), to identify one end or both end of the transactions. This is in short how it works.<\/p>\n<ol>\n<li>A browser requests a secure page (usually https:\/\/).<\/li>\n<li>The web server sends its public key with its certificate.<\/li>\n<li>The browser checks that the certificate was issued by a trusted party (usually a trusted root CA), that the certificate is still valid and that the certificate is related to the site contacted.<\/li>\n<li>The browser then uses the public key, to encrypt a random symmetric encryption key and sends it to the server with the encrypted URL required as well as other encrypted http data.<\/li>\n<li>The web server decrypts the symmetric encryption key using its private key and uses the symmetric key to decrypt the URL and http data.<\/li>\n<li>The web server sends back the requested html document and http data encrypted with the symmetric key.<\/li>\n<li>The browser decrypts the http data and html document using the symmetric key and displays the information.<\/li>\n<\/ol>\n<p><span class=\"RichText CopyrightRichText-richText\" data-reactid=\"238\">\u5b89\u5168\u5957\u63a5\u5c42\u534f\u8bae\u662f\u7531Netscape\u521b\u5efa\u7684\uff0c\u5b83\u7528\u6765\u4fdd\u8bc1\u5728WEB\u670d\u52a1\u5668\u548c\u6d4f\u89c8\u5668\u95f4\u7684\u6570\u636e\u88ab\u5b89\u5168\u4f20\u8f93\u3002<br \/>\n\u534f\u8bae\u4f7f\u7528\u4e00\u4e2a\u7b2c\u4e09\u65b9\u7684\u8bc1\u4e66\u5c40\uff08CA\uff09\u6765\u9a8c\u8bc1\u4f20\u8f93\u7684\u4e00\u65b9\u6216\u53cc\u65b9\u7684\u8eab\u4efd\u3002\u4e0b\u9762\u662f\u7b80\u5355\u7684\u63cf\u8ff0\u5b83\u5982\u4f55\u5de5\u4f5c\uff1a<br \/>\n<\/span><\/p>\n<ol>\n<li>\u6d4f\u89c8\u5668\u8bf7\u6c42\u4e00\u4e2a\u5b89\u5168\u7684\u9875\u9762(\u901a\u8fc7\u4ee5https:\/\/\u5f00\u5934)<\/li>\n<li>WEB\u670d\u52a1\u5668\u8fd4\u56de\u5b83\u7684\u516c\u94a5\u548c\u8bc1\u4e66<\/li>\n<li>\u6d4f\u89c8\u68c0\u67e5\u8bc1\u4e66\u662f\u7531\u53ef\u4fe1\u7684\u673a\u6784\u9881\u53d1\u7684\uff08\u901a\u8fc7\u662f\u53ef\u4fe1\u7684\u6839CA\uff09\uff0c\u8bc1\u4e66\u4ecd\u7136\u6709\u6548\u5e76\u4e14\u8bc1\u4e66\u4e0e\u88ab\u8bbf\u95ee\u7684\u7f51\u7ad9\u76f8\u5173<\/li>\n<li>\u6d4f\u89c8\u5668\u4f7f\u7528\u516c\u94a5\u6765\u52a0\u5bc6\u4e00\u4e2a\u968f\u673a\u7684\u5bf9\u79f0\u5bc6\u94a5\uff0c\u52a0\u4e0a\u52a0\u5bc6\u540e\u7684URL\u548c\u5176\u5b83\u52a0\u5bc6\u540e\u7684http\u6570\u636e\u4e00\u8d77\u53d1\u56de\u81f3\u670d\u52a1\u5668\u3002<\/li>\n<li>WEB\u670d\u52a1\u5668\u4f7f\u7528\u79c1\u94a5\u89e3\u5bc6\u5bf9\u79f0\u5bc6\u94a5\uff0c\u5e76\u7528\u5b83\u6765\u89e3\u5bc6\u5728\u6d4f\u89c8\u5668\u4e0a\u52a0\u5bc6\u4e86\u7684URL\u548chttp\u6570\u636e<\/li>\n<li>WEB\u670d\u52a1\u5668\u4f7f\u7528\u5bf9\u79f0\u5bc6\u94a5\u52a0\u5bc6\u8bf7\u6c42\u7684HTML\u6587\u6863\u548chttp\u6570\u636e\u5e76\u53d1\u56de\u81f3\u6d4f\u89c8\u5668<\/li>\n<li>\u6d4f\u89c8\u5668\u4f7f\u7528\u5bf9\u79f0\u5bc6\u94a5\u89e3\u5bc6HTML\u6587\u6863\u548chttp\u6570\u636e\u5e76\u5c55\u793a\u7ed9\u7528\u6237<\/li>\n<\/ol>\n<\/div>\n<div data-reactid=\"240\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"List-item\" data-reactid=\"305\">\n<div class=\"ContentItem AnswerItem\" data-za-index=\"1\" data-zop=\"{&quot;authorName&quot;:&quot;\u7a0b\u5e8f\u733f\u5708\u5c0f\u900f\u660e&quot;,&quot;itemId&quot;:191763719,&quot;title&quot;:&quot;SSL\u4e2d\uff0c\u516c\u94a5\u3001\u79c1\u94a5\u3001\u8bc1\u4e66\u7684\u540e\u7f00\u540d\u90fd\u662f\u4e9b\u5565\uff1f&quot;,&quot;type&quot;:&quot;answer&quot;}\" data-reactid=\"306\" data-za-module=\"AnswerItem\" data-za-module-info=\"{&quot;card&quot;:{&quot;has_image&quot;:false,&quot;has_video&quot;:false,&quot;content&quot;:{&quot;type&quot;:&quot;Answer&quot;,&quot;token&quot;:&quot;191763719&quot;,&quot;upvote_num&quot;:1,&quot;comment_num&quot;:0,&quot;publish_timestamp&quot;:null,&quot;parent_token&quot;:&quot;29620953&quot;,&quot;author_member_hash_id&quot;:&quot;58b536931eddc28045f9f43776086226&quot;}}}\">\n<div class=\"ContentItem-meta\" data-reactid=\"307\">\n<div class=\"AnswerItem-meta AnswerItem-meta--related\" data-reactid=\"308\">\n<div class=\"AnswerItem-extraInfo\" data-reactid=\"330\"><\/div>\n<\/div>\n<\/div>\n<div class=\"RichContent RichContent--unescapable\" data-reactid=\"341\">\n<div class=\"RichContent-inner\">\n<p>PKCS \u5168\u79f0\u662f Public-Key Cryptography Standards \uff0c\u662f\u7531 RSA \u5b9e\u9a8c\u5ba4\u4e0e\u5176\u5b83\u5b89\u5168\u7cfb\u7edf\u5f00\u53d1\u5546\u4e3a\u4fc3\u8fdb\u516c\u94a5\u5bc6\u7801\u7684\u53d1\u5c55\u800c\u5236\u8ba2\u7684\u4e00\u7cfb\u5217\u6807\u51c6\uff0cPKCS \u76ee\u524d\u5171\u53d1\u5e03\u8fc7 15 \u4e2a\u6807\u51c6\u3002 \u5e38\u7528\u7684\u6709\uff1a<\/p>\n<p>PKCS#7 Cryptographic Message Syntax Standard<\/p>\n<p>PKCS#10 Certification Request Standard<\/p>\n<p>PKCS#12 Personal Information Exchange Syntax Standard<\/p>\n<p>X.509\u662f\u5e38\u89c1\u901a\u7528\u7684\u8bc1\u4e66\u683c\u5f0f\u3002\u6240\u6709\u7684\u8bc1\u4e66\u90fd\u7b26\u5408\u4e3aPublic Key Infrastructure (PKI) \u5236\u5b9a\u7684 ITU-T X509 \u56fd\u9645\u6807\u51c6\u3002<\/p>\n<p>PKCS#7 \u5e38\u7528\u7684\u540e\u7f00\u662f\uff1a .P7B .P7C .SPC<\/p>\n<p>PKCS#12 \u5e38\u7528\u7684\u540e\u7f00\u6709\uff1a .P12 .PFX<\/p>\n<p>X.509 DER \u7f16\u7801(ASCII)\u7684\u540e\u7f00\u662f\uff1a .DER .CER .CRT<\/p>\n<p>X.509 PAM \u7f16\u7801(Base64)\u7684\u540e\u7f00\u662f\uff1a .PEM .CER .CRT<\/p>\n<p>.cer\/.crt\u662f\u7528\u4e8e\u5b58\u653e\u8bc1\u4e66\uff0c\u5b83\u662f2\u8fdb\u5236\u5f62\u5f0f\u5b58\u653e\u7684\uff0c\u4e0d\u542b\u79c1\u94a5\u3002<\/p>\n<p>.pem\u8ddfcrt\/cer\u7684\u533a\u522b\u662f\u5b83\u4ee5Ascii\u6765\u8868\u793a\u3002<\/p>\n<p>pfx\/p12\u7528\u4e8e\u5b58\u653e\u4e2a\u4eba\u8bc1\u4e66\/\u79c1\u94a5\uff0c\u4ed6\u901a\u5e38\u5305\u542b\u4fdd\u62a4\u5bc6\u7801\uff0c2\u8fdb\u5236\u65b9\u5f0f<\/p>\n<p>p10\u662f\u8bc1\u4e66\u8bf7\u6c42<\/p>\n<p>p7r\u662fCA\u5bf9\u8bc1\u4e66\u8bf7\u6c42\u7684\u56de\u590d\uff0c\u53ea\u7528\u4e8e\u5bfc\u5165<\/p>\n<p>p7b\u4ee5\u6811\u72b6\u5c55\u793a\u8bc1\u4e66\u94fe(certificate chain)\uff0c\u540c\u65f6\u4e5f\u652f\u6301\u5355\u4e2a\u8bc1\u4e66\uff0c\u4e0d\u542b\u79c1\u94a5\u3002<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"List-item\">\n<div class=\"ContentItem AnswerItem\" data-za-index=\"2\" data-zop=\"{&quot;authorName&quot;:&quot;\u4f9d\u4e91&quot;,&quot;itemId&quot;:45007985,&quot;title&quot;:&quot;SSL\u4e2d\uff0c\u516c\u94a5\u3001\u79c1\u94a5\u3001\u8bc1\u4e66\u7684\u540e\u7f00\u540d\u90fd\u662f\u4e9b\u5565\uff1f&quot;,&quot;type&quot;:&quot;answer&quot;}\" data-za-module=\"AnswerItem\" data-za-module-info=\"{&quot;card&quot;:{&quot;has_image&quot;:false,&quot;has_video&quot;:false,&quot;content&quot;:{&quot;type&quot;:&quot;Answer&quot;,&quot;token&quot;:&quot;45007985&quot;,&quot;upvote_num&quot;:20,&quot;comment_num&quot;:5,&quot;publish_timestamp&quot;:null,&quot;parent_token&quot;:&quot;29620953&quot;,&quot;author_member_hash_id&quot;:&quot;e1ecb812fd5ef0e75d04e4a2a6a34e57&quot;}}}\">\n<div class=\"ContentItem-meta\">\n<div class=\"AnswerItem-meta AnswerItem-meta--related\">\n<div class=\"AnswerItem-extraInfo\"><\/div>\n<\/div>\n<\/div>\n<div class=\"RichContent RichContent--unescapable\">\n<div class=\"RichContent-inner\">\n<p>Linux \u4e0b\u7684\u5de5\u5177\u4eec\u901a\u5e38\u4f7f\u7528 base64 \u7f16\u7801\u7684\u6587\u672c\u683c\u5f0f\uff0c\u76f8\u5173\u5e38\u7528\u540e\u7f00\u5982\u4e0b\uff1a<br \/>\n* \u8bc1\u4e66\uff1a.crt, .pem<br \/>\n* \u79c1\u94a5\uff1a.key<br \/>\n* \u8bc1\u4e66\u8bf7\u6c42\uff1a.csr<\/p>\n<p>.cer \u597d\u50cf\u662f\u4e8c\u8fdb\u5236\u7684\u8bc1\u4e66\u3002\u5f53\u7136\u4f60\u4e5f\u53ef\u4ee5\u628a\u8bc1\u4e66\u548c key \u653e\u5230\u540c\u4e00\u4e2a\u6587\u4ef6\u91cc\u8fb9\u3002\u8fd9\u65f6\u5019\u6269\u5c55\u540d\u901a\u5e38\u53eb .pem\u3002Java \u7684 keystore \u4ec0\u4e48\u7684\u90fd\u662f\u4e8c\u8fdb\u5236\u7684\uff0c\u597d\u50cf\u662f\u81ea\u6709\u683c\u5f0f\u3002<\/p>\n<p>\u5176\u5b9e\u5728\u7c7b UNIX \u7cfb\u7edf\u4e0a\uff0c\u5173\u6ce8\u6587\u4ef6\u540d\u540e\u7f00\u7684\u7a0b\u5e8f\u5e76\u4e0d\u591a\u7684\u3002\u800c\u8bc1\u4e66\u3001\u5bc6\u94a5\u90fd\u662f\u6709\u660e\u663e\u7684\u6807\u8bc6\u7684\uff0c\u6240\u4ee5\u76f8\u5173\u8f6f\u4ef6\uff08\u5982 openssl\uff09\u53ef\u4ee5\u5904\u7406\uff0c\u800c\u4e0d\u7ba1\u4f60\u7528\u7684\u4ec0\u4e48\u6269\u5c55\u540d\u3002\u5f53\u7136\u4e71\u7528\u6269\u5c55\u540d\u81ea\u5df1\u8bc6\u522b\u4e0d\u4fbf\uff0c\u684c\u9762\u73af\u5883\u4e5f\u4e0d\u80fd\u5c06\u6269\u5c55\u540d\u4e0e\u9ed8\u8ba4\u64cd\u4f5c\u3001\u56fe\u6807\u5173\u8054\u8d77\u6765\u3002<\/p>\n<p><span class=\"RichText CopyrightRichText-richText\">\u5982\u679c\u4e0d\u77e5\u9053\u4e00\u4e2a\u6587\u4ef6\u662f\u4e2a\u5565\uff0c\u53ef\u4ee5\u4f7f\u7528 file \u547d\u4ee4\u8bc6\u522b\u8bd5\u8bd5\u3002\u6709\u7ecf\u9a8c\u7684\u4e5f\u53ef\u4ee5\u76f4\u63a5\u62ff\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u770b\u770b\u3002<\/span><\/p>\n<\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"List-item\">\n<div class=\"ContentItem AnswerItem\" data-za-index=\"3\" data-zop=\"{&quot;authorName&quot;:&quot;Jason&quot;,&quot;itemId&quot;:55571642,&quot;title&quot;:&quot;SSL\u4e2d\uff0c\u516c\u94a5\u3001\u79c1\u94a5\u3001\u8bc1\u4e66\u7684\u540e\u7f00\u540d\u90fd\u662f\u4e9b\u5565\uff1f&quot;,&quot;type&quot;:&quot;answer&quot;}\" data-za-module=\"AnswerItem\" data-za-module-info=\"{&quot;card&quot;:{&quot;has_image&quot;:false,&quot;has_video&quot;:false,&quot;content&quot;:{&quot;type&quot;:&quot;Answer&quot;,&quot;token&quot;:&quot;55571642&quot;,&quot;upvote_num&quot;:9,&quot;comment_num&quot;:0,&quot;publish_timestamp&quot;:null,&quot;parent_token&quot;:&quot;29620953&quot;,&quot;author_member_hash_id&quot;:&quot;97f453a05fb67bd9f6ffcfd72fc691f7&quot;}}}\">\n<div class=\"ContentItem-meta\">\n<div class=\"AnswerItem-meta AnswerItem-meta--related\">\n<div class=\"AnswerItem-extraInfo\"><\/div>\n<\/div>\n<\/div>\n<div class=\"RichContent RichContent--unescapable\">\n<div class=\"RichContent-inner\">\n<p>\u9996\u5148\u8981\u8bf4\u660e\u4e00\u4e0b\u51e0\u4e2a\u683c\u5f0f\u7684\u57fa\u672c\u542b\u4e49\uff1a<\/p>\n<p>ASN.1\u662f\u4e00\u5957\u5b8c\u6574\u7684\u6570\u636e\u7ed3\u6784\u4e0e\u6570\u636e\u5b58\u50a8\u683c\u5f0f\u63cf\u8ff0<br \/>\nBER\/DER\u662fASN.1\u7684\u4e8c\u8fdb\u5236\u7f16\u7801\u65b9\u5f0f<br \/>\nPEM\u662fDER\u7f16\u7801\u518d\u8fdb\u884cBase64\u7f16\u7801\u540e\u7684\u6587\u672c\u683c\u5f0f<\/p>\n<p>\u4e0a\u9762\u4e09\u4e2a\u90fd\u662f\u201c\u8868\u793a\u683c\u5f0f\u201d<\/p>\n<p><span class=\"RichText CopyrightRichText-richText\">\u516c\u94a5\u548c\u79c1\u94a5\u4e00\u822c\u90fd\u662f\u7528PEM\u65b9\u5f0f\u4fdd\u5b58\uff0c\u4f46\u662f\u516c\u94a5\u6587\u4ef6\u8fd8\u4e0d\u8db3\u4ee5\u6210\u4e3a\u8bc1\u4e66\uff0c\u8fd8\u9700\u8981CA\u7684\u7b7e\u540d<br \/>\nCSR\u662f\u8bc1\u4e66\u7b7e\u540d\u8bf7\u6c42\uff0cCA\u7528\u81ea\u5df1\u7684\u79c1\u94a5\u6587\u4ef6\u7b7e\u540d\u4e4b\u540e\u751f\u6210CRT\u6587\u4ef6\u5c31\u662f\u5b8c\u6574\u7684\u8bc1\u4e66\u4e86<br \/>\nCER\u548cCRT\u5176\u5b9e\u662f\u4e00\u6837\u7684\uff0c\u53ea\u662f\u4e00\u822cLinux\u4e0b\u9762\u53ebCRT\u591a\uff0cWindows\u4e0b\u9762\u53ebCER\u591a<\/span><\/p>\n<\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"List-item\">\n<div class=\"ContentItem AnswerItem\" data-za-index=\"4\" data-zop=\"{&quot;authorName&quot;:&quot;HardRain980&quot;,&quot;itemId&quot;:197063489,&quot;title&quot;:&quot;SSL\u4e2d\uff0c\u516c\u94a5\u3001\u79c1\u94a5\u3001\u8bc1\u4e66\u7684\u540e\u7f00\u540d\u90fd\u662f\u4e9b\u5565\uff1f&quot;,&quot;type&quot;:&quot;answer&quot;}\" data-za-module=\"AnswerItem\" data-za-module-info=\"{&quot;card&quot;:{&quot;has_image&quot;:false,&quot;has_video&quot;:false,&quot;content&quot;:{&quot;type&quot;:&quot;Answer&quot;,&quot;token&quot;:&quot;197063489&quot;,&quot;upvote_num&quot;:1,&quot;comment_num&quot;:1,&quot;publish_timestamp&quot;:null,&quot;parent_token&quot;:&quot;29620953&quot;,&quot;author_member_hash_id&quot;:&quot;a5e82bb7ce021ff2aafa45b0dbfd2dbc&quot;}}}\">\n<div class=\"ContentItem-meta\">\n<div class=\"AnswerItem-meta AnswerItem-meta--related\">\n<div class=\"AnswerItem-extraInfo\"><\/div>\n<\/div>\n<\/div>\n<div class=\"RichContent RichContent--unescapable\">\n<div class=\"RichContent-inner\">\n<p>\u8bc1\u4e66(Certificate) &#8211; *.cer *.crt<br \/>\n\u79c1\u94a5(Private Key) &#8211; *.key<br \/>\n\u8bc1\u4e66\u7b7e\u540d\u8bf7\u6c42(Certificate sign request) &#8211; *.csr<\/p>\n<p>\u81f3\u4e8epem\u548cder\uff0c\u662f\u7f16\u7801\u65b9\u5f0f\uff0c\u4ee5\u4e0a\u4e09\u7c7b\u5747\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e24\u79cd\u7f16\u7801\u65b9\u5f0f\uff0c\u56e0\u6b64*.pem\u548c*.der(\u5c11\u89c1)\u4e0d\u4e00\u5b9a\u662f\u4ee5\u4e0a\u4e09\u79cd(Cert,Key,CSR)\u4e2d\u7684\u67d0\u4e00\u79cd<\/p>\n<p><span class=\"RichText CopyrightRichText-richText\">pem &#8211; base64\u7f16\u7801<br \/>\nder &#8211; \u4e8c\u8fdb\u5236\u7f16\u7801<\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7eaf\u7cb9\u4e2a\u4eba\u7406\u89e3\uff0c\u56e0\u4e3aSSL\u672c\u8eab\u786e\u5b9e\u6bd4\u8f83\u590d\u6742<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[117],"class_list":["post-203","post","type-post","status-publish","format-standard","hentry","tag-01-linux"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=203"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/203\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}