]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/Pk/CryptAuthenticode.c
CryptoPkg: Apply uncrustify changes
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Pk / CryptAuthenticode.c
index 3c2d14a88bce2a3ac5cddf147c8b101c16b40eb4..aa4a33364d9240fc2b245af4942e4577f209282e 100644 (file)
@@ -23,9 +23,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 //\r
 // OID ASN.1 Value for SPC_INDIRECT_DATA_OBJID\r
 //\r
-UINT8 mSpcIndirectOidValue[] = {\r
+UINT8  mSpcIndirectOidValue[] = {\r
   0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x02, 0x01, 0x04\r
-  };\r
+};\r
 \r
 /**\r
   Verifies the validity of a PE/COFF Authenticode Signature as described in "Windows\r
@@ -109,20 +109,20 @@ AuthenticodeVerify (
   //       some authenticode-specific structure. Use opaque ASN.1 string to retrieve\r
   //       PKCS#7 ContentInfo here.\r
   //\r
-  SpcIndirectDataOid = OBJ_get0_data(Pkcs7->d.sign->contents->type);\r
-  if (OBJ_length(Pkcs7->d.sign->contents->type) != sizeof(mSpcIndirectOidValue) ||\r
-      CompareMem (\r
-        SpcIndirectDataOid,\r
-        mSpcIndirectOidValue,\r
-        sizeof (mSpcIndirectOidValue)\r
-        ) != 0) {\r
+  SpcIndirectDataOid = OBJ_get0_data (Pkcs7->d.sign->contents->type);\r
+  if ((OBJ_length (Pkcs7->d.sign->contents->type) != sizeof (mSpcIndirectOidValue)) ||\r
+      (CompareMem (\r
+         SpcIndirectDataOid,\r
+         mSpcIndirectOidValue,\r
+         sizeof (mSpcIndirectOidValue)\r
+         ) != 0))\r
+  {\r
     //\r
     // Un-matched SPC_INDIRECT_DATA_OBJID.\r
     //\r
     goto _Exit;\r
   }\r
 \r
-\r
   SpcIndirectDataContent = (UINT8 *)(Pkcs7->d.sign->contents->d.other->value.asn1_string->data);\r
 \r
   //\r
@@ -134,33 +134,30 @@ AuthenticodeVerify (
     //\r
     // Short Form of Length Encoding (Length < 128)\r
     //\r
-    ContentSize = (UINTN) (Asn1Byte & 0x7F);\r
+    ContentSize = (UINTN)(Asn1Byte & 0x7F);\r
     //\r
     // Skip the SEQUENCE Tag;\r
     //\r
     SpcIndirectDataContent += 2;\r
-\r
   } else if ((Asn1Byte & 0x81) == 0x81) {\r
     //\r
     // Long Form of Length Encoding (128 <= Length < 255, Single Octet)\r
     //\r
-    ContentSize = (UINTN) (*(UINT8 *)(SpcIndirectDataContent + 2));\r
+    ContentSize = (UINTN)(*(UINT8 *)(SpcIndirectDataContent + 2));\r
     //\r
     // Skip the SEQUENCE Tag;\r
     //\r
     SpcIndirectDataContent += 3;\r
-\r
   } else if ((Asn1Byte & 0x82) == 0x82) {\r
     //\r
     // Long Form of Length Encoding (Length > 255, Two Octet)\r
     //\r
-    ContentSize = (UINTN) (*(UINT8 *)(SpcIndirectDataContent + 2));\r
+    ContentSize = (UINTN)(*(UINT8 *)(SpcIndirectDataContent + 2));\r
     ContentSize = (ContentSize << 8) + (UINTN)(*(UINT8 *)(SpcIndirectDataContent + 3));\r
     //\r
     // Skip the SEQUENCE Tag;\r
     //\r
     SpcIndirectDataContent += 4;\r
-\r
   } else {\r
     goto _Exit;\r
   }\r
@@ -180,7 +177,7 @@ AuthenticodeVerify (
   //\r
   // Verifies the PKCS#7 Signed Data in PE/COFF Authenticode Signature\r
   //\r
-  Status = (BOOLEAN) Pkcs7Verify (OrigAuthData, DataSize, TrustedCert, CertSize, SpcIndirectDataContent, ContentSize);\r
+  Status = (BOOLEAN)Pkcs7Verify (OrigAuthData, DataSize, TrustedCert, CertSize, SpcIndirectDataContent, ContentSize);\r
 \r
 _Exit:\r
   //\r