chore(schema): check tls_version if psk_cipher configured

This commit is contained in:
JianBo He 2022-03-31 11:55:48 +08:00
parent 024c7c59b7
commit 759b1dacdf
1 changed files with 8 additions and 1 deletions

View File

@ -2100,7 +2100,14 @@ end}.
{TLSCiphers, undefined} ->
SplitFun(TLSCiphers);
{undefined, PSKCiphers} ->
MapPSKCiphers(SplitFun(PSKCiphers));
case Versions == undefined orelse lists:member('tlsv1.3', Versions) of
true ->
cuttlefish:invalid(
Prefix++".tls_versions cannot contain tlsv1.3 "
"if "++Prefix++".psk_ciphers is configured");
_ ->
MapPSKCiphers(SplitFun(PSKCiphers))
end;
{_TLSCiphers, _PSKCiphers} ->
cuttlefish:invalid(Prefix++".ciphers and "++Prefix++".psk_ciphers cannot be configured at the same time")
end,