mirror of
https://github.com/google/go-attestation.git
synced 2024-12-19 04:57:59 +00:00
Ignore slightly malformed EKs so attestation can continue. (#24)
This commit is contained in:
parent
b6bb3dba4c
commit
8e4a5ce762
@ -206,7 +206,7 @@ func (h *winPCP) EKCerts() ([]*x509.Certificate, error) {
|
||||
var out []*x509.Certificate
|
||||
for _, der := range c {
|
||||
cert, err := x509.ParseCertificate(der)
|
||||
if err != nil {
|
||||
if err != nil && x509.IsFatal(err) {
|
||||
return nil, err
|
||||
}
|
||||
out = append(out, cert)
|
||||
|
@ -181,7 +181,7 @@ func (t *TPM) readEKCert12() ([]*x509.Certificate, error) {
|
||||
return nil, err
|
||||
}
|
||||
cert, err := x509.ParseCertificate(ekcert)
|
||||
if err != nil {
|
||||
if err != nil && x509.IsFatal(err) {
|
||||
return nil, err
|
||||
}
|
||||
return []*x509.Certificate{cert}, nil
|
||||
|
Loading…
Reference in New Issue
Block a user