check for SAN and SANRegex

Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
Meredith Lancaster 2024-10-31 16:59:25 -06:00
parent 50cda0df44
commit a7a70fc91c

View file

@ -43,5 +43,8 @@ func (c EnforcementCriteria) Valid() error {
if c.PredicateType == "" {
return fmt.Errorf("PredicateType must be set")
}
if c.SANRegex == "" && c.SAN == "" {
return fmt.Errorf("SANRegex or SAN must be set")
}
return nil
}