Skip to content

Commit

Permalink
secsipid: coherent form for CA in error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Oct 19, 2024
1 parent d146bf4 commit 5912b3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions secsipid/secsipid.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ func SJWTPubKeyVerify(pubKey []byte) (int, error) {
}
if (globalLibOptions.certVerify & CertVerifyOptCustCA) != 0 {
if len(globalLibOptions.certCAFile) <= 0 {
return SJWTRetErrCertNoCAFile, errors.New("no CA file")
return SJWTRetErrCertNoCAFile, errors.New("no custom CA file")
}

if rootCAs == nil {
rootCAs = x509.NewCertPool()
if rootCAs == nil {
return SJWTRetErrCertProcessing, errors.New("no new ca cert pool")
return SJWTRetErrCertProcessing, errors.New("no new CA cert pool")
}
}
var certsCA []byte
Expand All @@ -322,7 +322,7 @@ func SJWTPubKeyVerify(pubKey []byte) (int, error) {
}
interCAs = x509.NewCertPool()
if interCAs == nil {
return SJWTRetErrCertProcessing, errors.New("no new ca intermediate cert pool")
return SJWTRetErrCertProcessing, errors.New("no new CA intermediate cert pool")
}
var certsCA []byte
// Read in the cert file
Expand All @@ -343,7 +343,7 @@ func SJWTPubKeyVerify(pubKey []byte) (int, error) {
interCAs = x509.NewCertPool()
}
if interCAs == nil {
return SJWTRetErrCertProcessing, errors.New("no new ca intermediate cert pool")
return SJWTRetErrCertProcessing, errors.New("no new CA intermediate cert pool")
}
// Append our certs
for _, iCert := range certInter {
Expand Down

0 comments on commit 5912b3d

Please sign in to comment.