Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-10-29 19:34:35 +01:00
parent 6f2bd9c92f
commit a2b5d03b62

View File

@@ -19,6 +19,8 @@ import (
"encoding/pem"
"fmt"
"net/url"
pemutil "github.com/getprobo/probo/pkg/crypto/pem"
)
type ValidationError struct {
@@ -114,7 +116,7 @@ func validateCertificate(certPEM string) error {
return fmt.Errorf("cannot parse certificate PEM")
}
if block.Type != "CERTIFICATE" {
if block.Type != pemutil.BlockTypeCertificate {
return fmt.Errorf("PEM block type must be CERTIFICATE (found: %s)", block.Type)
}