// Sample PE/COFF Image Hash Value (Digested by SHA-1).\r
// This value should be calculated following MSFT's Authenticode Specification\r
//\r
-GLOBAL_REMOVE_IF_UNREFERENCED UINT8 PeSha1Hash[] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED UINT8 PeSha1Hash[] = {\r
0x44, 0xFD, 0x4F, 0xA9, 0x17, 0xEE, 0xAC, 0xCF, 0x1F, 0x0B, 0xE3, 0xA1, 0x4D, 0x5B, 0xA6, 0x61,\r
0x82, 0x97, 0xC4, 0xB6\r
- };\r
+};\r
\r
//\r
// Sample PE/COFF Image Hash Value (Digested by SHA-256).\r
//\r
-GLOBAL_REMOVE_IF_UNREFERENCED UINT8 PeSha256Hash[] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED UINT8 PeSha256Hash[] = {\r
0x61, 0x82, 0xB7, 0xF8, 0x8C, 0xFF, 0xC2, 0xEB, 0x79, 0x6E, 0x9D, 0xA9, 0xDD, 0x39, 0x52, 0xDD,\r
0x36, 0xDD, 0xF1, 0x43, 0x27, 0x58, 0x8C, 0xA7, 0xCC, 0xAE, 0xDE, 0xDD, 0x3C, 0x02, 0x12, 0x49\r
- };\r
+};\r
\r
//\r
// Sample Authenticode Data with SHA-1 hash algorithm.\r
// This data should be retrieved from signed PE/COFF image according to SECURITY\r
// directory in PE/COFF Header.\r
//\r
-GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha1[] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha1[] = {\r
0x30, 0x82, 0x1C, 0x43, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x02, 0xA0,\r
0x82, 0x1C, 0x34, 0x30, 0x82, 0x1C, 0x30, 0x02, 0x01, 0x01, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x05,\r
0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00, 0x30, 0x68, 0x06, 0x0A, 0x2B, 0x06, 0x01, 0x04, 0x01,\r
0x0E, 0x99, 0x1F, 0xDF, 0x7E, 0xC9, 0x10, 0x56, 0xC7, 0x00, 0x6D, 0x5F, 0x23, 0x57, 0x12, 0x84,\r
0xCD, 0xAC, 0x82, 0xAE, 0x39, 0x52, 0xA5, 0x19, 0x23, 0xA3, 0x6B, 0xE7, 0x49, 0x8F, 0x86, 0x74,\r
0x46, 0x41, 0x2A, 0x0F, 0x3D, 0x29, 0xB7, 0xAE, 0x8C, 0x00\r
- };\r
+};\r
\r
//\r
// Sample Authenticode Data with SHA-256 hash algorithm.\r
// This data should be retrieved from signed PE/COFF image according to SECURITY\r
// directory in PE/COFF Header.\r
//\r
-GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha256[] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha256[] = {\r
0x30, 0x82, 0x0e, 0xd1, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0,\r
0x82, 0x0e, 0xc2, 0x30, 0x82, 0x0e, 0xbe, 0x02, 0x01, 0x01, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x09,\r
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x30, 0x5c, 0x06, 0x0a, 0x2b,\r
0x22, 0xb6, 0x17, 0x3f, 0x4f, 0x33, 0xed, 0xa6, 0xd9, 0x0f, 0x74, 0xfa, 0x97, 0x8d, 0x98, 0x55,\r
0x42, 0x14, 0x76, 0xd4, 0x89, 0x07, 0xf2, 0x30, 0x5a, 0x27, 0x96, 0x1b, 0x92, 0x70, 0x5a, 0x83,\r
0x89, 0x0f, 0xdb, 0x47, 0x7a, 0x00, 0x00, 0x00, 0x0a\r
- };\r
+};\r
\r
//\r
// Sample root certificate for code signing.\r
// A trusted certificate with self-signing, will be used to construct the certificate chains for\r
// authority checking.\r
//\r
-GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert1[] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert1[] = {\r
0x30, 0x82, 0x05, 0x99, 0x30, 0x82, 0x03, 0x81, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x79,\r
0xAD, 0x16, 0xA1, 0x4A, 0xA0, 0xA5, 0xAD, 0x4C, 0x73, 0x58, 0xF4, 0x07, 0x13, 0x2E, 0x65, 0x30,\r
0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, 0x5F,\r
0x6B, 0x9D, 0x4A, 0xFD, 0xD1, 0xA1, 0x9D, 0x99, 0x43, 0x77, 0x3F, 0xB0, 0xDA\r
};\r
\r
-GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert2[] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert2[] = {\r
0x30, 0x82, 0x05, 0xfd, 0x30, 0x82, 0x03, 0xe5, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x74,\r
0x45, 0xc8, 0x78, 0x4e, 0x0c, 0xc9, 0x96, 0x4a, 0xb4, 0x2f, 0xbc, 0xda, 0x29, 0xe1, 0xbc, 0x30,\r
0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x81,\r
0x5f, 0x70, 0x44, 0xfa, 0x89, 0x59, 0x93, 0xb0, 0x7b, 0x12, 0x0f, 0x5e, 0x62, 0x62, 0x51, 0x11,\r
0xbd, 0xba, 0x5a, 0xd0, 0xce, 0xa1, 0xb6, 0xef, 0x80, 0x20, 0xe6, 0x73, 0x4b, 0x11, 0x06, 0x56,\r
0xe2, 0x0a\r
- };\r
+};\r
\r
//\r
// OID ASN.1 Value for Hash Algorithms\r
//\r
-GLOBAL_REMOVE_IF_UNREFERENCED UINT8 HashOidValue[] = {\r
- 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, // OBJ_md5\r
- 0x2B, 0x0E, 0x03, 0x02, 0x1A, // OBJ_sha1\r
- 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04, // OBJ_sha224\r
- 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, // OBJ_sha256\r
- 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, // OBJ_sha384\r
- 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, // OBJ_sha512\r
- };\r
+GLOBAL_REMOVE_IF_UNREFERENCED UINT8 HashOidValue[] = {\r
+ 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, // OBJ_md5\r
+ 0x2B, 0x0E, 0x03, 0x02, 0x1A, // OBJ_sha1\r
+ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04, // OBJ_sha224\r
+ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, // OBJ_sha256\r
+ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, // OBJ_sha384\r
+ 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, // OBJ_sha512\r
+};\r
\r
UNIT_TEST_STATUS\r
EFIAPI\r
TestVerifyAuthenticodeVerify (\r
- IN UNIT_TEST_CONTEXT Context\r
+ IN UNIT_TEST_CONTEXT Context\r
)\r
{\r
BOOLEAN Status;\r
return UNIT_TEST_PASSED;\r
}\r
\r
-TEST_DESC mAuthenticodeTest[] = {\r
- //\r
- // -----Description--------------------------------------Class----------------------Function-----------------Pre---Post--Context\r
- //\r
- {"TestVerifyAuthenticodeVerify()", "CryptoPkg.BaseCryptLib.Authenticode", TestVerifyAuthenticodeVerify, NULL, NULL, NULL},\r
+TEST_DESC mAuthenticodeTest[] = {\r
+ //\r
+ // -----Description--------------------------------------Class----------------------Function-----------------Pre---Post--Context\r
+ //\r
+ { "TestVerifyAuthenticodeVerify()", "CryptoPkg.BaseCryptLib.Authenticode", TestVerifyAuthenticodeVerify, NULL, NULL, NULL },\r
};\r
\r
-UINTN mAuthenticodeTestNum = ARRAY_SIZE(mAuthenticodeTest);\r
+UINTN mAuthenticodeTestNum = ARRAY_SIZE (mAuthenticodeTest);\r