]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Adjust SignedData to comply with latest UEFI spec: 1) remove SignerInfo.authentica...
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 14 Sep 2011 10:20:53 +0000 (10:20 +0000)
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 14 Sep 2011 10:20:53 +0000 (10:20 +0000)
2. Fix some coding style problems.

Signed-off-by: tye
Reviewed-by: hhuan13
Reviewed-by: qlong
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12349 6f19259b-4bc3-4df7-8a09-765794883524

CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7.c

index 816ae53ea9ea3f9387e327c16fe53c79b342f23f..e866284f17ea802e77778538a9a170eb791b1581 100644 (file)
@@ -30,15 +30,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @retval     0        Verification failed.\r
 \r
 **/\r
-STATIC int X509VerifyCb (int Status, X509_STORE_CTX *Context)\r
+int\r
+X509VerifyCb (\r
+  IN int            Status,\r
+  IN X509_STORE_CTX *Context\r
+  )\r
 {\r
   X509_OBJECT  *Obj;\r
-  int          Error;\r
-  int          Index;\r
-  int          Count;\r
+  INTN         Error;\r
+  INTN         Index;\r
+  INTN         Count;\r
 \r
   Obj   = NULL;\r
-  Error = X509_STORE_CTX_get_error (Context);\r
+  Error = (INTN) X509_STORE_CTX_get_error (Context);\r
 \r
   //\r
   // X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT and X509_V_ERR_UNABLE_TO_GET_ISSUER_\r
@@ -70,9 +74,9 @@ STATIC int X509VerifyCb (int Status, X509_STORE_CTX *Context)
       // pass the certificate verification.\r
       //\r
       if (Error == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY) {\r
-        Count = sk_X509_num (Context->chain);\r
+        Count = (INTN) sk_X509_num (Context->chain);\r
         for (Index = 0; Index < Count; Index++) {\r
-          Obj->data.x509 = sk_X509_value (Context->chain, Index);\r
+          Obj->data.x509 = sk_X509_value (Context->chain, (int) Index);\r
           if (X509_OBJECT_retrieve_match (Context->ctx->objs, Obj)) {\r
             Status = 1;\r
             break;\r
@@ -203,7 +207,7 @@ Pkcs7Sign (
             Key,\r
             (STACK_OF(X509) *) OtherCerts,\r
             DataBio,\r
-            PKCS7_BINARY\r
+            PKCS7_BINARY | PKCS7_NOATTR | PKCS7_DETACHED\r
             );\r
   if (Pkcs7 == NULL) {\r
     goto _Exit;\r