{"id":405,"date":"2018-04-16T00:00:08","date_gmt":"2018-04-15T16:00:08","guid":{"rendered":"https:\/\/cloudbool.com\/archive\/?p=405"},"modified":"2018-04-16T00:00:08","modified_gmt":"2018-04-15T16:00:08","slug":"use-openssl-command-generate-csr","status":"publish","type":"post","link":"https:\/\/cloudbool.com\/archive\/use-openssl-command-generate-csr.html","title":{"rendered":"\u5229\u7528openssl\u547d\u4ee4\u751f\u6210CSR\u6587\u4ef6"},"content":{"rendered":"<p>\u7533\u8bf7\u5404\u79cdSSL\u8bc1\u4e66\u90fd\u9700\u8981CSR\u6587\u4ef6\uff0c\u867d\u7136\u5f88\u591a\u5728\u7ebf\u7f51\u7ad9\u80fd\u76f4\u63a5\u5e2e\u6211\u4eec\u751f\u6210CSR\u6587\u4ef6\uff0c\u4f46\u6bd5\u7adf\u4e0d\u662f\u6211\u4eec\u81ea\u5df1\u751f\u6210\u7684\uff0c\u6709\u5bfc\u81f4key\u6cc4\u9732\u7684\u98ce\u9669\uff0c\u6240\u4ee5\uff0c\u7ecf\u5386\u8fc7\u51e0\u6b21\u4e0a\u7f51\u67e5\u8d44\u6599\u4e4b\u540e\uff0c\u8fd9\u91cc\u8bb0\u5f55\u4e00\u4e0b\u6211\u7684\u751f\u6210\u8fc7\u7a0b\u3002<br \/>\n<!--more--><\/p>\n<h2>\u5229\u7528openssl\u547d\u4ee4\u751f\u6210ECC CSR\u6587\u4ef6<\/h2>\n<p>\u56e0\u4e3a\u6211\u5bf9\u6d4f\u89c8\u5668\u5bf9SSL\u7684\u517c\u5bb9\u6027\u8981\u6c42\u4e0d\u9ad8\uff0c\u4e3a\u4e86\u6027\u80fd\u53ca\u901f\u5ea6\uff0c\u6211\u4e00\u822c\u90fd\u662f\u751f\u6210ECC\u7c7b\u578b\u7684CSR\u518d\u53bb\u7533\u8bf7\u8bc1\u4e66\u4f7f\u7528\uff0c\u6240\u4ee5\uff0c\u8fd9\u91cc\u5148\u8bb0\u5f55ECC\u7c7b\u578b\u7684CSR\uff1a<\/p>\n<pre><code>openssl ecparam -out elsenow-ecc.key -name prime256v1 -genkey\nopenssl req -new -key elsenow-ecc.key -out elsenow-ecc.csr\n<\/code><\/pre>\n<p>\u4e0a\u9762\u4e24\u884c\u547d\u4ee4\u662f\u5148\u751f\u6210\u4e00\u4e2a\u79c1\u94a5key\uff0c\u518d\u5229\u7528\u751f\u6210\u7684key\u751f\u6210\u4e00\u4e2acsr\u6587\u4ef6\uff0c\u5176\u4e2d\uff0c<strong>elsenow<\/strong>\u53ef\u4ee5\u968f\u610f\u66f4\u6539\uff0c\u53ea\u8981\u80fd\u533a\u5206\u54ea\u4e2a\u662f\u5c5e\u4e8e\u90a3\u4e2a\u57df\u540d\u5c31\u884c\u3002<br \/>\n\u4e0a\u9762\u547d\u4ee4\u662f\u751f\u6210\u7684\u957f\u5ea6\u4e3a256-bit\uff0c\u5982\u679c\u9700\u8981\u66f4\u9ad8\u8981\u6c42\u7684\u52a0\u5bc6\u5f3a\u5ea6\uff0c\u53ef\u4ee5\u5c06\u4e0a\u9762\u7684<strong>prime256v1<\/strong>\u66ff\u6362\u6210<strong>prime384v1<\/strong>\u3002<\/p>\n<h2>\u5229\u7528openssl\u547d\u4ee4\u751f\u6210RSA CSR\u6587\u4ef6<\/h2>\n<p>\u800c\u751f\u6210RSA CSR\u6587\u4ef6\u5c31\u66f4\u7b80\u5355\u4e86\uff0c\u53ea\u9700\u8981\u5982\u4e0b\u4e00\u884c\u547d\u4ee4\u5c31\u884c\uff1a<\/p>\n<pre><code>openssl req -out elsenow-rsa.csr -new -newkey rsa:2048 -nodes -keyout elsenow-rsa.key\n<\/code><\/pre>\n<p>\u540c\u6837\uff0c\u6211\u4eec\u4e5f\u53ef\u6307\u5b9a\u52a0\u5bc6\u5f3a\u5ea6\uff0c\u6bd4\u5982\u8bf44096\u4f4d\uff0c\u53ea\u9700\u5c06\u4e0a\u9762\u76842048\u66ff\u6362\u62104096\u5c31\u884c\u3002<br \/>\n\u548cECC\u7c7b\u578b\u4e0d\u4e00\u6837\uff0cRSA\u683c\u5f0f\u7684CSR\u751f\u6210\u53ef\u80fd\u4f1a\u6d88\u8017\u4e00\u4e9b\u65f6\u95f4\u3002<\/p>\n<h2>\u5229\u7528openssl\u751f\u6210CSR\u6587\u4ef6\u6b65\u9aa4<\/h2>\n<p>\u4e0d\u7ba1\u662fECC\u8fd8\u662fRSA\uff0c\u751f\u6210CSR\u7684\u8fc7\u7a0b\uff0c\u90fd\u4f1a\u9700\u8981\u6211\u4eec\u8f93\u5165\u4e00\u4e9b\u4fe1\u606f\uff0c\u4e0b\u9762\u662f\u4e00\u4e9b\u63d0\u793a\uff1a<\/p>\n<pre><code>You are about to be asked to enter information that will be incorporated\ninto your certificate request.\nWhat you are about to enter is what is called a Distinguished Name or a DN.\nThere are quite a few fields but you can leave some blank\nFor some fields there will be a default value,\nIf you enter '.', the field will be left blank.\n-----\nCountry Name (2 letter code) []:   #\u56fd\u540d  \u53ef\u4e3a\u7a7a\nState or Province Name (full name) []:  #\u6240\u5728\u5dde\u6216\u8005\u7701\u4efd\u540d\u5b57  \u53ef\u4e3a\u7a7a\nLocality Name (eg, city) []:  # \u6240\u5728\u5730  \u53ef\u4e3a\u7a7a\nOrganization Name (eg, company) []:  # \u7ec4\u7ec7\u540d\u79f0  \u6bd4\u5982\u8bf4\u516c\u53f8\u540d  \u53ef\u4e3a\u7a7a\nOrganizational Unit Name (eg, section) []:  # \u7ec4\u7ec7\u90e8\u95e8\u540d\u79f0  \u6bd4\u5982\u8bf4IT\u90e8  \u53ef\u4e3a\u7a7a\nCommon Name (eg, fully qualified host name) []:www.cloudbool.com  # \u4e5f\u5c31\u662fFQHN\uff0c\u4e0d\u5141\u8bb8\u4e3a\u7a7a\uff0c\u53ef\u4ee5\u4e3a\u5355\u57df\u540d\u4e5f\u53ef\u4ee5\u662f\u6cdb\u57df\u540d\nEmail Address []:   # \u90ae\u7bb1\u5730\u5740  \u53ef\u4e3a\u7a7a\nPlease enter the following 'extra' attributes\nto be sent with your certificate request\nA challenge password []:  #\u5bc6\u7801  \u5efa\u8bae\u7559\u7a7a\n<\/code><\/pre>\n<p>\u8fd9\u91cc\u6709\u4e00\u70b9\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u4e0a\u9762\u7684FQHN\uff0c\u8f93\u5165\u7684\u4fe1\u606f\u8ddf\u9700\u8981\u7533\u8bf7\u7684SSL\u6709\u5173\uff0c\u5982\u679c\u662f\u5355\u57df\u540d\uff0c\u76f4\u63a5\u8f93\u5165\u5355\u4e2a\u7684\u57df\u540d\u5c31\u884c\uff0c\u6bd4\u5982\uff1awww.cloudbool.com \uff1b\u5982\u679c\u7533\u8bf7\u7684\u662f\u6cdb\u57df\u540d\uff0c\u5219\u9700\u8f93\u5165\u51c6\u786e\u7684\u6cdb\u57df\u540d\uff0c\u6bd4\u5982\u8bf4\uff1a*.cloudbool.com\u3002<br \/>\n\u8f93\u5165\u5b8c\u6210\u4e4b\u540e\uff0c\u5f53\u524d\u76ee\u5f55\u4f1a\u6709\u5bf9\u5e94\u7684key\u53cacsr\u6587\u4ef6\uff0c\u6211\u4eec\u53ea\u9700\u8981\u5c06\u5bf9\u5e94\u7684CSR\u63d0\u4ea4\u5230CA\u5c31\u884c\uff0ckey\u81ea\u884c\u4fdd\u5b58\u597d\uff0c\u540e\u9762\u914d\u7f6eSSL\u7684\u65f6\u5019\u8981\u7528\u5230\uff0c\u4e00\u5b9a\u4e0d\u80fd\u9057\u5931\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7533\u8bf7\u5404\u79cdSSL\u8bc1\u4e66\u90fd\u9700\u8981CSR\u6587\u4ef6\uff0c\u867d\u7136\u5f88\u591a\u5728\u7ebf\u7f51\u7ad9\u80fd\u76f4\u63a5\u5e2e\u6211\u4eec\u751f\u6210CSR\u6587\u4ef6\uff0c\u4f46\u6bd5\u7adf\u4e0d\u662f\u6211\u4eec\u81ea\u5df1\u751f\u6210\u7684\uff0c\u6709\u5bfc &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/cloudbool.com\/archive\/use-openssl-command-generate-csr.html\"> <span class=\"screen-reader-text\">\u5229\u7528openssl\u547d\u4ee4\u751f\u6210CSR\u6587\u4ef6<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[183],"tags":[163,100],"class_list":["post-405","post","type-post","status-publish","format-standard","hentry","category-more","tag-openssl","tag-ssl"],"_links":{"self":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/comments?post=405"}],"version-history":[{"count":0,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/405\/revisions"}],"wp:attachment":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/media?parent=405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/categories?post=405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/tags?post=405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}