pkg/capabilities/VerifyCert() returns a (bool, err). In the case that it returns (false, err), the error is not a runtime error but it may contain the reason for the failed certificate verification.
Return a (CertificateVerficationResponse{},err) instead, which contains the bool trusted and a reason, or a runtime error.
Description
Relates to https://github.com/kubewarden/cel-policy/issues/15.
pkg/capabilities/VerifyCert()
returns a(bool, err)
. In the case that it returns(false, err)
, the error is not a runtime error but it may contain the reason for the failed certificate verification.Return a
(CertificateVerficationResponse{},err)
instead, which contains the bool trusted and a reason, or a runtime error.Test
CI.
Additional Information
Tradeoff
Potential improvement