Mercurial > prosody-hg
comparison util/prosodyctl/check.lua @ 14220:8f34af6a3821 13.0
prosodyctl check: Validate tls_profile and tls_profile_version
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 12 Jun 2026 13:04:54 +0100 |
| parents | 48ea7a15957e |
| children | 565debd9c37a |
comparison
equal
deleted
inserted
replaced
| 14219:7f4fcbb1bbe4 | 14220:8f34af6a3821 |
|---|---|
| 462 "statistics", | 462 "statistics", |
| 463 "statistics_config", | 463 "statistics_config", |
| 464 "statistics_interval", | 464 "statistics_interval", |
| 465 "tcp_keepalives", | 465 "tcp_keepalives", |
| 466 "tls_profile", | 466 "tls_profile", |
| 467 "tls_profile_version", | |
| 467 "trusted_proxies", | 468 "trusted_proxies", |
| 468 "umask", | 469 "umask", |
| 469 "use_dane", | 470 "use_dane", |
| 470 "use_ipv4", | 471 "use_ipv4", |
| 471 "use_ipv6", | 472 "use_ipv6", |
| 721 elseif require_encryption and not all_modules:contains("tls") then | 722 elseif require_encryption and not all_modules:contains("tls") then |
| 722 print(""); | 723 print(""); |
| 723 print(" You require encryption but mod_tls is not enabled."); | 724 print(" You require encryption but mod_tls is not enabled."); |
| 724 print(" Connections will fail."); | 725 print(" Connections will fail."); |
| 725 ok = false; | 726 ok = false; |
| 727 end | |
| 728 | |
| 729 do | |
| 730 local tlsref = require "prosody.util.tlsref"; | |
| 731 local tls_profile_name = configmanager.get("*", "tls_profile"); | |
| 732 local tls_profile_version = configmanager.get("*", "tls_profile_version"); | |
| 733 local profile, err = tlsref.get_profile(tls_profile_version, tls_profile_name); | |
| 734 if not profile then | |
| 735 print(""); | |
| 736 print(" TLS profile selection:"); | |
| 737 if err == "unknown-version" then | |
| 738 print((" tls_profile_version is set to an unknown value (%q)"):format(tls_profile_version)); | |
| 739 print((" Valid values: \"%s\""):format(tlsref.get_valid_versions():concat("\", \""))); | |
| 740 elseif err == "unknown-profile" then | |
| 741 print((" tls_profile is set to an unknown value (%q)"):format(tls_profile_name)); | |
| 742 print((" Valid values: \"%s\""):format(tlsref.get_valid_profile_names():concat("\", \""))); | |
| 743 else | |
| 744 print((" Unknown error loading the configured profile: %s"):format(err)); | |
| 745 end | |
| 746 end | |
| 726 end | 747 end |
| 727 | 748 |
| 728 do | 749 do |
| 729 local registration_enabled_hosts = {}; | 750 local registration_enabled_hosts = {}; |
| 730 for host in enabled_hosts() do | 751 for host in enabled_hosts() do |
