mirror of
https://github.com/google/go-attestation.git
synced 2025-02-21 09:11:46 +00:00
Try reading the EKCert from PCP_EKNVCERT (#46)
This commit is contained in:
parent
113729bb8b
commit
372fcf25d0
@ -395,11 +395,11 @@ func (h *winPCP) EKCerts() ([]*x509.Certificate, error) {
|
||||
// Reading the certificate from the system store has failed.
|
||||
// Lets try reading the raw bytes directly from NVRAM instead.
|
||||
if len(c) == 0 {
|
||||
buf, err := getNCryptBufferProperty(h.hProv, "PCP_EKNVCERT")
|
||||
certs, err := getPCPCerts(h.hProv, "PCP_EKNVCERT")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to read PCP_EKNVCERT: %v", err)
|
||||
}
|
||||
c = append(c, buf)
|
||||
c = append(c, certs...)
|
||||
}
|
||||
|
||||
var out []*x509.Certificate
|
||||
|
Loading…
x
Reference in New Issue
Block a user