diff options
Diffstat (limited to 'src/burn/engine/payload.cpp')
| -rw-r--r-- | src/burn/engine/payload.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/burn/engine/payload.cpp b/src/burn/engine/payload.cpp index 392a3dd4..84c32eec 100644 --- a/src/burn/engine/payload.cpp +++ b/src/burn/engine/payload.cpp | |||
| @@ -132,6 +132,28 @@ extern "C" HRESULT PayloadsParseFromXml( | |||
| 132 | fValidFileSize = TRUE; | 132 | fValidFileSize = TRUE; |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | // @CertificateAuthorityKeyIdentifier | ||
| 136 | hr = XmlGetAttributeEx(pixnNode, L"CertificateRootPublicKeyIdentifier", &scz); | ||
| 137 | if (E_NOTFOUND != hr) | ||
| 138 | { | ||
| 139 | ExitOnFailure(hr, "Failed to get @CertificateRootPublicKeyIdentifier."); | ||
| 140 | |||
| 141 | hr = StrAllocHexDecode(scz, &pPayload->pbCertificateRootPublicKeyIdentifier, &pPayload->cbCertificateRootPublicKeyIdentifier); | ||
| 142 | ExitOnFailure(hr, "Failed to hex decode @CertificateRootPublicKeyIdentifier."); | ||
| 143 | |||
| 144 | pPayload->verification = BURN_PAYLOAD_VERIFICATION_AUTHENTICODE; | ||
| 145 | } | ||
| 146 | |||
| 147 | // @CertificateThumbprint | ||
| 148 | hr = XmlGetAttributeEx(pixnNode, L"CertificateRootThumbprint", &scz); | ||
| 149 | if (E_NOTFOUND != hr) | ||
| 150 | { | ||
| 151 | ExitOnFailure(hr, "Failed to get @CertificateRootThumbprint."); | ||
| 152 | |||
| 153 | hr = StrAllocHexDecode(scz, &pPayload->pbCertificateRootThumbprint, &pPayload->cbCertificateRootThumbprint); | ||
| 154 | ExitOnFailure(hr, "Failed to hex decode @CertificateRootThumbprint."); | ||
| 155 | } | ||
| 156 | |||
| 135 | // @Hash | 157 | // @Hash |
| 136 | hr = XmlGetAttributeEx(pixnNode, L"Hash", &scz); | 158 | hr = XmlGetAttributeEx(pixnNode, L"Hash", &scz); |
| 137 | if (E_NOTFOUND != hr) | 159 | if (E_NOTFOUND != hr) |
| @@ -191,6 +213,8 @@ extern "C" void PayloadUninitialize( | |||
| 191 | ReleaseStr(pPayload->sczKey); | 213 | ReleaseStr(pPayload->sczKey); |
| 192 | ReleaseStr(pPayload->sczFilePath); | 214 | ReleaseStr(pPayload->sczFilePath); |
| 193 | ReleaseMem(pPayload->pbHash); | 215 | ReleaseMem(pPayload->pbHash); |
| 216 | ReleaseMem(pPayload->pbCertificateRootThumbprint); | ||
| 217 | ReleaseMem(pPayload->pbCertificateRootPublicKeyIdentifier); | ||
| 194 | ReleaseStr(pPayload->sczSourcePath); | 218 | ReleaseStr(pPayload->sczSourcePath); |
| 195 | ReleaseStr(pPayload->sczLocalFilePath); | 219 | ReleaseStr(pPayload->sczLocalFilePath); |
| 196 | ReleaseStr(pPayload->downloadSource.sczUrl); | 220 | ReleaseStr(pPayload->downloadSource.sczUrl); |
