Fix broken build on windows. (#36)

* Attempt to read the EK from NVRAM if the system cert store cannot provide it.

* Fix broken build on windows.
This commit is contained in:
Tom D 2019-06-06 13:15:55 -07:00 committed by GitHub
parent 3dc8a7d841
commit 7f17046a60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -395,7 +395,7 @@ 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 intead.
if len(c) == 0 {
buf, err = getNCryptBufferProperty(h.hProv, "PCP_EKNVCERT")
buf, err := getNCryptBufferProperty(h.hProv, "PCP_EKNVCERT")
if err != nil {
return nil, fmt.Errorf("Failed to read PCP_EKNVCERT: %v", err)
}