mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: Fix failure to verify driver file signature since it is signed by Microsoft not us.
This caused a failure when creating Traveler Disk
This commit is contained in:
@@ -425,6 +425,15 @@ static unsigned char gpbSha256CodeSignCertFingerprint[64] = {
|
|||||||
0xDB, 0x6F, 0xC0, 0x62
|
0xDB, 0x6F, 0xC0, 0x62
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static unsigned char gpbSha256MSCodeSignCertFingerprint[64] = {
|
||||||
|
0x9C, 0x96, 0x81, 0x3B, 0x88, 0x54, 0xCB, 0x81, 0xB5, 0x94, 0x40, 0x4E,
|
||||||
|
0x15, 0x81, 0x20, 0xA1, 0x19, 0x00, 0x4E, 0x49, 0x8A, 0xA8, 0x98, 0x13,
|
||||||
|
0x9D, 0xE2, 0x86, 0x6A, 0xC1, 0xFA, 0xD3, 0x00, 0x0D, 0xAC, 0xE9, 0xE3,
|
||||||
|
0x3B, 0xFC, 0x6B, 0x26, 0xCE, 0xC8, 0xE2, 0x36, 0x3B, 0x60, 0x9C, 0x8E,
|
||||||
|
0x0A, 0x2A, 0x74, 0x20, 0xD7, 0x4E, 0x0F, 0xEE, 0x2E, 0x79, 0xE2, 0xAF,
|
||||||
|
0x1C, 0x90, 0x0B, 0x9C
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef HRESULT (WINAPI *SHGETKNOWNFOLDERPATH) (
|
typedef HRESULT (WINAPI *SHGETKNOWNFOLDERPATH) (
|
||||||
_In_ REFKNOWNFOLDERID rfid,
|
_In_ REFKNOWNFOLDERID rfid,
|
||||||
@@ -14224,7 +14233,9 @@ BOOL VerifyModuleSignature (const wchar_t* path)
|
|||||||
BYTE hashVal[64];
|
BYTE hashVal[64];
|
||||||
sha512 (hashVal, pProviderCert->pCert->pbCertEncoded, pProviderCert->pCert->cbCertEncoded);
|
sha512 (hashVal, pProviderCert->pCert->pbCertEncoded, pProviderCert->pCert->cbCertEncoded);
|
||||||
|
|
||||||
if (0 == memcmp (hashVal, gpbSha256CodeSignCertFingerprint, 64))
|
if ( (0 == memcmp (hashVal, gpbSha256CodeSignCertFingerprint, 64))
|
||||||
|
|| (0 == memcmp (hashVal, gpbSha256MSCodeSignCertFingerprint, 64))
|
||||||
|
)
|
||||||
{
|
{
|
||||||
bResult = TRUE;
|
bResult = TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user