[pmg-devel] [PATCH pmg-api] add pmg_verify_tls_policy_strict and use it in API
Dietmar Maurer
dietmar at proxmox.com
Thu Sep 27 06:58:39 CEST 2018
> +# TODO: extend to parse attributes of the policy
> +my $VALID_TLS_POLICY_RE = qr/none|may|encrypt|dane|dane-only|fingerprint|verify|secure/;
> sub pmg_verify_tls_policy {
> my ($policy, $noerr) = @_;
>
> - # TODO: extend to parse attributes of the policy
> - my $valid_policy = qr/none|may|encrypt|dane|dane-only|fingerprint|verify|secure/;
> -
> - if ($policy !~ /^${valid_policy}$/) {
> + if ($policy !~ /^$VALID_TLS_POLICY_RE/) {
The regex is wrong again. If there are attributes, there needs to be at least one whitespace after the policy name ...
More information about the pmg-devel
mailing list