VirtualBox

Ignore:
Timestamp:
Oct 29, 2015 4:30:44 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103777
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:
9 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//
Note: See TracChangeset for help on using the changeset viewer.

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