{"id":8260,"date":"2014-02-12T07:27:56","date_gmt":"2014-02-12T07:27:56","guid":{"rendered":"http:\/\/tajdini.net\/blog\/2014\/02\/12\/openssl\/"},"modified":"2014-02-12T07:27:56","modified_gmt":"2014-02-12T07:27:56","slug":"openssl","status":"publish","type":"post","link":"https:\/\/tajdini.net\/blog\/cloud-and-devsecops\/openssl\/","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 \u0627\u06cc\u062c\u0627\u062f Self Signed Certificate \u0648 \u0633\u0627\u062e\u062a \u0641\u0627\u06cc\u0644 \u0646\u0635\u0628 !"},"content":{"rendered":"<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u062f\u0631 \u0645\u0648\u0631\u062f \u0646\u062d\u0648\u0647 \u062a\u0647\u06cc\u0647 \u06cc\u06a9 \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647 \u062f\u06cc\u062c\u06cc\u062a\u0627\u0644 \u062e\u0648\u062f \u0646\u0634\u0627\u0646 (self-signed) \u0648 \u0646\u062d\u0648\u0647 \u06cc \u0633\u062a \u06a9\u0631\u062f\u0646 \u0622\u0646 \u0628\u0631 \u0631\u0648\u06cc \u06a9\u0644\u0627\u06cc\u0646\u062a \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u0627\u062e\u062a \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0627\u062c\u0631\u0627\u06cc\u06cc \u062a\u0648\u0636\u06cc\u062d \u062f\u0627\u062f\u0647 \u0645\u06cc\u0634\u0647.<\/p>\n<p> \u0628\u0631\u0627\u06cc \u062a\u0647\u06cc\u0647 \u06cc\u06a9 \u06af\u0648\u0627\u0647\u06cc \u062f\u06cc\u062c\u06cc\u062a\u0627\u0644 \u0634\u0645\u0627 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u06cc\u06a9 \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u0644\u06cc\u0646\u0648\u06a9\u0633 \u062f\u0627\u0631\u06cc\u062f \u06a9\u0647 \u0628\u0627\u06cc\u062f \u062f\u0631 \u0622\u0646 apache \u0648 openssl \u0646\u0635\u0628 \u0634\u062f\u0647 \u0628\u0627\u0634\u062f.<\/p>\n<p> \u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u0646 \u06a9\u0647 \u0627\u06cc\u0646 \u062f\u0648 \u0645\u0648\u0631\u062f \u0646\u0635\u0628 \u0628\u0648\u062f \u0633\u0647 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0648 \u0627\u062c\u0631\u0627 \u0645\u06cc\u06a9\u0646\u06cc\u0645:<\/p>\n<p> \u062f\u0633\u062a\u0648\u0631 1 :<\/p>\n<div class=\"bbcode_container\">\n<div class=\"bbcode_description\">\u06a9\u062f:<\/div>\n<div style=\"text-align: left;\">\n<pre class=\"bbcode_code\" style=\"height: 36px;\">openssl genrsa -des3 -out server.key 4096 <\/pre>\n<\/p><\/div>\n<\/p><\/div>\n<p>\u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631 \u06cc\u06a9 \u067e\u0633\u0648\u0631\u062f \u0631\u0648 \u0628\u0627 \u062a\u06a9\u0631\u0627\u0631 \u0628\u0631\u0627\u06cc \u06a9\u0644\u06cc\u062f \u0648\u0627\u0631\u062f \u0628\u06a9\u0646\u06cc\u062f \u062f\u0633\u062a\u0648\u0631 2 :<\/p>\n<div class=\"bbcode_container\">\n<div class=\"bbcode_description\">\u06a9\u062f:<\/div>\n<pre class=\"bbcode_code\" style=\"height: 36px; text-align: left;\">openssl req -new -key server.key -out server.csr<\/pre>\n<\/p><\/div>\n<p>\u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631 \u067e\u0633\u0648\u0631\u062f \u0642\u0628\u0644\u06cc \u0631\u0627 \u06a9\u0647 \u062a\u0639\u06cc\u06cc\u0646 \u06a9\u0631\u062f\u06cc\u062f \u0648\u0627\u0631\u062f \u0628\u06a9\u0646\u06cc\u062f \u0648 \u0633\u067e\u0633 \u0645\u0634\u062e\u0635\u0627\u062a\u06cc \u0631\u0627 \u0627\u0632 \u0634\u0645\u0627 \u0646\u0638\u06cc\u0631 \u06a9\u0634\u0648\u0631 \u0648 \u0627\u06cc\u0645\u06cc\u0644 \u0648 &#8230; \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0645\u06cc\u06a9\u0646\u0647.<\/p>\n<p> \u0627\u0632 \u0627\u06cc\u0646 \u0645\u062c\u0645\u0648\u0639\u0647 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u06a9\u0647 \u062f\u0631 \u062e\u0648\u0627\u0633\u062a \u0645\u06cc \u0634\u0648\u062f \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0647\u0645\u0647 \u06cc\u0627 \u0628\u0631\u062e\u06cc \u0627\u0632 \u0627\u0648\u0646\u0627 \u0631\u0648 \u0648\u0627\u0631\u062f \u0628\u06a9\u0646\u06cc\u062f \u0627\u0645\u0627 \u06cc\u0627\u062f\u062a\u0648\u0646 \u0628\u0627\u0634\u0647 \u062c\u0648\u0627\u0628 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 Common name \u0631\u0648 \u0648\u0627\u0631\u062f \u0628\u06a9\u0646\u06cc\u062f ( \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u0622\u062f\u0631\u0633 \u062f\u0627\u0645\u0646\u0647 \u06cc\u0627 \u0622\u06cc \u067e\u06cc \u0645\u06cc\u0634\u0647 \u06a9\u0647 \u0645\u06cc\u062e\u0648\u0627\u0647\u06cc\u062f \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0628\u0634\u0647 ) \u0648 \u062f\u0631 \u0622\u062e\u0631 \u067e\u0633\u0648\u0631\u062f\u06cc \u06a9\u0647 \u0627\u0632\u062a\u0648\u0646 \u0645\u06cc\u062e\u0648\u0627\u0647\u062f \u0631\u0627 \u0647\u0645\u0627\u0646 \u067e\u0633\u0648\u0631\u062f \u0642\u0628\u0644\u06cc \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<p> \u062f\u0633\u062a\u0648\u0631 3:<br \/> \u00a0<\/p>\n<div class=\"bbcode_container\">\n<div class=\"bbcode_description\">\u06a9\u062f:<\/div>\n<div style=\"text-align: left;\">\n<pre class=\"bbcode_code\" style=\"height: 36px;\">openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt<\/pre>\n<\/p><\/div>\n<\/p><\/div>\n<p>\u0645\u062c\u062f\u062f\u0627 \u067e\u0633\u0648\u0631\u062f \u0642\u0628\u0644\u06cc \u0631\u0648 \u0648\u0627\u0631\u062f \u0628\u06a9\u0646\u06cc\u062f. ssl \u062e\u0648\u062f \u0646\u0634\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u0634\u062f \u0648 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0647\u0633\u062a. \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u06cc\u06a9 \u0641\u0627\u06cc\u0644 .exe \u062c\u0647\u062a \u0646\u0635\u0628 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0631\u0648\u06cc \u0633\u06cc\u0633\u062a\u0645 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0627\u0632 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 .batch \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u06a9\u0646\u06cc\u0645 . \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0645\u062a\u0646\u06cc \u0628\u0627\u0632 \u06a9\u0631\u062f\u0647 ( \u062f\u0631 \u0648\u06cc\u0646\u062f\u0648\u0632 ) \u0648 \u062f\u0627\u062e\u0644 \u0627\u0646 \u062f\u0633\u062a\u0648\u0631<\/p>\n<div class=\"bbcode_container\">\n<div class=\"bbcode_description\">\u06a9\u062f:<\/div>\n<div style=\"text-align: left;\">\n<pre class=\"bbcode_code\" style=\"height: 36px;\">certutil -addstore -f -enterprise root server.crt<\/pre>\n<\/p><\/div>\n<\/p><\/div>\n<p>\u0631\u0627 \u0646\u0648\u0634\u062a\u0647 \u0648 \u0628\u0627 \u067e\u0633\u0648\u0646\u062f .bat \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc\u06a9\u0646\u06cc\u0645. \u062d\u0627\u0644 \u06a9\u0627\u0641\u06cc\u0647 \u0628\u0627 \u06cc\u06a9 \u06a9\u0627\u0645\u067e\u0627\u06cc\u0644\u0631 batch \u0645\u0627\u0646\u0646\u062f bat to exe converter \u0627\u06cc\u0646 \u0641\u0627\u06cc\u0644 \u0631\u0648 \u0628\u0647 \u0635\u0648\u0631\u062a .exe \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u0627\u06cc\u06a9\u0646 \u062f\u0644\u062e\u0648\u0627\u0647 \u062f\u0631 \u0628\u06cc\u0627\u0631\u06cc\u0645. \u0648 \u0633\u067e\u0633 \u0641\u0627\u06cc\u0644 .exe + .crt \u0631\u0648 \u062f\u0631 \u0627\u062e\u062a\u06cc\u0627\u0631 \u06a9\u0627\u0631\u0628\u0631 \u0642\u0631\u0627\u0631 \u0645\u06cc\u062f\u06cc\u062f \u062a\u0627 \u0628\u0627 \u0627\u062c\u0631\u0627\u06cc .exe \u0641\u0627\u06cc\u0644 crt \u0646\u0635\u0628 \u0628\u0634\u0647.<\/p>\n<p>\u00a0<\/p>\n<p>\u0627\u06af\u0631 \u062c\u0627\u06cc\u06cc \u0646\u06cc\u0627\u0632 \u0628\u0647 \u062a\u0628\u062f\u06cc\u0644 \u0628\u0647 \u0641\u0627\u06cc\u0644 PEM \u062f\u0627\u0634\u062a\u06cc\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u06a9\u062f:<\/p>\n<pre style=\"text-align: left;\"><code>openssl rsa -in server.key -text &gt; private.pem openssl x509 -inform PEM -in server.crt &gt; public.pem<\/code><\/pre>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u062f\u0631 \u0645\u0648\u0631\u062f \u0646\u062d\u0648\u0647 \u062a\u0647\u06cc\u0647 \u06cc\u06a9 \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647 \u062f\u06cc\u062c\u06cc\u062a\u0627\u0644 \u062e\u0648\u062f \u0646\u0634\u0627\u0646 (self-signed) \u0648 \u0646\u062d\u0648\u0647 \u06cc \u0633\u062a \u06a9\u0631\u062f\u0646 \u0622\u0646 \u0628\u0631 \u0631\u0648\u06cc \u06a9\u0644\u0627\u06cc\u0646\u062a \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u0627\u062e\u062a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[222,223,227],"tags":[240,241,4,5,264,262,274],"class_list":["post-8260","post","type-post","status-publish","format-standard","hentry","category-cloud-and-devsecops","category-cryptography-and-pki","category-linux-and-open-source","tag-certificates","tag-cloud-security","tag-linux","tag-persian","tag-pki","tag-tls-ssl"],"_links":{"self":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts\/8260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/comments?post=8260"}],"version-history":[{"count":0,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts\/8260\/revisions"}],"wp:attachment":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/media?parent=8260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/categories?post=8260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/tags?post=8260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}