{"id":9797,"date":"2021-11-10T12:35:16","date_gmt":"2021-11-10T04:35:16","guid":{"rendered":"https:\/\/blog.naibabiji.com\/?p=9797"},"modified":"2021-11-11T00:09:26","modified_gmt":"2021-11-10T16:09:26","slug":"curl-error-60-ssl-certificate-problem-certificate-has-expired","status":"publish","type":"post","link":"https:\/\/blog.naibabiji.com\/skill\/curl-error-60-ssl-certificate-problem-certificate-has-expired.html","title":{"rendered":"cURL error 60: SSL certificate problem: certificate has expired\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"<p>\u6700\u8fd1\u4e0d\u5c11WordPress\u7f51\u7ad9\u90fd\u51fa\u73b0\u4e86cURL error 60: SSL certificate problem: certificate has expired\u9519\u8bef\uff0c\u5bfc\u81f4\u5b89\u88c5SSL\u8bc1\u4e66\u6216\u8005\u4e00\u4e9b\u63d2\u4ef6\u5931\u8d25\uff0c\u672c\u6587\u5206\u4eab\u4e00\u4e0b\u89e3\u51b3\u529e\u6cd5\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"386\" height=\"38\" class=\"alignnone wp-image-9799 size-full\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2021\/11\/Pasted.png\" \/><\/p>\n<p>\u51fa\u73b0\u8fd9\u4e2a\u539f\u56e0\u662f\u56e0\u4e3aLet&#8217;s Encrypt \u8bc1\u4e66\u505c\u6b62\u4e86HTTP API\u7684\u8bf7\u6c42\u652f\u6301\uff0c\u5bfc\u81f4\u6211\u4eec\u4f7f\u7528Let&#8217;s Encrypt \u8bc1\u4e66\u7684\u7f51\u7ad9\u6ca1\u529e\u6cd5\u66f4\u65b0\u8bc1\u4e66\uff0c\u5c31\u51fa\u73b0\u4e86\u8bc1\u4e66\u8fc7\u671f\u7684\u63d0\u9192\uff0c\u6240\u4ee5\u6211\u4eec\u53ea\u9700\u8981\u624b\u52a8\u66f4\u65b0\u4e0b\u8bc1\u4e66\u5c31\u884c\u4e86\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\u4e00\uff0c\u624b\u52a8\u66ff\u6362\u8bc1\u4e66\uff1a<\/strong><\/p>\n<p>1\u3001\u4e0b\u8f7d<a href=\"https:\/\/curl.se\/ca\/cacert.pem\" target=\"_blank\" rel=\"noopener\">https:\/\/curl.se\/ca\/cacert.pem<\/a> \u8fd9\u4e2a\u6587\u4ef6\uff1b<\/p>\n<p>2\u3001\u5c06cacert.pem\u91cc\u9762\u7684\u5185\u5bb9\u66ff\u6362\u5230\/wp-includes\/certificates\/ca-bundle.crt \u8fd9\u4e2a\u6587\u4ef6\u91cc\u9762\u3002<\/p>\n<p>\u7136\u540e\u5c31\u4e0d\u4f1a\u51fa\u73b0\u8bc1\u4e66\u8fc7\u671f\u7684\u63d0\u9192\u4e86\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\u4e8c\uff0c\u4ee3\u7801\u66ff\u6362\u8bc1\u4e66\uff1a<\/strong><\/p>\n<p>\u5982\u679c\u624b\u52a8\u66ff\u6362\u4f60\u89c9\u5f97\u9ebb\u70e6\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u4ee3\u7801\u8fdb\u884c\u66ff\u6362\u3002<\/p>\n<p>\u9996\u5148\uff0c\u628a\u4e0b\u9762\u7684\u4ee3\u7801\u590d\u5236\uff0c\u7136\u540e\u7c98\u8d34\u5230\u4f60\u4e3b\u9898\u7684\u51fd\u6570\u6587\u4ef6\u91cc\uff0c\u4fdd\u5b58\u3002<\/p>\n<p>&nbsp;<\/p>\n<pre>\/**\r\n* \u4fdd\u5b58\u4ee3\u7801\u540e\u8bbf\u95ee http:\/\/\u4f60\u7f51\u5740\/?update-wp-ca-bundle\r\n*\/\r\nif( isset( $_GET['update-wp-ca-bundle'] ) ){\r\n\r\n$crt_file = ABSPATH . WPINC . '\/certificates\/ca-bundle.crt';\r\n$new_crt_url = 'http:\/\/curl.haxx.se\/ca\/cacert.pem';\r\n\r\nif( is_writable( $crt_file ) ){\r\n$new_str = file_get_contents( $new_crt_url );\r\n\r\nif( $new_str &amp;&amp; strpos( $new_str, 'Bundle of CA Root Certificates' ) ){\r\n$up = file_put_contents( $crt_file, $new_str );\r\n\r\necho $up ? 'OK: ca-bundle.crt updated' : 'ERROR: can`t put data to ca-bundle.crt';\r\n}\r\nelse {\r\necho 'ERROR: can\\'t download curl.haxx.se\/ca\/cacert.pem';\r\n}\r\n}\r\nelse {\r\necho 'ERROR: ca-bundle.crt not writable';\r\n}\r\n\r\nexit;\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>\u7136\u540e\u8bbf\u95eehttp:\/\/\u4f60\u7f51\u5740\/?update-wp-ca-bundle \u63d0\u793a\u66f4\u65b0\u6210\u529f\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\u4e09\uff0c\u63d2\u4ef6\u66ff\u6362\u8bc1\u4e66\uff1a<\/strong><\/p>\n<p>\u4e0a\u9762\u4e24\u79cd\u89e3\u51b3\u65b9\u6cd5\u89c9\u5f97\u9ebb\u70e6\uff0c\u90a3\u4e48\u53ef\u4ee5\u76f4\u63a5\u5728WP\u540e\u53f0\u5b89\u88c5\u4e00\u4e2aSSL Certificate Manager\u63d2\u4ef6\u6765\u89e3\u51b3\u3002<\/p>\n<p><a class=\"theme-demo\" href=\"https:\/\/wordpress.org\/plugins\/ssl-certificate-manager\/\" target=\"_blank\" rel=\"noopener\">\u63d2\u4ef6\u4e0b\u8f7d\u5730\u5740<\/a><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;9797&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;5&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;2.4&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;4&quot;,&quot;greet&quot;:&quot;\u7ed9\u672c\u6587\u6253\u5206 post&quot;,&quot;legend&quot;:&quot;2.4\\\/5 - (5 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;cURL error 60: SSL certificate problem: certificate has expired\u89e3\u51b3\u529e\u6cd5&quot;,&quot;width&quot;:&quot;65.2&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 65.2px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            2.4\/5 - (5 votes)    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u4e0d\u5c11WordPress\u7f51\u7ad9\u90fd\u51fa\u73b0\u4e86cURL error 60: SSL certificate probl [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9798,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"cURL error 60: SSL certificate problem: certificate has expired\u89e3\u51b3\u529e\u6cd5 - \u5976\u7238\u5efa\u7ad9\u7b14\u8bb0","description":"\u6700\u8fd1\u4e0d\u5c11WordPress\u7f51\u7ad9\u90fd\u51fa\u73b0\u4e86cURL error 60: SSL certificate problem: certificate has expired\u9519\u8bef\uff0c\u5bfc\u81f4\u5b89\u88c5SSL\u8bc1\u4e66\u6216\u8005\u4e00\u4e9b\u63d2\u4ef6\u5931\u8d25\uff0c\u672c\u6587\u5206\u4eab\u4e00\u4e0b\u89e3\u51b3\u529e\u6cd5\u3002 \u51fa\u73b0\u8fd9\u4e2a\u539f\u56e0\u662f\u56e0\u4e3aLet's Encrypt \u8bc1\u4e66\u505c\u6b62\u4e86HTTP API\u7684\u8bf7\u6c42\u652f\u6301\uff0c\u5bfc\u81f4\u6211"},"footnotes":""},"categories":[142],"tags":[],"class_list":["post-9797","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-skill"],"_links":{"self":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/9797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/comments?post=9797"}],"version-history":[{"count":0,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/9797\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media\/9798"}],"wp:attachment":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media?parent=9797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/categories?post=9797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/tags?post=9797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}