Skip to content

Commit

Permalink
Fix SignatureVerifier PEM loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Oct 5, 2021
1 parent fa8b812 commit 0f72a64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion certverify/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package certverify
import (
"crypto/x509"
"errors"

"github.com/micromdm/nanomdm/cryptoutil"
)

// SignatureVerifier is a simple certificate verifier
Expand All @@ -12,7 +14,7 @@ type SignatureVerifier struct {

// NewSignatureVerifier creates a new Verifier
func NewSignatureVerifier(rootPEM []byte) (*SignatureVerifier, error) {
ca, err := x509.ParseCertificate(rootPEM)
ca, err := cryptoutil.DecodePEMCertificate(rootPEM)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 0f72a64

Please sign in to comment.