CryptoPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the CryptoPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
2b16a4fb91
commit
7c34237831
@@ -12,25 +12,25 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
// Sample PE/COFF Image Hash Value (Digested by SHA-1).
|
||||
// This value should be calculated following MSFT's Authenticode Specification
|
||||
//
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 PeSha1Hash[] = {
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 PeSha1Hash[] = {
|
||||
0x44, 0xFD, 0x4F, 0xA9, 0x17, 0xEE, 0xAC, 0xCF, 0x1F, 0x0B, 0xE3, 0xA1, 0x4D, 0x5B, 0xA6, 0x61,
|
||||
0x82, 0x97, 0xC4, 0xB6
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
// Sample PE/COFF Image Hash Value (Digested by SHA-256).
|
||||
//
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 PeSha256Hash[] = {
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 PeSha256Hash[] = {
|
||||
0x61, 0x82, 0xB7, 0xF8, 0x8C, 0xFF, 0xC2, 0xEB, 0x79, 0x6E, 0x9D, 0xA9, 0xDD, 0x39, 0x52, 0xDD,
|
||||
0x36, 0xDD, 0xF1, 0x43, 0x27, 0x58, 0x8C, 0xA7, 0xCC, 0xAE, 0xDE, 0xDD, 0x3C, 0x02, 0x12, 0x49
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
// Sample Authenticode Data with SHA-1 hash algorithm.
|
||||
// This data should be retrieved from signed PE/COFF image according to SECURITY
|
||||
// directory in PE/COFF Header.
|
||||
//
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha1[] = {
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha1[] = {
|
||||
0x30, 0x82, 0x1C, 0x43, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x02, 0xA0,
|
||||
0x82, 0x1C, 0x34, 0x30, 0x82, 0x1C, 0x30, 0x02, 0x01, 0x01, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x05,
|
||||
0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00, 0x30, 0x68, 0x06, 0x0A, 0x2B, 0x06, 0x01, 0x04, 0x01,
|
||||
@@ -484,14 +484,14 @@ GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha1[] = {
|
||||
0x0E, 0x99, 0x1F, 0xDF, 0x7E, 0xC9, 0x10, 0x56, 0xC7, 0x00, 0x6D, 0x5F, 0x23, 0x57, 0x12, 0x84,
|
||||
0xCD, 0xAC, 0x82, 0xAE, 0x39, 0x52, 0xA5, 0x19, 0x23, 0xA3, 0x6B, 0xE7, 0x49, 0x8F, 0x86, 0x74,
|
||||
0x46, 0x41, 0x2A, 0x0F, 0x3D, 0x29, 0xB7, 0xAE, 0x8C, 0x00
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
// Sample Authenticode Data with SHA-256 hash algorithm.
|
||||
// This data should be retrieved from signed PE/COFF image according to SECURITY
|
||||
// directory in PE/COFF Header.
|
||||
//
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha256[] = {
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha256[] = {
|
||||
0x30, 0x82, 0x0e, 0xd1, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0,
|
||||
0x82, 0x0e, 0xc2, 0x30, 0x82, 0x0e, 0xbe, 0x02, 0x01, 0x01, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x09,
|
||||
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x30, 0x5c, 0x06, 0x0a, 0x2b,
|
||||
@@ -730,14 +730,14 @@ GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithSha256[] = {
|
||||
0x22, 0xb6, 0x17, 0x3f, 0x4f, 0x33, 0xed, 0xa6, 0xd9, 0x0f, 0x74, 0xfa, 0x97, 0x8d, 0x98, 0x55,
|
||||
0x42, 0x14, 0x76, 0xd4, 0x89, 0x07, 0xf2, 0x30, 0x5a, 0x27, 0x96, 0x1b, 0x92, 0x70, 0x5a, 0x83,
|
||||
0x89, 0x0f, 0xdb, 0x47, 0x7a, 0x00, 0x00, 0x00, 0x0a
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
// Sample root certificate for code signing.
|
||||
// A trusted certificate with self-signing, will be used to construct the certificate chains for
|
||||
// authority checking.
|
||||
//
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert1[] = {
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert1[] = {
|
||||
0x30, 0x82, 0x05, 0x99, 0x30, 0x82, 0x03, 0x81, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x79,
|
||||
0xAD, 0x16, 0xA1, 0x4A, 0xA0, 0xA5, 0xAD, 0x4C, 0x73, 0x58, 0xF4, 0x07, 0x13, 0x2E, 0x65, 0x30,
|
||||
0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, 0x5F,
|
||||
@@ -830,7 +830,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert1[] = {
|
||||
0x6B, 0x9D, 0x4A, 0xFD, 0xD1, 0xA1, 0x9D, 0x99, 0x43, 0x77, 0x3F, 0xB0, 0xDA
|
||||
};
|
||||
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert2[] = {
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert2[] = {
|
||||
0x30, 0x82, 0x05, 0xfd, 0x30, 0x82, 0x03, 0xe5, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x74,
|
||||
0x45, 0xc8, 0x78, 0x4e, 0x0c, 0xc9, 0x96, 0x4a, 0xb4, 0x2f, 0xbc, 0xda, 0x29, 0xe1, 0xbc, 0x30,
|
||||
0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x81,
|
||||
@@ -928,24 +928,24 @@ GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TestRootCert2[] = {
|
||||
0x5f, 0x70, 0x44, 0xfa, 0x89, 0x59, 0x93, 0xb0, 0x7b, 0x12, 0x0f, 0x5e, 0x62, 0x62, 0x51, 0x11,
|
||||
0xbd, 0xba, 0x5a, 0xd0, 0xce, 0xa1, 0xb6, 0xef, 0x80, 0x20, 0xe6, 0x73, 0x4b, 0x11, 0x06, 0x56,
|
||||
0xe2, 0x0a
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
// OID ASN.1 Value for Hash Algorithms
|
||||
//
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 HashOidValue[] = {
|
||||
0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, // OBJ_md5
|
||||
0x2B, 0x0E, 0x03, 0x02, 0x1A, // OBJ_sha1
|
||||
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04, // OBJ_sha224
|
||||
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, // OBJ_sha256
|
||||
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, // OBJ_sha384
|
||||
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, // OBJ_sha512
|
||||
};
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 HashOidValue[] = {
|
||||
0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, // OBJ_md5
|
||||
0x2B, 0x0E, 0x03, 0x02, 0x1A, // OBJ_sha1
|
||||
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04, // OBJ_sha224
|
||||
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, // OBJ_sha256
|
||||
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, // OBJ_sha384
|
||||
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, // OBJ_sha512
|
||||
};
|
||||
|
||||
UNIT_TEST_STATUS
|
||||
EFIAPI
|
||||
TestVerifyAuthenticodeVerify (
|
||||
IN UNIT_TEST_CONTEXT Context
|
||||
IN UNIT_TEST_CONTEXT Context
|
||||
)
|
||||
{
|
||||
BOOLEAN Status;
|
||||
@@ -992,11 +992,11 @@ TestVerifyAuthenticodeVerify (
|
||||
return UNIT_TEST_PASSED;
|
||||
}
|
||||
|
||||
TEST_DESC mAuthenticodeTest[] = {
|
||||
//
|
||||
// -----Description--------------------------------------Class----------------------Function-----------------Pre---Post--Context
|
||||
//
|
||||
{"TestVerifyAuthenticodeVerify()", "CryptoPkg.BaseCryptLib.Authenticode", TestVerifyAuthenticodeVerify, NULL, NULL, NULL},
|
||||
TEST_DESC mAuthenticodeTest[] = {
|
||||
//
|
||||
// -----Description--------------------------------------Class----------------------Function-----------------Pre---Post--Context
|
||||
//
|
||||
{ "TestVerifyAuthenticodeVerify()", "CryptoPkg.BaseCryptLib.Authenticode", TestVerifyAuthenticodeVerify, NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
UINTN mAuthenticodeTestNum = ARRAY_SIZE(mAuthenticodeTest);
|
||||
UINTN mAuthenticodeTestNum = ARRAY_SIZE (mAuthenticodeTest);
|
||||
|
Reference in New Issue
Block a user