Last active
October 3, 2023 15:53
-
-
Save zmstone/1c85eeaae20f7f5745ee92e288921b0e to your computer and use it in GitHub Desktop.
EMQX v5 add a new zone and link a SSL listener to it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Verified in EMQX 5.3.0 | |
## listeners in addition to the default ones | |
listeners { | |
ssl.certhash { | |
enable = true | |
# bind to port 8884 | |
bind = 8884 | |
# link it to zone named 'certhash' | |
zone = certhash | |
ssl_options { | |
# force the clients to send certificate | |
verify = verify_peer | |
fail_if_no_peer_cert = true | |
} | |
} | |
} | |
## zones in addition to 'default' | |
zones { | |
# the new zone is named 'certhash' | |
certhash { | |
mqtt { | |
# md5 hash of the DER format (but not PEM) of the client X.509 certificate | |
peer_cert_as_username = md5 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment