listeners.ssl.conf.example 2.3 KB

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