Skip to content

Commit

Permalink
Guard nil certificate in signature checker
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Feb 7, 2023
1 parent c90f186 commit 91f26b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions certverify/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ func NewSignatureVerifier(rootPEM []byte) (*SignatureVerifier, error) {
if err != nil {
return nil, err
}
if ca == nil {
return nil, errors.New("nil PEM certificate")
}
return &SignatureVerifier{ca: ca}, nil
}

Expand Down

0 comments on commit 91f26b5

Please sign in to comment.