{"id":275440,"date":"2023-06-20T20:06:03","date_gmt":"2023-06-20T12:06:03","guid":{"rendered":"https:\/\/lrxjmw.cn\/lxcfshqqdzys.html"},"modified":"2023-06-20T20:06:03","modified_gmt":"2023-06-20T12:06:03","slug":"lxcfshqqdzys","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lxcfshqqdzys.html","title":{"rendered":"Linux\u4e0bcurl\u53d1\u9001https\u8bf7\u6c42\u7684\u6ce8\u610f\u4e8b\u9879\u53ca\u65b9\u6cd5"},"content":{"rendered":"
\u4f17\u6240\u5468\u77e5linux \u8bba\u575b\uff0chttps\u662f\u4e00\u79cd\u5b89\u5168\u7684\u7f51\u7edc\u4f20\u8f93\u534f\u8bae\uff0c\u5b83\u901a\u8fc7SSL\/TLS\u52a0\u5bc6\u4fdd\u62a4\u6570\u636e\u4f20\u8f93\u7684\u5b89\u5168\u6027\uff0c\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u7f51\u7ad9\u3001\u79fb\u52a8\u5e94\u7528\u7b49\u573a\u666f\u4e2d\u3002\u5728Linux<\/a>\u7cfb\u7edf<\/a>\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528curl\u547d\u4ee4<\/a>\u6765\u53d1\u9001https\u8bf7\u6c42\uff0c\u5b9e\u73b0\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6570\u636e\u4ea4\u4e92\u3002\u672c\u6587\u5c06\u4e3a\u5927\u5bb6\u8be6\u7ec6\u4ecb\u7ecd\u5728Linux\u73af\u5883\u4e0b\u4f7f\u7528curl\u547d\u4ee4\u53d1\u9001https\u8bf7\u6c42\u7684\u65b9\u6cd5\u548c\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n \u4e00\u3001curl\u547d\u4ee4\u7b80\u4ecb<\/b><\/p>\n curl\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u7f51\u7edc\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u53d1\u9001\u5404\u79cd\u7c7b\u578b\u7684\u8bf7\u6c42\uff0c\u5e76\u652f\u6301\u591a\u79cd\u534f\u8bae\uff0c\u5982HTTP\u3001FTP\u3001SMTP\u7b49\u3002\u5728Linux\u4e2d\uff0ccurl\u547d\u4ee4\u901a\u5e38\u5df2\u7ecf\u9884\u88c5\u4e86\uff0c\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n \n \u4e8c\u3001\u4f7f\u7528curl\u53d1\u9001https\u8bf7\u6c42<\/b><\/p>\n \u8981\u4f7f\u7528curl\u53d1\u9001https\u8bf7\u6c42\uff0c\u9700\u8981\u5728\u547d\u4ee4\u4e2d\u6dfb\u52a0\u201c-k\u201d\u6216\u201c--insecure\u201d\u9009\u9879\u3002\u8fd9\u4e2a\u9009\u9879\u6307\u793acurl\u5ffd\u7565SSL\u8bc1\u4e66\u9a8c\u8bc1\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684\u9519\u8bef\u3002\u5982\u679c\u4e0d\u52a0\u8fd9\u4e2a\u9009\u9879\uff0c\u5219\u4f1a\u6536\u5230\u7c7b\u4f3c\u201cSSL certificate problem: unable to get local issuer certificate\u201d\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n \u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528curl\u53d1\u9001https\u8bf7\u6c42\u7684\u793a\u4f8b\uff1a<\/p>\n \n \u4ee5\u4e0a\u547d\u4ee4\u5c06\u5411\u53d1\u9001https\u8bf7\u6c42\uff0c\u5e76\u8fd4\u56de\u670d\u52a1\u5668\u54cd\u5e94\u3002<\/p>\n \u4e09\u3001\u83b7\u53d6\u8bc1\u4e66\u4fe1\u606f<\/b><\/p>\n \u5f53\u6211\u4eec\u8bbf\u95ee\u4e00\u4e2a\u4f7f\u7528https\u534f\u8bae\u7684\u7f51\u7ad9\u65f6linux\u79fb\u690d\uff0c\u670d\u52a1\u5668\u4f1a\u8fd4\u56de\u4e00\u4e2aSSL\u8bc1\u4e66\uff0c\u7528\u4e8e\u9a8c\u8bc1\u670d\u52a1\u5668\u7684\u8eab\u4efd\u548c\u52a0\u5bc6\u901a\u4fe1\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u83b7\u53d6\u8bc1\u4e66\u4fe1\u606f\uff1a<\/p>\n \n \u4ee5\u4e0a\u547d\u4ee4\u5c06\u8fd4\u56de\u670d\u52a1\u5668\u7684\u54cd\u5e94\u5934\u4fe1\u606flinux curl https<\/strong>\uff0c\u5176\u4e2d\u5305\u62ecSSL\u8bc1\u4e66\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n \u56db\u3001\u4f7f\u7528\u5ba2\u6237\u7aef\u8bc1\u4e66<\/b><\/p>\n \u6709\u4e9bhttps\u670d\u52a1\u5668\u8981\u6c42\u5ba2\u6237\u7aef\u63d0\u4f9b\u8bc1\u4e66\u624d\u80fd\u8fdb\u884c\u8bbf\u95ee\uff0c\u8fd9\u65f6\u6211\u4eec\u9700\u8981\u5728curl\u547d\u4ee4\u4e2d\u6dfb\u52a0\u201c--cert\u201d\u548c\u201c--key\u201d\u9009\u9879\u6765\u6307\u5b9a\u5ba2\u6237\u7aef\u8bc1\u4e66\u548c\u79c1\u94a5\u6587\u4ef6\u7684\u8def\u5f84\u3002\u4f8b\u5982\uff1a<\/p>\n \n \u4ee5\u4e0a\u547d\u4ee4\u5c06\u4f7f\u7528\u6307\u5b9a\u8def\u5f84\u4e0b\u7684\u5ba2\u6237\u7aef\u8bc1\u4e66\u548c\u79c1\u94a5\u6587\u4ef6\u8fdb\u884chttps\u8bf7\u6c42\u3002<\/p>\n \u4e94\u3001\u4f7f\u7528\u4ee3\u7406\u670d\u52a1\u5668<\/b><\/p>\n \u5982\u679c\u6211\u4eec\u9700\u8981\u901a\u8fc7\u4ee3\u7406\u670d\u52a1\u5668\u8fdb\u884chttps\u8bf7\u6c42\uff0c\u5219\u53ef\u4ee5\u5728curl\u547d\u4ee4\u4e2d\u6dfb\u52a0\u201c-x\u201d\u6216\u201c--proxy\u201d\u9009\u9879\u6765\u6307\u5b9a\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740\u548c\u7aef\u53e3\u53f7\u3002\u4f8b\u5982\uff1a<\/p>\n \n \u4ee5\u4e0a\u547d\u4ee4\u5c06\u901a\u8fc7\u4ee3\u7406\u670d\u52a1\u5668:8080\u8fdb\u884chttps\u8bf7\u6c42\u3002<\/p>\n \u516d\u3001\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4<\/b><\/p>\n \u6709\u4e9b\u60c5\u51b5\u4e0b\uff0chttps\u8bf7\u6c42\u53ef\u80fd\u4f1a\u56e0\u4e3a\u7f51\u7edc\u95ee\u9898\u6216\u5176\u4ed6\u539f\u56e0\u800c\u957f\u65f6\u95f4\u65e0\u54cd\u5e94\uff0c\u8fd9\u65f6\u6211\u4eec\u9700\u8981\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\u6765\u907f\u514d\u7b49\u5f85\u8fc7\u4e45\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\uff1a<\/p>\n \n \u4ee5\u4e0a\u547d\u4ee4\u5c06\u8bbe\u7f6e\u8fde\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a10\u79d2\u3002<\/p>\n \u4e03\u3001\u4f7f\u7528cookie<\/b><\/p>\n \u5982\u679c\u6211\u4eec\u9700\u8981\u5728https\u8bf7\u6c42\u4e2d\u4f7f\u7528cookie\uff0c\u5219\u53ef\u4ee5\u5728curl\u547d\u4ee4\u4e2d\u6dfb\u52a0\u201c--cookie\u201d\u9009\u9879\u6765\u6307\u5b9acookie\u6587\u4ef6\u7684\u8def\u5f84\u3002\u4f8b\u5982\uff1a<\/p>\n \n \u4ee5\u4e0a\u547d\u4ee4\u5c06\u4f7f\u7528\u6307\u5b9a\u8def\u5f84\u4e0b\u7684cookie\u6587\u4ef6\u8fdb\u884chttps\u8bf7\u6c42\u3002<\/p>\n \u516b\u3001\u603b\u7ed3<\/b><\/p>\n \u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Linux\u73af\u5883\u4e0b\u4f7f\u7528curl\u547d\u4ee4\u53d1\u9001https\u8bf7\u6c42\u7684\u65b9\u6cd5\u548c\u6ce8\u610f\u4e8b\u9879\u3002\u901a\u8fc7\u5b66\u4e60\u672c\u6587\uff0c\u60a8\u5df2\u7ecf\u638c\u63e1\u4e86\u4f7f\u7528curl\u5de5\u5177\u8fdb\u884chttps\u6570\u636e\u4ea4\u4e92\u7684\u6280\u5de7linux curl https<\/strong>\uff0c\u80fd\u591f\u66f4\u597d\u5730\u5e94\u5bf9\u5b9e\u9645\u5de5\u4f5c\u4e2d\u7684\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" linux curl https\u672c\u6587\u5c06\u4e3a\u5927\u5bb6\u8be6\u7ec6\u4ecb\u7ecd\u5728Linux\u73af\u5883\u4e0b\u4f7f\u7528curl\u547d\u4ee4\u53d1\u9001https\u8bf7\u6c42\u7684\u65b9\u6cd5\u548c\u6ce8\u610f\u4e8b\u9879\u3002\u4e8c\u3001\u4f7f\u7528curl\u53d1\u9001https\u8bf7\u6c42\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528curl\u53d1\u9001https\u8bf7\u6c42\u7684\u793a\u4f8b\uff1a\u4ee5\u4e0a\u547d\u4ee4\u5c06\u5411\u53d1\u9001https\u8bf7\u6c42\uff0c\u5e76\u8fd4\u56de\u670d\u52a1\u5668\u54cd\u5e94\u3002\u4ee5\u4e0a\u547d\u4ee4\u5c06\u901a\u8fc7\u4ee3\u7406\u670d\u52a1\u5668:8080\u8fdb\u884chttps\u8bf7\u6c42\u3002\u4ee5\u4e0a\u547d\u4ee4\u5c06\u4f7f\u7528\u6307\u5b9a\u8def\u5f84\u4e0b\u7684cookie\u6587\u4ef6\u8fdb\u884chttps\u8bf7\u6c42\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-275440","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/275440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=275440"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/275440\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=275440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=275440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=275440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\nsudo apt-get install curl\n<\/pre>\n<\/p>\n
\ncurl -k \n<\/pre>\n<\/p>\n
\ncurl -k-v \n<\/pre>\n<\/p>\n
\ncurl -k--cert \/path\/to\/client.crt --key \/path\/to\/client.key \n<\/pre>\n<\/p>\n
\ncurl -k-x :8080 \n<\/pre>\n<\/p>\n
\ncurl -k--connect-timeout 10 \n<\/pre>\n<\/p>\n
\ncurl -k--cookie \/path\/to\/cookie.txt \n<\/pre>\n<\/p>\n