]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine code to make code follow the coding style.
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 13 Jan 2011 01:05:59 +0000 (01:05 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 13 Jan 2011 01:05:59 +0000 (01:05 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11247 6f19259b-4bc3-4df7-8a09-765794883524

CryptoPkg/Application/Cryptest/RsaVerify2.c
CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c

index adac99a9d7182c4d92fb41c667281b2b2d114ec1..b6fdfb5c38e1e052ce14eaf063c4004667be1fac 100644 (file)
@@ -214,7 +214,7 @@ ValidateCryptRsa2 (
   //\r
   Print (L"\n- Retrieve RSA Private Key for PEM ...");\r
   Status = RsaGetPrivateKeyFromPem (TestKeyPem, sizeof (TestKeyPem), PemPass, &RsaPrivKey);\r
-  if (Status == FALSE) {\r
+  if (!Status) {\r
     Print (L"[Fail]");\r
     return EFI_ABORTED;\r
   } else {\r
@@ -227,7 +227,7 @@ ValidateCryptRsa2 (
   Print (L"\n- Retrieve RSA Public Key from X509 ... ");\r
   RsaPubKey = NULL;\r
   Status    = RsaGetPublicKeyFromX509 (TestCert, sizeof (TestCert), &RsaPubKey);\r
-  if (Status == FALSE) {\r
+  if (!Status) {\r
     Print (L"[Fail]");\r
     return EFI_ABORTED;\r
   } else {\r
index e9de39a1058a1983856d97572a3679115583759f..bc5c93ff988f9f5aceaca2b984570a79e28c813f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PEM (Privacy Enhanced Mail) Format Handler Wrapper Implementation over OpenSSL.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -41,9 +41,9 @@ PasswordCallback (
     //\r
     // Duplicate key phrase directly.\r
     //\r
-    KeyLength = AsciiStrLen ((CHAR8 *)Key);\r
+    KeyLength = (INTN) AsciiStrLen ((CHAR8 *)Key);\r
     KeyLength = (KeyLength > Size ) ? Size : KeyLength;\r
-    CopyMem (Buf, Key, KeyLength);\r
+    CopyMem (Buf, Key, (UINTN) KeyLength);\r
     return KeyLength;\r
   } else {\r
     return 0;\r