VirtualBox

Ignore:
Timestamp:
Oct 29, 2015 4:30:44 AM (9 years ago)
Author:
vboxsync
Message:

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

Location:
trunk/src/VBox/Devices/EFI/Firmware
Files:
52 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware

  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/AuthenticodeVerify.c

    r48674 r58466  
    1 /** @file 
     1/** @file
    22  Sample Implementation for Microsoft Authenticode Verification.
    33
     
    2020//
    2121GLOBAL_REMOVE_IF_UNREFERENCED UINT8 PeSha1Hash[] = {
    22   0x44, 0xFD, 0x4F, 0xA9, 0x17, 0xEE, 0xAC, 0xCF, 0x1F, 0x0B, 0xE3, 0xA1, 0x4D, 0x5B, 0xA6, 0x61, 
     22  0x44, 0xFD, 0x4F, 0xA9, 0x17, 0xEE, 0xAC, 0xCF, 0x1F, 0x0B, 0xE3, 0xA1, 0x4D, 0x5B, 0xA6, 0x61,
    2323  0x82, 0x97, 0xC4, 0xB6
    2424  };
     
    3434//
    3535// Sample Authenticode Data with SHA-1 hash algorithm.
    36 // This data should be retrieved from signed PE/COFF image according to SECURITY 
     36// This data should be retrieved from signed PE/COFF image according to SECURITY
    3737// directory in PE/COFF Header.
    3838//
     
    169169  0xE8, 0x28, 0x62, 0xC2, 0xF3, 0xC2, 0x23, 0xA6, 0x1C, 0x49, 0x82, 0x0B, 0xD5, 0x53, 0x30, 0x0E,
    170170  0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1F,
    171   0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x90, 0x8B, 0x11, 
     171  0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x90, 0x8B, 0x11,
    172172  0xA5, 0x70, 0xED, 0xE0, 0xF9, 0xA9, 0xC0, 0xAC, 0x08, 0xC7, 0xB5, 0xF4, 0x82, 0xB1, 0x3C, 0xC5,
    173173  0x4A, 0x30, 0x7B, 0x06, 0x03, 0x55, 0x1D, 0x1F, 0x04, 0x74, 0x30, 0x72, 0x30, 0x70, 0xA0, 0x6E,
     
    490490  0x0E, 0x99, 0x1F, 0xDF, 0x7E, 0xC9, 0x10, 0x56, 0xC7, 0x00, 0x6D, 0x5F, 0x23, 0x57, 0x12, 0x84,
    491491  0xCD, 0xAC, 0x82, 0xAE, 0x39, 0x52, 0xA5, 0x19, 0x23, 0xA3, 0x6B, 0xE7, 0x49, 0x8F, 0x86, 0x74,
    492   0x46, 0x41, 0x2A, 0x0F, 0x3D, 0x29, 0xB7, 0xAE, 0x8C, 0x00 
     492  0x46, 0x41, 0x2A, 0x0F, 0x3D, 0x29, 0xB7, 0xAE, 0x8C, 0x00
    493493  };
    494494
    495495//
    496496// Sample Authenticode Data with SHA-256 hash algorithm.
    497 // This data should be retrieved from signed PE/COFF image according to SECURITY 
     497// This data should be retrieved from signed PE/COFF image according to SECURITY
    498498// directory in PE/COFF Header.
    499499//
     
    740740
    741741//
    742 // Sample root certificate for code signing. 
    743 // A trusted certificate with self-signing, will be used to construct the certificate chains for 
     742// Sample root certificate for code signing.
     743// A trusted certificate with self-signing, will be used to construct the certificate chains for
    744744// authority checking.
    745745//
     
    965965  Status = FALSE;
    966966  Print (L"\n- PE/COFF Authenticode (Digested by SHA-1) Verification   ... ");
    967    
     967
    968968  //
    969969  // Sample Code: Demonstrate how to check the Hash algorithm in PE/COFF Authenticode.
    970   //    According to PKCS#7 Definition: 
     970  //    According to PKCS#7 Definition:
    971971  //        SignedData ::= SEQUENCE {
    972972  //            version Version,
     
    976976  //    The DigestAlgorithmIdentifiers can be used to determine the hash algorithm in PE/COFF hashing
    977977  //    This field has the fixed offset (+32) in final Authenticode ASN.1 data.
    978   //   
     978  //
    979979  if (CompareMem (AuthenticodeWithSha1 + 32, &HashOidValue[8], 5) == 0) {
    980980    //
    981     // Verify Authenticode signature. 
     981    // Verify Authenticode signature.
    982982    // The PeHash value should be calculated following MSFT's Authenticode Specification.
    983983    //
     
    994994    } else {
    995995      Print (L"[Fail]");
    996     }       
     996    }
    997997  } else {
    998998    Print (L"[Invalid Hash]");
     
    10151015    } else {
    10161016      Print (L"[Fail]");
    1017     }       
     1017    }
    10181018  } else {
    10191019    Print (L"[Invalid Hash]");
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/BlockCipherVerify.c

    r48674 r58466  
    1 /** @file 
     1/** @file
    22  Application for Block Cipher Primitives Validation.
    33
     
    4242
    4343GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 TdesCbcKey[] = {
    44   0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 
     44  0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
    4545  0xf1, 0xe0, 0xd3, 0xc2, 0xb5, 0xa4, 0x97, 0x86,
    4646  0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10
     
    223223    Print (L"[Fail]");
    224224    return EFI_ABORTED;
    225   } 
     225  }
    226226
    227227  if (CompareMem (Decrypt, TdesEcbData, 8) != 0) {
     
    272272  CtxSize   = AesGetContextSize ();
    273273  CipherCtx = AllocatePool (CtxSize);
    274  
     274
    275275  Print (L"\n- AES Validation:  ");
    276276
     
    304304    Print (L"[Fail]");
    305305    return EFI_ABORTED;
    306   } 
     306  }
    307307
    308308  if (CompareMem (Decrypt, Aes128EcbData, sizeof (Aes128EcbData)) != 0) {
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/Cryptest.inf

    r58459 r58466  
    99#  which accompanies this distribution.  The full text of the license may be found at
    1010#  http://opensource.org/licenses/bsd-license.php
    11 # 
     11#
    1212#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1313#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    14 # 
     14#
    1515##
    1616
     
    4242  DhVerify.c
    4343  RandVerify.c
    44  
     44
    4545[Packages]
    4646  MdePkg/MdePkg.dec
     
    5959[UserExtensions.TianoCore."ExtraFiles"]
    6060  CryptestExtra.uni
    61  
     61
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/HmacVerify.c

    r48674 r58466  
    1 /** @file 
     1/** @file
    22  Application for HMAC Primitives Validation.
    33
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/RandVerify.c

    r48674 r58466  
    1 /** @file 
     1/** @file
    22  Application for Pseudorandom Number Generator Validation.
    33
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/RsaVerify.c

    r48674 r58466  
    1 /** @file 
     1/** @file
    22  Application for RSA Primitives Validation.
    33
     
    2525//
    2626GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 RsaN[] = {
    27   0xBB, 0xF8, 0x2F, 0x09, 0x06, 0x82, 0xCE, 0x9C, 0x23, 0x38, 0xAC, 0x2B, 0x9D, 0xA8, 0x71, 0xF7, 
     27  0xBB, 0xF8, 0x2F, 0x09, 0x06, 0x82, 0xCE, 0x9C, 0x23, 0x38, 0xAC, 0x2B, 0x9D, 0xA8, 0x71, 0xF7,
    2828  0x36, 0x8D, 0x07, 0xEE, 0xD4, 0x10, 0x43, 0xA4, 0x40, 0xD6, 0xB6, 0xF0, 0x74, 0x54, 0xF5, 0x1F,
    2929  0xB8, 0xDF, 0xBA, 0xAF, 0x03, 0x5C, 0x02, 0xAB, 0x61, 0xEA, 0x48, 0xCE, 0xEB, 0x6F, 0xCD, 0x48,
     
    235235    return EFI_ABORTED;
    236236  }
    237  
     237
    238238  if (KeySize != 3 ||
    239239      CompareMem (KeyBuffer, DefaultPublicKey, 3) != 0) {
     
    300300
    301301  //
    302   // SHA-1 Digest Message for PKCS#1 Signature 
     302  // SHA-1 Digest Message for PKCS#1 Signature
    303303  //
    304304  Print (L"Hash Original Message ... ");
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/RsaVerify2.c

    r48674 r58466  
    1 /** @file 
     1/** @file
    22  Application for RSA Key Retrieving (from PEM and X509) & Signature Validation.
    33
     
    7373  0x13, 0x05, 0x49, 0x4e, 0x54, 0x45, 0x4c, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0b,
    7474  0x13, 0x03, 0x50, 0x53, 0x49, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x04,
    75   0x55, 0x45, 0x46, 0x49, 0x31, 0x1b, 0x30, 0x19, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 
     75  0x55, 0x45, 0x46, 0x49, 0x31, 0x1b, 0x30, 0x19, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
    7676  0x01, 0x09, 0x01, 0x16, 0x0c, 0x75, 0x65, 0x66, 0x69, 0x40, 0x70, 0x73, 0x69, 0x2e, 0x63, 0x6f,
    7777  0x6d, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x30, 0x31, 0x30, 0x30, 0x38, 0x31, 0x38, 0x31, 0x35, 0x33,
     
    346346
    347347  //
    348   // Create PKCS#7 signedData on Payload. 
     348  // Create PKCS#7 signedData on Payload.
    349349  // Note: Caller should release P7SignedData manually.
    350350  //
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Application/Cryptest/TSVerify.c

    r58464 r58466  
    1717//
    1818// Sample Authenticode Data with RFC3161 time stamping signature.
    19 // The data retrieved from one signed sample UEFI image, which is generated by MSFT's signtool 
     19// The data retrieved from one signed sample UEFI image, which is generated by MSFT's signtool
    2020// utility in conjunction with RFC3161 timestamping, as the following command:
    21 //   signtool sign /ac <xxx.cer> / f <xxx.pfx> /p <pass> /fd <digestAlg> 
     21//   signtool sign /ac <xxx.cer> / f <xxx.pfx> /p <pass> /fd <digestAlg>
    2222//     /tr http://timestamp.comodoca.com/rfc3161 sample.efi
    2323//
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe.inf

    r58459 r58466  
    77#  which accompanies this distribution.  The full text of the license may be found at
    88#  http://opensource.org/licenses/bsd-license.php
    9 # 
     9#
    1010#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1111#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    12 # 
     12#
    1313##
    1414
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/CryptoPkg.dec

    • Property svn:eol-style set to native
    r58459 r58466  
    1010#  which accompanies this distribution.  The full text of the license may be found at
    1111#  http://opensource.org/licenses/bsd-license.php
    12 # 
     12#
    1313#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1414#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    15 # 
     15#
    1616##
    1717
     
    3737[UserExtensions.TianoCore."ExtraFiles"]
    3838  CryptoPkgExtra.uni
    39  
     39
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/CryptoPkg.dsc

    r58459 r58466  
    77#  which accompanies this distribution.  The full text of the license may be found at
    88#  http://opensource.org/licenses/bsd-license.php
    9 # 
     9#
    1010#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1111#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    12 # 
     12#
    1313##
    1414
     
    3939  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
    4040  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
    41   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf 
     41  DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
    4242  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
    4343  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Include/OpenSslSupport.h

    r58459 r58466  
    2323
    2424//
    25 // File operations are not required for building Open SSL, 
     25// File operations are not required for building Open SSL,
    2626// so FILE is mapped to VOID * to pass build
    2727//
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Include/math.h

    r48674 r58466  
    11/** @file
    2   Include file to support building OPEN SSL 
     2  Include file to support building OPEN SSL
    33
    44Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Cipher/CryptAes.c

    r58459 r58466  
    126126    return FALSE;
    127127  }
    128  
     128
    129129  AesKey = (AES_KEY *) AesContext;
    130130
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesNull.c

    r58464 r58466  
    11/** @file
    2   AES Wrapper Implementation which does not provide real capabilities. 
    3  
     2  AES Wrapper Implementation which does not provide real capabilities.
     3
    44Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    6161
    6262  Return FALSE to indicate this interface is not supported.
    63  
     63
    6464  @param[in]   AesContext  Pointer to the AES context.
    6565  @param[in]   Input       Pointer to the buffer containing the data to be encrypted.
    6666  @param[in]   InputSize   Size of the Input buffer in bytes.
    6767  @param[out]  Output      Pointer to a buffer that receives the AES encryption output.
    68  
     68
    6969  @retval FALSE  This interface is not supported.
    7070
     
    160160  OUT  UINT8        *Output
    161161  )
    162 { 
     162{
    163163  ASSERT (FALSE);
    164164  return FALSE;
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c

    r58459 r58466  
    6767  //
    6868  // Check input parameters.
    69   // 
     69  //
    7070  if (Arc4Context == NULL || Key == NULL || (KeySize < 5 || KeySize > 256)) {
    7171    return FALSE;
     
    203203    return FALSE;
    204204  }
    205  
     205
    206206  Rc4Key = (RC4_KEY *) Arc4Context;
    207207
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4Null.c

    r58464 r58466  
    1 /** @file 
     1/** @file
    22  ARC4 Wrapper Implementation which does not provide real capabilities.
    33
     
    7979  OUT     UINT8        *Output
    8080  )
    81 { 
     81{
    8282  ASSERT (FALSE);
    8383  return FALSE;
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd4Null.c

    r58464 r58466  
    104104  Completes computation of the MD4 digest value.
    105105
    106   Return FALSE to indicate this interface is not supported. 
     106  Return FALSE to indicate this interface is not supported.
    107107
    108108  @param[in, out]  Md4Context  Pointer to the MD4 context.
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5.c

    r58459 r58466  
    9898    return FALSE;
    9999  }
    100  
     100
    101101  CopyMem (NewHmacMd5Context, HmacMd5Context, sizeof (HMAC_CTX));
    102102
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5Null.c

    r58464 r58466  
    3535/**
    3636  Initializes user-supplied memory pointed by HmacMd5Context as HMAC-MD5 context for
    37   subsequent use. 
     37  subsequent use.
    3838
    39   Return FALSE to indicate this interface is not supported. 
     39  Return FALSE to indicate this interface is not supported.
    4040
    4141  @param[out]  HmacMd5Context  Pointer to HMAC-MD5 context being initialized.
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1Null.c

    r58464 r58466  
    11/** @file
    2   HMAC-SHA1 Wrapper Implementation which does not provide real capabilities. 
     2  HMAC-SHA1 Wrapper Implementation which does not provide real capabilities.
    33
    44Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
     
    3737  subsequent use.
    3838
    39   Return FALSE to indicate this interface is not supported. 
     39  Return FALSE to indicate this interface is not supported.
    4040
    4141  @param[out]  HmacSha1Context  Pointer to HMAC-SHA1 context being initialized.
     
    8383  Digests the input data and updates HMAC-SHA1 context.
    8484
    85   Return FALSE to indicate this interface is not supported. 
     85  Return FALSE to indicate this interface is not supported.
    8686
    8787  @param[in, out]  HmacSha1Context Pointer to the HMAC-SHA1 context.
     
    107107  Completes computation of the HMAC-SHA1 digest value.
    108108
    109   Return FALSE to indicate this interface is not supported. 
     109  Return FALSE to indicate this interface is not supported.
    110110
    111111  @param[in, out]  HmacSha1Context  Pointer to the HMAC-SHA1 context.
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/InternalCryptLib.h

    r58459 r58466  
    1 /** @file 
     1/** @file
    22  Internal include file for BaseCryptLib.
    33
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf

    r58459 r58466  
    88#
    99#  Note: MD4 Digest functions, SHA-384 Digest functions, SHA-512 Digest functions,
    10 #  HMAC-MD5 functions, HMAC-SHA1 functions, AES/TDES/ARC4 functions, RSA external 
    11 #  functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, X.509 
    12 #  certificate handler functions, authenticode signature verification functions, 
    13 #  PEM handler functions, and pseudorandom number generator functions are not 
     10#  HMAC-MD5 functions, HMAC-SHA1 functions, AES/TDES/ARC4 functions, RSA external
     11#  functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, X.509
     12#  certificate handler functions, authenticode signature verification functions,
     13#  PEM handler functions, and pseudorandom number generator functions are not
    1414#  supported in this instance.
    1515#
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c

    r58459 r58466  
    2929INTN
    3030PasswordCallback (
    31   OUT  CHAR8  *Buf, 
    32   IN   INTN   Size, 
    33   IN   INTN   Flag, 
     31  OUT  CHAR8  *Buf,
     32  IN   INTN   Size,
     33  IN   INTN   Flag,
    3434  IN   VOID   *Key
    3535  )
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptDh.c

    r58459 r58466  
    6161  Given generator g, and length of prime number p in bits, this function generates p,
    6262  and sets DH context according to value of g and p.
    63  
     63
    6464  Before this function can be invoked, pseudorandom number generator must be correctly
    6565  initialized by RandomSeed().
     
    149149    return FALSE;
    150150  }
    151  
     151
    152152  if (Generator != DH_GENERATOR_2 && Generator != DH_GENERATOR_5) {
    153153    return FALSE;
     
    162162    goto Error;
    163163  }
    164  
     164
    165165  Dh->g = BN_new ();
    166166  if (Dh->g == NULL) {
     
    192192    BN_free (Bn);
    193193  }
    194  
     194
    195195  return FALSE;
    196196}
     
    199199  Generates DH public key.
    200200
    201   This function generates random secret exponent, and computes the public key, which is 
     201  This function generates random secret exponent, and computes the public key, which is
    202202  returned via parameter PublicKey and PublicKeySize. DH context is updated accordingly.
    203203  If the PublicKey buffer is too small to hold the public key, FALSE is returned and
     
    240240    return FALSE;
    241241  }
    242  
     242
    243243  Dh = (DH *) DhContext;
    244244
     
    250250      return FALSE;
    251251    }
    252    
     252
    253253    BN_bn2bin (Dh->pub_key, PublicKey);
    254254    *PublicKeySize = Size;
     
    262262
    263263  Given peer's public key, this function computes the exchanged common key, based on its own
    264   context including value of prime modulus and random secret exponent. 
     264  context including value of prime modulus and random secret exponent.
    265265
    266266  If DhContext is NULL, then return FALSE.
     
    305305    return FALSE;
    306306  }
    307  
     307
    308308  Bn = BN_bin2bn (PeerPublicKey, (UINT32) PeerPublicKeySize, NULL);
    309309  if (Bn == NULL) {
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptDhNull.c

    r58464 r58466  
    9999{
    100100  ASSERT (FALSE);
    101   return FALSE; 
     101  return FALSE;
    102102}
    103103
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Sign.c

    r58464 r58466  
    122122
    123123  //
    124   // Convert the data to be signed to BIO format. 
     124  // Convert the data to be signed to BIO format.
    125125  //
    126126  DataBio = BIO_new (BIO_s_mem ());
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyNull.c

    r58464 r58466  
    5454
    5555  If the interface is not supported, then ASSERT().
    56  
     56
    5757  @param[in]  Certs        Pointer to the certificates to be freed.
    5858
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaBasic.c

    r58464 r58466  
    305305  //
    306306  // Determine the message digest algorithm according to digest size.
    307   //   Only MD5, SHA-1 or SHA-256 algorithm is supported. 
     307  //   Only MD5, SHA-1 or SHA-256 algorithm is supported.
    308308  //
    309309  switch (HashSize) {
     
    311311    DigestType = NID_md5;
    312312    break;
    313    
     313
    314314  case SHA1_DIGEST_SIZE:
    315315    DigestType = NID_sha1;
    316316    break;
    317    
     317
    318318  case SHA256_DIGEST_SIZE:
    319319    DigestType = NID_sha256;
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaExt.c

    r58464 r58466  
    173173  }
    174174  *BnSize = BN_bn2bin (BnKey, BigNumber) ;
    175  
     175
    176176  return TRUE;
    177177}
     
    192192  @param[in]       ModulusLength        Length of RSA modulus N in bits.
    193193  @param[in]       PublicExponent       Pointer to RSA public exponent.
    194   @param[in]       PublicExponentSize   Size of RSA public exponent buffer in bytes. 
     194  @param[in]       PublicExponentSize   Size of RSA public exponent buffer in bytes.
    195195
    196196  @retval  TRUE   RSA key component was generated successfully.
     
    216216    return FALSE;
    217217  }
    218  
     218
    219219  KeyE = BN_new ();
    220220  if (KeyE == NULL) {
     
    223223
    224224  RetVal = FALSE;
    225  
     225
    226226  if (PublicExponent == NULL) {
    227227    if (BN_set_word (KeyE, 0x10001) == 0) {
     
    244244
    245245/**
    246   Validates key components of RSA context. 
     246  Validates key components of RSA context.
    247247  NOTE: This function performs integrity checks on all the RSA key material, so
    248248        the RSA key structure must contain all the private key data.
     
    276276    return FALSE;
    277277  }
    278  
     278
    279279  if  (RSA_check_key ((RSA *) RsaContext) != 1) {
    280280    Reason = ERR_GET_REASON (ERR_peek_last_error ());
     
    343343    return FALSE;
    344344  }
    345  
     345
    346346  if (Signature == NULL) {
    347347    return FALSE;
    348348  }
    349  
     349
    350350  //
    351351  // Determine the message digest algorithm according to digest size.
    352   //   Only MD5, SHA-1 or SHA-256 algorithm is supported. 
     352  //   Only MD5, SHA-1 or SHA-256 algorithm is supported.
    353353  //
    354354  switch (HashSize) {
     
    356356    DigestType = NID_md5;
    357357    break;
    358    
     358
    359359  case SHA1_DIGEST_SIZE:
    360360    DigestType = NID_sha1;
    361361    break;
    362    
     362
    363363  case SHA256_DIGEST_SIZE:
    364364    DigestType = NID_sha256;
     
    367367  default:
    368368    return FALSE;
    369   } 
     369  }
    370370
    371371  return (BOOLEAN) RSA_sign (
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaExtNull.c

    r58464 r58466  
    5656  @param[in]       ModulusLength        Length of RSA modulus N in bits.
    5757  @param[in]       PublicExponent       Pointer to RSA public exponent.
    58   @param[in]       PublicExponentSize   Size of RSA public exponent buffer in bytes. 
     58  @param[in]       PublicExponentSize   Size of RSA public exponent buffer in bytes.
    5959
    6060  @retval FALSE  This interface is not supported.
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c

    r58459 r58466  
    7474                              by certificate size. A NULL terminates the list. The
    7575                              pairs are the arguments to X509ConstructCertificate().
    76                                  
     76
    7777  @retval     TRUE            The X509 stack construction succeeded.
    7878  @retval     FALSE           The construction operation failed.
     
    8383X509ConstructCertificateStack (
    8484  IN OUT  UINT8  **X509Stack,
    85   ... 
     85  ...
    8686  )
    8787{
     
    176176  IN  VOID  *X509Cert
    177177  )
    178 { 
     178{
    179179  //
    180180  // Check input parameters.
     
    183183    return;
    184184  }
    185  
     185
    186186  //
    187187  // Free OpenSSL X509 object.
     
    210210    return;
    211211  }
    212  
     212
    213213  //
    214214  // Free OpenSSL X509 stack object.
     
    323323  EVP_PKEY  *Pkey;
    324324  X509      *X509Cert;
    325  
     325
    326326  //
    327327  // Check input parameters.
     
    370370  if (Pkey != NULL) {
    371371    EVP_PKEY_free (Pkey);
    372   } 
     372  }
    373373
    374374  return Status;
     
    405405  X509_STORE      *CertStore;
    406406  X509_STORE_CTX  CertCtx;
    407  
     407
    408408  //
    409409  // Check input parameters.
     
    490490    X509_STORE_free (CertStore);
    491491  }
    492  
     492
    493493  return Status;
    494494}
     
    567567
    568568  *TBSCertSize = Length + (Temp - *TBSCert);
    569  
     569
    570570  return TRUE;
    571571}
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509Null.c

    r58464 r58466  
    5151                              by certificate size. A NULL terminates the list. The
    5252                              pairs are the arguments to X509ConstructCertificate().
    53                                  
     53
    5454  @retval FALSE  This interface is not supported.
    5555
     
    5959X509ConstructCertificateStack (
    6060  IN OUT  UINT8  **X509Stack,
    61   ... 
     61  ...
    6262  )
    6363{
     
    7979  IN  VOID  *X509Cert
    8080  )
    81 { 
     81{
    8282  ASSERT (FALSE);
    8383}
     
    165165
    166166  @retval FALSE  This interface is not supported.
    167  
     167
    168168**/
    169169BOOLEAN
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandItc.c

    r58459 r58466  
    7070      "UEFI Crypto Library default seed (%ld)",
    7171      AsmReadItc ()
    72       ); 
     72      );
    7373
    7474    RAND_seed (DefaultSeed, sizeof (DefaultSeed));
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandTsc.c

    r58459 r58466  
    7070      "UEFI Crypto Library default seed (%ld)",
    7171      AsmReadTsc ()
    72       ); 
     72      );
    7373
    7474    RAND_seed (DefaultSeed, sizeof (DefaultSeed));
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf

    r58459 r58466  
    99#  Note: MD4 Digest functions, SHA-384 Digest functions, SHA-512 Digest functions,
    1010#  HMAC-MD5 functions, HMAC-SHA1 functions, AES/TDES/ARC4 functions, RSA external
    11 #  functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and 
     11#  functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and
    1212#  authenticode signature verification functions are not supported in this instance.
    1313#
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf

    r58459 r58466  
    99#  Note: MD4 Digest functions, SHA-384 Digest functions, SHA-512 Digest functions,
    1010#  HMAC-MD5 functions, HMAC-SHA1 functions, AES/TDES/ARC4 functions, RSA external
    11 #  functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and 
     11#  functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and
    1212#  authenticode signature verification functions are not supported in this instance.
    1313#
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c

    r58459 r58466  
    6363    31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31,
    6464    31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30,
    65     31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 
     65    31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31
    6666  }
    6767};
     
    9292  // Add in number of seconds for current Month, Day, Hour, Minute, Seconds, and TimeZone adjustment
    9393  //
    94   *timer = *timer + 
     94  *timer = *timer +
    9595           (time_t)((Time.TimeZone != EFI_UNSPECIFIED_TIMEZONE) ? (Time.TimeZone * 60) : 0) +
    96            (time_t)(CumulativeDays[IsLeap(Time.Year)][Time.Month] * SECSPERDAY) + 
    97            (time_t)(((Time.Day > 0) ? Time.Day - 1 : 0) * SECSPERDAY) + 
    98            (time_t)(Time.Hour * SECSPERHOUR) + 
    99            (time_t)(Time.Minute * 60) + 
     96           (time_t)(CumulativeDays[IsLeap(Time.Year)][Time.Month] * SECSPERDAY) +
     97           (time_t)(((Time.Day > 0) ? Time.Day - 1 : 0) * SECSPERDAY) +
     98           (time_t)(Time.Hour * SECSPERHOUR) +
     99           (time_t)(Time.Minute * 60) +
    100100           (time_t)Time.Second;
    101101
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/BaseCryptLibRuntimeCryptProtocol.inf

    r58459 r58466  
    33#  This instance will be only used by the Authenticated Variable driver for IPF.
    44#
    5 #  Note: MD4/MD5/SHA1 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions, 
     5#  Note: MD4/MD5/SHA1 Digest functions, HMAC-MD5 functions, HMAC-SHA1 functions,
    66#  AES/TDES/ARC4 functions, RSA external functions, PKCS#7 SignedData sign/verify
    77#  functions, Diffie-Hellman functions, X.509 certificate handler functions,
     
    1515#  which accompanies this distribution.  The full text of the license may be found at
    1616#  http://opensource.org/licenses/bsd-license.php
    17 # 
     17#
    1818#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1919#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    20 # 
     20#
    2121##
    2222
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Cipher/CryptAesNull.c

    r58464 r58466  
    11/** @file
    2   AES Wrapper Implementation which does not provide real capabilities. 
    3  
     2  AES Wrapper Implementation which does not provide real capabilities.
     3
    44Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    6161
    6262  Return FALSE to indicate this interface is not supported.
    63  
     63
    6464  @param[in]   AesContext  Pointer to the AES context.
    6565  @param[in]   Input       Pointer to the buffer containing the data to be encrypted.
    6666  @param[in]   InputSize   Size of the Input buffer in bytes.
    6767  @param[out]  Output      Pointer to a buffer that receives the AES encryption output.
    68  
     68
    6969  @retval FALSE  This interface is not supported.
    7070
     
    160160  OUT  UINT8        *Output
    161161  )
    162 { 
     162{
    163163  ASSERT (FALSE);
    164164  return FALSE;
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Cipher/CryptArc4Null.c

    r58464 r58466  
    1 /** @file 
     1/** @file
    22  ARC4 Wrapper Implementation which does not provide real capabilities.
    33
     
    7979  OUT     UINT8        *Output
    8080  )
    81 { 
     81{
    8282  ASSERT (FALSE);
    8383  return FALSE;
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Hash/CryptMd4Null.c

    r58464 r58466  
    104104  Completes computation of the MD4 digest value.
    105105
    106   Return FALSE to indicate this interface is not supported. 
     106  Return FALSE to indicate this interface is not supported.
    107107
    108108  @param[in, out]  Md4Context  Pointer to the MD4 context.
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Hash/CryptSha1Null.c

    r58464 r58466  
    3232{
    3333  ASSERT (FALSE);
    34   return 0; 
     34  return 0;
    3535}
    3636
     
    4040
    4141  Return FALSE to indicate this interface is not supported.
    42  
     42
    4343  @param[out]  Sha1Context  Pointer to SHA-1 context being initialized.
    4444
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Hmac/CryptHmacMd5Null.c

    r58464 r58466  
    3535/**
    3636  Initializes user-supplied memory pointed by HmacMd5Context as HMAC-MD5 context for
    37   subsequent use. 
     37  subsequent use.
    3838
    39   Return FALSE to indicate this interface is not supported. 
     39  Return FALSE to indicate this interface is not supported.
    4040
    4141  @param[out]  HmacMd5Context  Pointer to HMAC-MD5 context being initialized.
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Hmac/CryptHmacSha1Null.c

    r58464 r58466  
    11/** @file
    2   HMAC-SHA1 Wrapper Implementation which does not provide real capabilities. 
     2  HMAC-SHA1 Wrapper Implementation which does not provide real capabilities.
    33
    44Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
     
    3737  subsequent use.
    3838
    39   Return FALSE to indicate this interface is not supported. 
     39  Return FALSE to indicate this interface is not supported.
    4040
    4141  @param[out]  HmacSha1Context  Pointer to HMAC-SHA1 context being initialized.
     
    8383  Digests the input data and updates HMAC-SHA1 context.
    8484
    85   Return FALSE to indicate this interface is not supported. 
     85  Return FALSE to indicate this interface is not supported.
    8686
    8787  @param[in, out]  HmacSha1Context Pointer to the HMAC-SHA1 context.
     
    107107  Completes computation of the HMAC-SHA1 digest value.
    108108
    109   Return FALSE to indicate this interface is not supported. 
     109  Return FALSE to indicate this interface is not supported.
    110110
    111111  @param[in, out]  HmacSha1Context  Pointer to the HMAC-SHA1 context.
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/InternalCryptLib.h

    r58464 r58466  
    1 /** @file 
     1/** @file
    22  Internal include file for BaseCryptLibRuntimeCryptProtocol.
    33
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Pk/CryptDhNull.c

    r58464 r58466  
    9999{
    100100  ASSERT (FALSE);
    101   return FALSE; 
     101  return FALSE;
    102102}
    103103
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Pk/CryptPkcs7VerifyNull.c

    r58464 r58466  
    5454
    5555  If the interface is not supported, then ASSERT().
    56  
     56
    5757  @param[in]  Certs        Pointer to the certificates to be freed.
    5858
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Pk/CryptRsaExtNull.c

    r58464 r58466  
    5656  @param[in]       ModulusLength        Length of RSA modulus N in bits.
    5757  @param[in]       PublicExponent       Pointer to RSA public exponent.
    58   @param[in]       PublicExponentSize   Size of RSA public exponent buffer in bytes. 
     58  @param[in]       PublicExponentSize   Size of RSA public exponent buffer in bytes.
    5959
    6060  @retval FALSE  This interface is not supported.
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Pk/CryptX509Null.c

    r58464 r58466  
    5151                              by certificate size. A NULL terminates the list. The
    5252                              pairs are the arguments to X509ConstructCertificate().
    53                                  
     53
    5454  @retval FALSE  This interface is not supported.
    5555
     
    5959X509ConstructCertificateStack (
    6060  IN OUT  UINT8  **X509Stack,
    61   ... 
     61  ...
    6262  )
    6363{
     
    7979  IN  VOID  *X509Cert
    8080  )
    81 { 
     81{
    8282  ASSERT (FALSE);
    8383}
     
    165165
    166166  @retval FALSE  This interface is not supported.
    167  
     167
    168168**/
    169169BOOLEAN
  • trunk/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c

    r58459 r58466  
    2626  //
    2727  // NOTE: Here we use one base implementation for memset, instead of the direct
    28   //       optimized SetMem() wrapper. Because the IntrinsicLib has to be built 
    29   //       without whole program optimization option, and there will be some 
     28  //       optimized SetMem() wrapper. Because the IntrinsicLib has to be built
     29  //       without whole program optimization option, and there will be some
    3030  //       potential register usage errors when calling other optimized codes.
    3131  //
     
    4242    *(Pointer++) = ch;
    4343  }
    44  
     44
    4545  return dest;
    4646}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette