listeners.ssl.conf.example 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ##--------------------------------------------------------------------
  2. ## SSL Listener
  3. ##
  4. ## Add a SSL Listener
  5. ##--------------------------------------------------------------------
  6. ## Note: This is an example of how to configure this feature
  7. ## you should copy and paste the below data into the emqx.conf for working
  8. ## The SSL listener also supports all the fields listed in listeners.tcp.conf.example
  9. ## only the SSL-specific fields are shown here
  10. ## Note: Modifying the 'sslname' to what you need
  11. listeners.ssl.sslname {
  12. ## Port or Address to listen on, 0 means disable
  13. bind = 8883 ## or with an IP e.g. "127.0.0.1:8883"
  14. ssl_options {
  15. ## Trusted PEM format CA certificates bundle file
  16. cacertfile = "data/certs/cacert.pem"
  17. ## PEM format certificates chain file
  18. certfile = "data/certs/cert.pem"
  19. ## PEM format private key file
  20. keyfile = "data/certs/key.pem"
  21. ## Enable or disable peer verification
  22. verify = verify_none ## use verify_peer to enable
  23. ## if `verify' is ebabled, whit true, the connection fails if the client does not have a certificate to send
  24. fail_if_no_peer_cert = false
  25. ## Enable TLS session reuse
  26. reuse_sessions = true
  27. ## Maximum number of non-self-issued intermediate certificates that can follow the peer certificate in a valid certification path
  28. depth = 10
  29. ## Which versions are to be supported
  30. versions = [tlsv1.3, tlsv1.2]
  31. ## TLS cipher suite names
  32. ## Note: By default, all available suites are supported, you do not need to set this
  33. ciphers = ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]
  34. ## Allows a client and a server to renegotiate the parameters of the SSL connection on the fly
  35. secure_renegotiate = true
  36. ## Log level for SSL communication
  37. ## Type: emergency | alert | critical | error | warning | notice | info | debug | none | all
  38. log_level = notice
  39. ## Hibernate the SSL process after idling for amount of time reducing its memory footprint
  40. hibernate_after = 5s
  41. ## Forces the cipher to be set based on the server-specified order instead of the client-specified order
  42. honor_cipher_order = true
  43. ## Setting this to false to disable client-initiated renegotiation
  44. client_renegotiation = true
  45. ## Maximum time duration allowed for the handshake to complete
  46. handshake_timeout = 15s
  47. }
  48. }