{"id":2807,"date":"2017-05-23T17:17:43","date_gmt":"2017-05-23T09:17:43","guid":{"rendered":"http:\/\/blog.pighead.cc\/whsyu\/?p=2807"},"modified":"2017-06-20T10:59:58","modified_gmt":"2017-06-20T02:59:58","slug":"openldap-ssl","status":"publish","type":"post","link":"https:\/\/blog.pighead.cc\/whsyu\/2017\/05\/23\/openldap-ssl\/","title":{"rendered":"openldap + ssl"},"content":{"rendered":"<p class=\"bb-post-separator\"><strong>[\u83ef\u8a9e, cmn-Hant-TW]  <\/strong><\/p><p>\u57fa\u672c\u4e0a\u6709\u4e86\u00a0<a href=\"http:\/\/blog.pighead.cc\/whsyu\/2015\/12\/07\/lets-encrypt-freebsd\/\">Let&#8217;s Encrypt<\/a>\u00a0\u4e4b\u5f8c\uff0c\u5408\u683c\u7684 SSL \u8a8d\u8b49\u53d6\u5f97\u7b97\u662f\u65b9\u4fbf\u975e\u5e38\u591a\uff0c\u6709\u4e9b\u4e4b\u524d\u8df3\u904e\u6aa2\u67e5\u6216\u662f\u8a2d\u5b9a\u81ea\u7c3d root \u7684\u8655\u7406\u65b9\u5f0f\u90fd\u53ef\u4ee5\u7701\u6389\u4e86\uff0c\u4e0d\u904e\u6709\u4e9b\u6771\u897f\u9084\u662f\u8981\u8a2d\u5b9a\u52a0\u4e0a\u5b9a\u6642\u66f4\u65b0\u624d\u6703\u7528\u7684\u9806\u66a2<\/p>\n<p>\u5728 FreeBSD \u4e0a\u00a0<a href=\"https:\/\/www.freshports.org\/security\/ca_root_nss\/\">security\/ca_root_nss<\/a> \u9019\u500b port \u8981\u5148\u88dd\u597d\uff0c\u7136\u5f8c\u00a0\/etc\/ssl\/cert.pem \u5c31\u53ef\u4ee5\u62ff\u4f86\u7528\u4e86\uff0c\u5982\u679c\u5b89\u88dd\u6642\u6c92\u958b\u555f\u9019\u500b\u9023\u7d50\u7684\u8a71\uff0c\u76f4\u63a5\u7528\u00a0\/usr\/local\/share\/certs\/ca-root-nss.crt \u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u7136\u5f8c\u5e38\u7528\u7684\u4e00\u4e9b\u5957\u4ef6\u5c31\u53ef\u4ee5\u7528\u9019\u500b cert \u4e86\uff0c\u4f8b\u5982\u5e33\u865f\u8a8d\u8b49\u7528\u7684\u00a0<a href=\"https:\/\/www.freshports.org\/net\/nss-pam-ldapd\/\">net\/nss-pam-ldapd<\/a>\uff0c\u5728 \/usr\/local\/etc\/nslcd.conf \u88e1\u9762\u52a0\u4e0a\u4e00\u884c <code>tls_cacertfile \/etc\/ssl\/cert.pem<\/code> \u7684\u8a2d\u5b9a\u5f8c\u5c31\u4e0d\u6703\u62b1\u6028 ssl \u662f\u81ea\u7c3d\u7684 (\u4e5f\u5c31\u662f <code>tls_reqcert allow<\/code> \u7528\u4e0d\u5230\u4e86)\uff0c\u5176\u4ed6\u7684\u8edf\u9ad4\uff0c\u50cf\u662f php \u4e4b\u985e\u76f4\u63a5\u5403 \/usr\/local\/etc\/openldap\/ldap.conf \u8a2d\u5b9a\u7684\u4e5f\u4e0d\u96e3\u8655\u7406\uff0c\u76f4\u63a5\u52a0\u4e00\u884c <code>TLS_CACERT \/etc\/ssl\/cert.pem<\/code> \u5c31\u53ef\u4ee5\u641e\u5b9a\uff0c\u5176\u4ed6\u7684\u8a2d\u5b9a\u4e5f\u662f\u985e\u4f3c\u9019\u6a23\u8655\u7406\u5373\u53ef<\/p>\n<p>\u7576\u7136\u4e86\uff0c\u56e0\u70ba Let&#8217;s Encrypt \u7684\u8a8d\u8b49\u6642\u9593\u53ea\u6709\u5e7e\u500b\u6708\uff0c\u5b9a\u671f\u66f4\u65b0\u6191\u8b49\u662f\u9700\u8981\u7684\uff0c\u4e0d\u7136\u904e\u671f\u7684\u8a71\u9084\u662f\u6703\u5403\u4e00\u5806\u932f\u8aa4\u8a0a\u606f\u7684<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[\u83ef\u8a9e, cmn-Hant-TW] \u57fa\u672c\u4e0a\u6709\u4e86\u00a0Let&#8217;s Encrypt\u00a0\u4e4b\u5f8c\uff0c\u5408\u683c\u7684 SSL \u8a8d\u8b49\u53d6\u5f97\u7b97\u662f\u65b9\u4fbf\u975e\u5e38\u591a\uff0c\u6709\u4e9b\u4e4b\u524d\u8df3\u904e\u6aa2\u67e5\u6216\u662f\u8a2d\u5b9a\u81ea\u7c3d root \u7684\u8655\u7406\u65b9\u5f0f\u90fd\u53ef\u4ee5\u7701\u6389\u4e86\uff0c\u4e0d\u904e\u6709\u4e9b\u6771\u897f\u9084\u662f\u8981\u8a2d\u5b9a\u52a0\u4e0a\u5b9a\u6642\u66f4\u65b0\u624d\u6703\u7528\u7684\u9806\u66a2 \u5728 FreeBSD \u4e0a\u00a0security\/ca_root_nss \u9019\u500b port \u8981\u5148\u88dd\u597d\uff0c\u7136\u5f8c\u00a0\/etc\/ssl\/cert.pem \u5c31\u53ef\u4ee5\u62ff\u4f86\u7528\u4e86\uff0c\u5982\u679c\u5b89\u88dd\u6642\u6c92\u958b\u555f\u9019\u500b\u9023\u7d50\u7684\u8a71\uff0c\u76f4\u63a5\u7528\u00a0\/usr\/local\/share\/certs\/ca-root-nss.crt \u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u7136\u5f8c\u5e38\u7528\u7684\u4e00\u4e9b\u5957\u4ef6\u5c31\u53ef\u4ee5\u7528\u9019\u500b cert \u4e86\uff0c\u4f8b\u5982\u5e33\u865f\u8a8d\u8b49\u7528\u7684\u00a0net\/nss-pam-ldapd\uff0c\u5728 \/usr\/local\/etc\/nslcd.conf \u88e1\u9762\u52a0\u4e0a\u4e00\u884c tls_cacertfile \/etc\/ssl\/cert.pem \u7684\u8a2d\u5b9a\u5f8c\u5c31\u4e0d\u6703\u62b1\u6028 ssl \u662f\u81ea\u7c3d\u7684 (\u4e5f\u5c31\u662f tls_reqcert allow \u7528\u4e0d\u5230\u4e86)\uff0c\u5176\u4ed6\u7684\u8edf\u9ad4\uff0c\u50cf\u662f php \u4e4b\u985e\u76f4\u63a5\u5403 \/usr\/local\/etc\/openldap\/ldap.conf \u8a2d\u5b9a\u7684\u4e5f\u4e0d\u96e3\u8655\u7406\uff0c\u76f4\u63a5\u52a0\u4e00\u884c TLS_CACERT \/etc\/ssl\/cert.pem \u5c31\u53ef\u4ee5\u641e\u5b9a\uff0c\u5176\u4ed6\u7684\u8a2d\u5b9a\u4e5f\u662f\u985e\u4f3c\u9019\u6a23\u8655\u7406\u5373\u53ef \u7576\u7136\u4e86\uff0c\u56e0\u70ba Let&#8217;s Encrypt \u7684\u8a8d\u8b49\u6642\u9593\u53ea\u6709\u5e7e\u500b\u6708\uff0c\u5b9a\u671f\u66f4\u65b0\u6191\u8b49\u662f\u9700\u8981\u7684\uff0c\u4e0d\u7136\u904e\u671f\u7684\u8a71\u9084\u662f\u6703\u5403\u4e00\u5806\u932f\u8aa4\u8a0a\u606f\u7684<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[4591,4584,4287],"class_list":["post-2807","post","type-post","status-publish","format-standard","hentry","category-freebsd","tag-freebsd","tag-openldap","tag-ssl"],"_links":{"self":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/2807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/comments?post=2807"}],"version-history":[{"count":6,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/2807\/revisions"}],"predecessor-version":[{"id":2813,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/2807\/revisions\/2813"}],"wp:attachment":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/media?parent=2807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/categories?post=2807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/tags?post=2807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}