{"id":13923,"date":"2025-04-18T20:48:07","date_gmt":"2025-04-18T12:48:07","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/13923.html"},"modified":"2025-04-18T20:48:07","modified_gmt":"2025-04-18T12:48:07","slug":"mqtt%e6%9c%8d%e5%8a%a1%e5%99%a8emqx%e6%90%ad%e5%bb%bassl-tls%e8%bf%9e%e6%8e%a5%e8%bf%87%e7%a8%8b%ef%bc%88wss","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/13923.html","title":{"rendered":"[MQTT]\u670d\u52a1\u5668EMQX\u642d\u5efaSSL\/TLS\u8fde\u63a5\u8fc7\u7a0b\uff08wss:\/\/)"},"content":{"rendered":"<hr \/>\n<hr \/>\n<h3>&#x1f449;\u539f\u6587\u9605\u8bfb<\/h3>\n<hr \/>\n<h4>&#x1f4a1;\u7ae0\u524d\u63d0\u793a<\/h4>\n<p>\u672c\u6587\u91c7\u75288084\u7aef\u53e3\u8fdb\u884c\u8fde\u63a5&#xff0c;\u662fEMQX \u9ed8\u8ba4\u63d0\u4f9b\u4e86\u56db\u4e2a\u5e38\u7528\u7684\u76d1\u542c\u5668\u4e4b\u4e00&#xff0c;\u5982\u679c\u9700\u8981\u6dfb\u52a0\u5176\u4ed6\u7c7b\u578b\u7684\u76d1\u542c\u5668&#xff0c;\u53ef\u53c2\u8003\u5b98\u65b9\u6587\u6863&#x1f517;\u7ba1\u7406 | EMQX \u6587\u6863\u3002<\/p>\n<p>\u672c\u6587\u4f7f\u7528\u81ea\u7b7e\u540dCA&#xff0c;\u9700\u8981\u63d0\u524d\u5728Linux\u7cfb\u7edf\u4e0a\u5b89\u88c5&#x1f517;OpenSSL&#xff0c;\u5177\u4f53\u5b89\u88c5\u6559\u7a0b\u8bf7\u81ea\u884c\u641c\u7d22\u3002<\/p>\n<p>\u672c\u6587\u91c7\u7528SSL\/TLS\u8fde\u63a5&#xff0c;\u9700\u8981\u63d0\u524d\u5728EMQX\u4e0a\u542f\u7528&#xff0c;\u53ef\u53c2\u8003&#x1f517;\u5f00\u542f SSL\/TLS \u8fde\u63a5| EMQX \u6587\u6863<\/p>\n<hr \/>\n<h4>\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>&#x1f449;[\u539f\u6587\u9605\u8bfb](https:\/\/b1ankc-mov.github.io\/posts\/emqx_mqtt_ssl_wss\/)<\/li>\n<li>\n<ul>\n<li>&#x1f4a1;\u7ae0\u524d\u63d0\u793a<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>&#x1f4d8;\u6b63\u6587\u5f00\u59cb<\/li>\n<li>\n<ul>\n<li>\u4f7f\u7528OpenSSL\u83b7\u53d6\u8bc1\u4e66<\/li>\n<li>\n<ul>\n<li>CA\u6587\u4ef6<\/li>\n<li>Server\u6587\u4ef6<\/li>\n<li>\n<ul>\n<li>&#x1f511;\u5c0f\u8d34\u58eb<\/li>\n<\/ul>\n<\/li>\n<li>Client\u6587\u4ef6<\/li>\n<\/ul>\n<\/li>\n<li>\u767b\u5f55EMQX\u5e73\u53f0\u914d\u7f6e\u670d\u52a1\u5668<\/li>\n<li>\n<ul>\n<li>\n<ul>\n<li>&#x1f6a9;\u6ce8\u610f<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u4f7f\u7528MQTTX\u5ba2\u6237\u7aef\u6d4b\u8bd5\u8fde\u63a5<\/li>\n<li>\n<ul>\n<li>\u5355\u5411\u8ba4\u8bc1\u7684SSL\/TLS\u8fde\u63a5<\/li>\n<li>\u53cc\u5411\u8ba4\u8bc1\u7684SSL\/TLS\u8fde\u63a5<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h2>&#x1f4d8;\u6b63\u6587\u5f00\u59cb<\/h2>\n<h3>\u4f7f\u7528OpenSSL\u83b7\u53d6\u8bc1\u4e66<\/h3>\n<h4>CA\u6587\u4ef6<\/h4>\n<li>\u6253\u5f00Linux\u7cfb\u7edf\u7ec8\u7aef\u64cd\u4f5c\u7a97\u53e3&#xff0c;\u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4&#xff0c;\u67e5\u770bOpenSSL\u662f\u5426\u5b89\u88c5&#xff0c;\u5982\u679c\u6709&#xff0c;\u5219\u4f1a\u663e\u793a\u7248\u672c\u4fe1\u606f\u3002<\/li>\n<p>openssl version<\/p>\n<li>\u751f\u6210\u79c1\u94a5&#xff1a;my_root_ca.key<\/li>\n<p>openssl genrsa -out my_root_ca.key 2048<\/p>\n<li>\u4f7f\u7528\u8be5\u5bc6\u94a5\u751f\u6210\u6839&#xff08;CA&#xff09;\u8bc1\u4e66&#xff1a;my_root_ca.pem<\/li>\n<p>openssl req -x509 -new -nodes -key my_root_ca.key -sha256 -days 3650 -out my_root_ca.pem<\/p>\n<p>\u7cfb\u7edf\u4f1a\u63d0\u793a\u4ee5\u4e0b\u4fe1\u606f&#xff0c;\u5bf9\u5e94\u542b\u4e49\u5982\u4e0b&#xff08;\u6839\u636e\u4e0b\u9762\u7684\u5185\u5bb9\u586b\u5c31\u53ef\u4ee5\u4e86&#xff0c;#\u540e\u9762\u7684\u4e0d\u9700\u8981\u586b&#xff09;&#xff1a;<\/p>\n<p>You are about to be asked to enter information that will be incorporated<br \/>\ninto your certificate request.<br \/>\nWhat you are about to enter is what is called a Distinguished Name or a DN.<br \/>\nThere are quite a few fields but you can leave some blank<br \/>\nFor some fields there will be a default value,<br \/>\nIf you enter &#039;.&#039;, the field will be left blank.<br \/>\n&#8212;&#8211;<br \/>\nCountry Name (2 letter code) [AU]: CN # \u56fd\u5bb6\/\u5730\u533a<br \/>\nState or Province Name (full name) [Some-State]:Zhejiang # \u7701\/\u5e02<br \/>\nLocality Name (eg, city) []:Hangzhou # \u57ce\u5e02<br \/>\nOrganization Name (eg, company) [Internet Widgits Pty Ltd]:EMQX # \u7ec4\u7ec7\u673a\u6784&#xff08;\u6216\u516c\u53f8\u540d&#xff09;&#xff0c;\u5982 EMQ<br \/>\nOrganizational Unit Name (eg, section) []:EMQX # \u673a\u6784\u90e8\u95e8&#xff0c;\u5982 EMQX<br \/>\nCommon Name (e.g. server FQDN or YOUR name) []:none # \u901a\u7528\u540d\u79f0&#xff0c;\u6b64\u5904\u5e94\u5f53\u8bbe\u7f6e\u4e3a\u670d\u52a1\u5668\u57df\u540d\u5982 mqtt.emqx.com<br \/>\n&#8230;<\/p>\n<h4>Server\u6587\u4ef6<\/h4>\n<li>\u751f\u6210EMQX&#xff08;\u670d\u52a1\u5668&#xff09;\u7aef\u7684\u79c1\u94a5&#xff1a;emqx.key<\/li>\n<p>openssl genrsa -out emqx.key 2048<\/p>\n<li>\u4f7f\u7528 vi\u547d\u4ee4\u521b\u5efa\u914d\u7f6e\u6587\u4ef6&#xff1a;openssl.cnf<\/li>\n<p>vi openssl.cnf<\/p>\n<p>\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b&#xff0c;BROKER_ADDRESS \u4fee\u6539\u4e3a EMQX \u670d\u52a1\u5668\u5b9e\u9645\u7684 IP \u6216 DNS \u5730\u5740<\/p>\n<p>\u4f8b\u5982&#xff1a;IP.1 &#061; 127.0.0.1&#xff0c;\u6216 DNS.1 &#061; broker.xxx.com&#xff08;\u53ef\u4ee5\u53ea\u586bIP&#xff0c;\u628a\u57df\u540dDNS\u90a3\u4e00\u884c\u5220\u6389&#xff09;<\/p>\n<p>[req]<br \/>\ndefault_bits  &#061; 2048<br \/>\ndistinguished_name &#061; req_distinguished_name<br \/>\nreq_extensions &#061; req_ext<br \/>\nx509_extensions &#061; v3_req<br \/>\nprompt &#061; no<br \/>\n[req_distinguished_name]<br \/>\ncountryName &#061; CN<br \/>\nstateOrProvinceName &#061; Zhejiang<br \/>\nlocalityName &#061; Hangzhou<br \/>\norganizationName &#061; EMQX<br \/>\ncommonName &#061; Server certificate<br \/>\n[req_ext]<br \/>\nsubjectAltName &#061; &#064;alt_names<br \/>\n[v3_req]<br \/>\nsubjectAltName &#061; &#064;alt_names<br \/>\n[alt_names]<br \/>\nIP.1 &#061; BROKER_ADDRESS<br \/>\nDNS.1 &#061; BROKER_ADDRESS<\/p>\n<p>\u200b \u6700\u540eEsc&#043;:wq \u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n<li>\u4f7f\u7528\u4e0a\u9762\u7684\u5bc6\u94a5\u548c\u914d\u7f6e\u6587\u4ef6\u7b7e\u53d1\u8bc1\u4e66\u8bf7\u6c42&#xff1a;emqx.csr<\/li>\n<p>openssl req -new -key .\/emqx.key -config openssl.cnf -out emqx.csr<\/p>\n<li>\u4f7f\u7528\u8bf7\u6c42\u6587\u4ef6\u3001CA\u5bc6\u94a5\u3001\u914d\u7f6e\u6587\u4ef6&#xff0c;\u4ee5\u6839\u8bc1\u4e66\u7b7e\u53d1EMQX\u5b9e\u4f53\u8bc1\u4e66&#xff1a;emqx.pem<\/li>\n<p>openssl x509 -req -in .\/emqx.csr -CA my_root_ca.pem -CAkey my_root_ca.key -CAcreateserial -out emqx.pem -days 3650 -sha256 -extensions v3_req -extfile openssl.cnf<\/p>\n<hr \/>\n<h5>&#x1f511;\u5c0f\u8d34\u58eb<\/h5>\n<p>\u200b \u51c6\u5907\u597dServer\u6587\u4ef6&#xff08;EMQX\u8bc1\u4e66&#xff09;\u540e&#xff0c;\u5c31\u53ef\u4ee5\u542f\u7528EMQX\u5355\u5411\u8ba4\u8bc1\u7684SSL\/TLS\u8fde\u63a5\u529f\u80fd\u4e86<\/p>\n<p>\u5982\u679c\u9700\u8981\u53cc\u5411\u8ba4\u8bc1\u6216\u5ba2\u6237\u7aef\u8bc1\u4e66\u548c\u5ba2\u6237\u7aefKey\u6587\u4ef6&#xff0c;\u7528\u6765\u6ee1\u8db3\u914d\u7f6enginx\u7b49\u9700\u6c42\u7684&#xff0c;\u8bf7\u7ee7\u7eed\u914d\u7f6eClient\u6587\u4ef6\u2193<\/p>\n<hr \/>\n<h4>Client\u6587\u4ef6<\/h4>\n<p>\u8fd9\u4e00\u90e8\u5206\u539f\u7406\u548c\u5185\u5bb9\u8ddf\u914d\u7f6eServer\u6587\u4ef6\u4e00\u6837&#xff0c;\u4e0d\u8d58\u8ff0\u4e86&#xff0c;\u76f4\u63a5\u653e\u6b65\u9aa4\u3002<\/p>\n<li>\u751f\u6210client.key<\/li>\n<p>openssl genrsa -out client.key 2048<\/p>\n<li>\u751f\u6210client.csr<\/li>\n<p>openssl req -new -key .\/client.key -config openssl.cnf -out client.csr<\/p>\n<li>\u751f\u6210client.pem<\/li>\n<p>openssl x509 -req -in .\/client.csr -CA my_root_ca.pem -CAkey my_root_ca.key -CAcreateserial -out client.pem -days 3650 -sha256 -extensions v3_req -extfile openssl.cnf<\/p>\n<hr \/>\n<h3>\u767b\u5f55EMQX\u5e73\u53f0\u914d\u7f6e\u670d\u52a1\u5668<\/h3>\n<li>\u5c06\u524d\u6587\u4e2d\u901a\u8fc7OpenSSL\u5de5\u5177\u751f\u6210\u7684 emqx.pem\u3001emqx.key \u53ca my_root_ca.pem \u6587\u4ef6\u62f7\u8d1d\u5230 EMQX \u7684 etc\/certs\/ \u76ee\u5f55\u4e0b&#xff0c;\u5e76\u53c2\u8003\u5982\u4e0b\u914d\u7f6e\u4fee\u6539 emqx.conf&#xff1a;<\/li>\n<p>## listener.ssl.$name is the IP address and port that the MQTT\/SSL<br \/>\n## Value: IP:Port | Port<br \/>\nlistener.ssl.external &#061; 8084<\/p>\n<p>## Path to the file containing the user&#039;s private PEM-encoded key.<br \/>\n## Value: File<br \/>\nlistener.ssl.external.keyfile &#061; etc\/certs\/emqx.key<\/p>\n<p>## Path to a file containing the user certificate.<br \/>\n## Value: File<br \/>\nlistener.ssl.external.certfile &#061; etc\/certs\/emqx.pem<\/p>\n<p>## Path to the file containing PEM-encoded CA certificates. The CA certificates<br \/>\n## Value: File<br \/>\nlistener.ssl.external.cacertfile &#061; etc\/certs\/my_root_ca.pem<\/p>\n<p>\u535a\u4e3b8084\u7aef\u53e3\u90e8\u5206\u4fee\u6539\u4e4b\u540e\u662f\u8fd9\u6837\u7684\u2193<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124804-68024a0476132.png\" alt=\"emqx\u914d\u7f6e\u6587\u4ef6\u4fee\u6539\u540e\u4ee3\u7801\u53c2\u8003\" \/><\/p>\n<li>\u6253\u5f00 Dashboard&#xff0c;\u70b9\u51fb\u7ba1\u7406 -&gt; \u76d1\u542c\u5668\u8fdb\u5165\u76d1\u542c\u5668\u7ba1\u7406\u9875\u9762<\/li>\n<p>\u6253\u5f008084\u7aef\u53e3\u914d\u7f6e\u754c\u9762&#xff0c;\u91cd\u65b0\u8bbe\u7f6eTLS Cert&#xff0c;TLS Key\u548cCA Cert&#xff0c;\u5206\u522b\u5bf9\u5e94\u4e0a\u4f20emqx.pem&#xff0c;emqx.key&#xff0c;my_root_ca.pem\u6587\u4ef6<\/p>\n<hr \/>\n<h5>&#x1f6a9;\u6ce8\u610f<\/h5>\n<ul>\n<li>\n<p>\u8fd9\u91cc\u7c7b\u578b\u4e24\u4e2a\u5b57\u4e0b\u9762\u6846\u91cc\u7684\u5185\u5bb9\u8981\u63d0\u524d\u8bbe\u7f6e\u6210wss\u8981\u4e0d\u7136SSL\/TLS\u8fde\u63a5\u6ca1\u6cd5\u7528<\/p>\n<\/li>\n<li>\n<p>\u53e6\u5916SSL\u7248\u672c\u6700\u597d\u662f\u8fd9\u6837<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124804-68024a048bf98.png\" alt=\"\u5b98\u65b9\u6587\u6863\u5efa\u8bae\u6dfb\u52a0\u7684SSL\u7248\u672c\" \/><\/p>\n<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u7ae0\u524d\u7684\u53c2\u8003\u6587\u6863\u90fd\u8bf4\u660e\u4e86&#xff0c;\u8fd9\u91cc\u518d\u63d0\u9192\u4e00\u4e0b&#xff0c;\u5176\u4ed6\u8bbe\u7f6e\u57fa\u672c\u9ed8\u8ba4&#xff0c;\u51fa\u95ee\u9898\u56de\u53bb\u770b\u5b98\u65b9\u6587\u6863<\/p>\n<hr \/>\n<li>\u91cd\u542fEMQX\u670d\u52a1\u5668<\/li>\n<p>emqx restart<\/p>\n<h3>\u4f7f\u7528MQTTX\u5ba2\u6237\u7aef\u6d4b\u8bd5\u8fde\u63a5<\/h3>\n<p>MQTTX\u5b98\u7f51&#x1f517;:MQTTX&#xff1a;\u5168\u529f\u80fd MQTT \u5ba2\u6237\u7aef\u5de5\u5177<\/p>\n<p>\u5b98\u65b9\u5b89\u88c5\u6587\u6863&#x1f517;:\u5b89\u88c5 &#8211; MQTTX \u6587\u6863<\/p>\n<p>\u5b98\u65b9\u4f7f\u7528\u6587\u6863&#x1f517;:MQTT \u5ba2\u6237\u7aef\u5de5\u5177\u6f14\u793a | EMQX \u6587\u6863<\/p>\n<h4>\u5355\u5411\u8ba4\u8bc1\u7684SSL\/TLS\u8fde\u63a5<\/h4>\n<li>\n<p>\u6253\u5f00MQTTX\u5ba2\u6237\u7aef&#xff0c;\u6dfb\u52a0\u8fde\u63a5&#xff0c;\u586b\u5199\u4fe1\u606f&#xff1a;<\/p>\n<p>\u540d\u79f0\u968f\u4fbf\u586b&#xff0c;Client ID\u968f\u673a<\/p>\n<p>\u670d\u52a1\u5668\u5730\u5740\u9009\u62e9wss:\/\/&#xff0c;\u540e\u9762\u586bIP\u5730\u5740&#xff0c;\u7aef\u53e38084<\/p>\n<p>SSL\u5b89\u5168\u6309\u94ae\u5173\u95ed<\/p>\n<p>\u8bc1\u4e66\u7c7b\u578b\u9009\u62e9CA or Self signed certificates&#xff0c;\u5728CA\u6587\u4ef6\u5904\u4e0a\u4f20\u6839&#xff08;CA&#xff09;\u8bc1\u4e66\u5373\u53ef&#xff0c;\u5ba2\u6237\u7aef\u8bc1\u4e66\u548c\u5ba2\u6237\u7aefkey\u6587\u4ef6\u4e24\u680f\u4e0d\u586b<\/p>\n<p>MQTT\u7248\u672c3.1.1<\/p>\n<\/li>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124804-68024a049b90a.png\" alt=\"\u5355\u5411\u8ba4\u8bc1\u8fde\u63a5\u8bbe\u7f6e\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124805-68024a050e8f2.png\" alt=\"\u5355\u5411\u8ba4\u8bc1\u8fde\u63a5\u8bbe\u7f6e\" \/><\/p>\n<li>\u70b9\u51fb\u8fde\u63a5\u6309\u94ae&#xff0c;\u8fde\u63a5\u6210\u529f<\/li>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124805-68024a0546e01.png\" alt=\"\u5355\u5411\u8ba4\u8bc1\u8fde\u63a5\u6210\u529f\" \/><\/p>\n<li>\u53d1\u9001\u6d4b\u8bd5\u6d88\u606f&#xff0c;\u53d1\u9001\u6210\u529f<\/li>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124805-68024a05568ba.png\" alt=\"\u5355\u5411\u8ba4\u8bc1\u6d4b\u8bd5\u6d88\u606f\u53d1\u9001\u6210\u529f\" \/><\/p>\n<li>\n<p>\u53c2\u8003\u5b98\u65b9\u4f7f\u7528\u6587\u6863\u7684\u6b65\u9aa4&#x1f517;MQTT \u5ba2\u6237\u7aef\u5de5\u5177\u6f14\u793a | EMQX \u6587\u6863&#xff0c;\u521b\u5efa\u53e6\u4e00\u4e2a\u8fde\u63a5\u4f5c\u4e3a\u6d88\u606f\u63a5\u53d7\u5ba2\u6237\u7aef&#xff08;\u914d\u7f6e\u4e0e\u4e4b\u524d\u76f8\u540c&#xff09;&#xff0c;\u6dfb\u52a0\u8ba2\u9605&#xff0c;\u5728Topic\u4e2d\u8f93\u5165test<\/p>\n<p>\u63a5\u7740\u5728\u539f\u6765\u7684EMQX_SSL_TEST\u8fde\u63a5\u91cd\u65b0\u53d1\u9001test\u6d88\u606f&#xff0c;\u5ba2\u6237\u7aef\u4f1a\u6536\u5230\u65b0\u6d88\u606f<\/p>\n<\/li>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124805-68024a0598535.png\" alt=\"\u5355\u5411\u8ba4\u8bc1\u8ba2\u9605\u6d88\u606f\u6d4b\u8bd5\u6210\u529f\" \/><\/p>\n<h4>\u53cc\u5411\u8ba4\u8bc1\u7684SSL\/TLS\u8fde\u63a5<\/h4>\n<p>\u9664\u4e86SSL\u5b89\u5168\u6309\u94ae\u542f\u52a8\u548c\u586b\u5165\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001key\u6587\u4ef6\u4e4b\u5916&#xff0c;\u4e0e\u5355\u5411\u8ba4\u8bc1\u6ca1\u6709\u4ec0\u4e48\u533a\u522b&#xff0c;\u5177\u4f53\u770b\u56fe&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124805-68024a05c8f10.png\" alt=\"\u53cc\u5411\u8ba4\u8bc1\u8fde\u63a5\u8bbe\u7f6e\" \/><\/p>\n<p>\u81f3\u6b64&#xff0c;\u6240\u6709\u6d4b\u8bd5\u8fde\u63a5\u6210\u529f\u221a&#xff0c;\u4f60\u4f1a\u5728EMQX\u76d1\u542c\u5668\u4e0a\u770b\u89c1\u8fde\u63a5\u6570\u589e\u52a0\u3002<\/p>\n<p>\u53c2\u8003\u6587\u7ae0\u94fe\u63a5&#xff1a;<\/p>\n<li>EMQ X MQTT \u670d\u52a1\u5668\u542f\u7528 SSL\/TLS \u5b89\u5168\u8fde\u63a5<\/li>\n<li>\u5f00\u542f SSL\/TLS \u8fde\u63a5 | EMQX \u6587\u6863<\/li>\n<li>\u83b7\u53d6 SSL\/TLS \u8bc1\u4e66 | EMQX \u6587\u6863<\/li>\n<li>MQTT \u5ba2\u6237\u7aef\u5de5\u5177\u6f14\u793a | EMQX \u6587\u6863<\/li>\n<li>\u7ba1\u7406 | EMQX \u6587\u6863<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.8k\u6b21\uff0c\u70b9\u8d5e44\u6b21\uff0c\u6536\u85cf56\u6b21\u3002\u4e00\u3001\u91c7\u75288084\u7aef\u53e3\u8fdb\u884c\u8fde\u63a5\uff0c\u662fEMQX \u9ed8\u8ba4\u63d0\u4f9b\u4e86\u56db\u4e2a\u5e38\u7528\u7684\u76d1\u542c\u5668\u4e4b\u4e00\uff0c\u5982\u679c\u9700\u8981\u6dfb\u52a0\u5176\u4ed6\u7c7b\u578b\u7684\u76d1\u542c\u5668\uff0c\u53ef\u53c2\u8003\u5b98\u65b9\u6587\u6863\u4e8c\u3001\u4f7f\u7528\u81ea\u7b7e\u540dCA\uff0c\u9700\u8981\u63d0\u524d\u5728Linux\u7cfb\u7edf\u4e0a\u5b89\u88c5OpenSSL\uff0c\u5177\u4f53\u5b89\u88c5\u6559\u7a0b\u8bf7\u81ea\u884c\u641c\u7d22\u4e09\u3001\u91c7\u7528SSL\/TLS\u8fde\u63a5\uff0c\u9700\u8981\u63d0\u524d\u5728EMQX\u4e0a\u542f\u7528\uff0c\u53ef\u53c2\u8003\u94fe\u63a5\u5982\u4e0b_emqx wss<\/p>\n","protected":false},"author":2,"featured_media":13915,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[606,43,867,44],"topic":[],"class_list":["post-13923","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-ssl","tag-43","tag-867","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[MQTT]\u670d\u52a1\u5668EMQX\u642d\u5efaSSL\/TLS\u8fde\u63a5\u8fc7\u7a0b\uff08wss:\/\/) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/13923.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[MQTT]\u670d\u52a1\u5668EMQX\u642d\u5efaSSL\/TLS\u8fde\u63a5\u8fc7\u7a0b\uff08wss:\/\/) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.8k\u6b21\uff0c\u70b9\u8d5e44\u6b21\uff0c\u6536\u85cf56\u6b21\u3002\u4e00\u3001\u91c7\u75288084\u7aef\u53e3\u8fdb\u884c\u8fde\u63a5\uff0c\u662fEMQX \u9ed8\u8ba4\u63d0\u4f9b\u4e86\u56db\u4e2a\u5e38\u7528\u7684\u76d1\u542c\u5668\u4e4b\u4e00\uff0c\u5982\u679c\u9700\u8981\u6dfb\u52a0\u5176\u4ed6\u7c7b\u578b\u7684\u76d1\u542c\u5668\uff0c\u53ef\u53c2\u8003\u5b98\u65b9\u6587\u6863\u4e8c\u3001\u4f7f\u7528\u81ea\u7b7e\u540dCA\uff0c\u9700\u8981\u63d0\u524d\u5728Linux\u7cfb\u7edf\u4e0a\u5b89\u88c5OpenSSL\uff0c\u5177\u4f53\u5b89\u88c5\u6559\u7a0b\u8bf7\u81ea\u884c\u641c\u7d22\u4e09\u3001\u91c7\u7528SSL\/TLS\u8fde\u63a5\uff0c\u9700\u8981\u63d0\u524d\u5728EMQX\u4e0a\u542f\u7528\uff0c\u53ef\u53c2\u8003\u94fe\u63a5\u5982\u4e0b_emqx wss\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/13923.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T12:48:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124804-68024a0476132.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/13923.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/13923.html\",\"name\":\"[MQTT]\u670d\u52a1\u5668EMQX\u642d\u5efaSSL\/TLS\u8fde\u63a5\u8fc7\u7a0b\uff08wss:\/\/) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T12:48:07+00:00\",\"dateModified\":\"2025-04-18T12:48:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/13923.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/13923.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/13923.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[MQTT]\u670d\u52a1\u5668EMQX\u642d\u5efaSSL\/TLS\u8fde\u63a5\u8fc7\u7a0b\uff08wss:\/\/)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[MQTT]\u670d\u52a1\u5668EMQX\u642d\u5efaSSL\/TLS\u8fde\u63a5\u8fc7\u7a0b\uff08wss:\/\/) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/13923.html","og_locale":"zh_CN","og_type":"article","og_title":"[MQTT]\u670d\u52a1\u5668EMQX\u642d\u5efaSSL\/TLS\u8fde\u63a5\u8fc7\u7a0b\uff08wss:\/\/) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.8k\u6b21\uff0c\u70b9\u8d5e44\u6b21\uff0c\u6536\u85cf56\u6b21\u3002\u4e00\u3001\u91c7\u75288084\u7aef\u53e3\u8fdb\u884c\u8fde\u63a5\uff0c\u662fEMQX \u9ed8\u8ba4\u63d0\u4f9b\u4e86\u56db\u4e2a\u5e38\u7528\u7684\u76d1\u542c\u5668\u4e4b\u4e00\uff0c\u5982\u679c\u9700\u8981\u6dfb\u52a0\u5176\u4ed6\u7c7b\u578b\u7684\u76d1\u542c\u5668\uff0c\u53ef\u53c2\u8003\u5b98\u65b9\u6587\u6863\u4e8c\u3001\u4f7f\u7528\u81ea\u7b7e\u540dCA\uff0c\u9700\u8981\u63d0\u524d\u5728Linux\u7cfb\u7edf\u4e0a\u5b89\u88c5OpenSSL\uff0c\u5177\u4f53\u5b89\u88c5\u6559\u7a0b\u8bf7\u81ea\u884c\u641c\u7d22\u4e09\u3001\u91c7\u7528SSL\/TLS\u8fde\u63a5\uff0c\u9700\u8981\u63d0\u524d\u5728EMQX\u4e0a\u542f\u7528\uff0c\u53ef\u53c2\u8003\u94fe\u63a5\u5982\u4e0b_emqx wss","og_url":"https:\/\/www.wsisp.com\/helps\/13923.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T12:48:07+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418124804-68024a0476132.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/13923.html","url":"https:\/\/www.wsisp.com\/helps\/13923.html","name":"[MQTT]\u670d\u52a1\u5668EMQX\u642d\u5efaSSL\/TLS\u8fde\u63a5\u8fc7\u7a0b\uff08wss:\/\/) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T12:48:07+00:00","dateModified":"2025-04-18T12:48:07+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/13923.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/13923.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/13923.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"[MQTT]\u670d\u52a1\u5668EMQX\u642d\u5efaSSL\/TLS\u8fde\u63a5\u8fc7\u7a0b\uff08wss:\/\/)"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/13923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=13923"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/13923\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/13915"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=13923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=13923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=13923"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=13923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}