{"id":874,"date":"2015-07-06T09:21:41","date_gmt":"2015-07-06T09:21:41","guid":{"rendered":"http:\/\/pingtool.org\/?p=874"},"modified":"2015-07-06T09:21:41","modified_gmt":"2015-07-06T09:21:41","slug":"openssl-check-p12-expiration-date","status":"publish","type":"post","link":"https:\/\/pingtool.org\/ru\/openssl-check-p12-expiration-date\/","title":{"rendered":"OpenSSL \u043f\u0440\u043e\u0432\u0435\u0440\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 p12 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430"},"content":{"rendered":"<p>1. <strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0440\u043e\u043a\u0430 \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 .p12 \/ .pfx<\/strong>:<\/p>\n<p><code><br \/>\nopenssl pkcs12 -in testuser1.pfx -nokeys | openssl x509 -noout -enddate<br \/>\n<\/code><br \/>\n\u0415\u0441\u043b\u0438 \u0432\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 <strong>-passin pass:&#187;${pass}&#187;<\/strong><\/p>\n<p>2. <strong>\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043a\u043b\u044e\u0447\u0430 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0438\u0437  .p12 \/ .pfx:<\/strong><\/p>\n<p><code><br \/>\nopenssl pkcs12 -clcerts -nokeys -in myContainer.p12 -out usercert.pem<br \/>\nopenssl pkcs12 -nocerts  -in myContainer.p12 -out userkey.pem<br \/>\n<\/code><\/p>\n<p>3. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a HTTPS \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430:<\/p>\n<p><code><br \/>\nopenssl s_client -connect gmail.com:443 -cert usercert.pem -key userkey.pem<br \/>\n<\/code><\/p>","protected":false},"excerpt":{"rendered":"<p>1. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0440\u043e\u043a\u0430 \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 .p12 \/ .pfx: openssl pkcs12 -in testuser1.pfx -nokeys | openssl x509 -noout -enddate \u0415\u0441\u043b\u0438 \u0432\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 -passin pass:&#187;${pass}&#187; 2. \u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043a\u043b\u044e\u0447\u0430 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0438\u0437 .p12 \/ &hellip; <a href=\"https:\/\/pingtool.org\/ru\/openssl-check-p12-expiration-date\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[12],"tags":[41,56],"class_list":["post-874","post","type-post","status-publish","format-standard","hentry","category-linux","tag-bash","tag-openssl"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/posts\/874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/comments?post=874"}],"version-history":[{"count":2,"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/posts\/874\/revisions"}],"predecessor-version":[{"id":876,"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/posts\/874\/revisions\/876"}],"wp:attachment":[{"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/media?parent=874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/categories?post=874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pingtool.org\/ru\/wp-json\/wp\/v2\/tags?post=874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}