VirtualBox

Ignore:
Timestamp:
Sep 11, 2019 8:46:37 AM (5 years ago)
Author:
vboxsync
Message:

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

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

  • trunk/src/VBox/Devices/EFI/FirmwareNew/NetworkPkg/TlsDxe/TlsProtocol.c

    r77662 r80721  
    44  Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
    55
    6   This program and the accompanying materials
    7   are licensed and made available under the terms and conditions of the BSD License
    8   which accompanies this distribution.  The full text of the license may be found at
    9   http://opensource.org/licenses/bsd-license.php.
    10 
    11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     6  SPDX-License-Identifier: BSD-2-Clause-Patent
    137
    148**/
     
    3933                                  Data is NULL.
    4034                                  DataSize is 0.
     35                                  DataSize is invalid for DataType.
    4136  @retval EFI_UNSUPPORTED         The DataType is unsupported.
    4237  @retval EFI_ACCESS_DENIED       If the DataType is one of below:
     
    6055  TLS_INSTANCE              *Instance;
    6156  UINT16                    *CipherId;
     57  CONST EFI_TLS_CIPHER      *TlsCipherList;
     58  UINTN                     CipherCount;
    6259  UINTN                     Index;
    6360
     
    10198    break;
    10299  case EfiTlsCipherList:
     100    if (DataSize % sizeof (EFI_TLS_CIPHER) != 0) {
     101      Status = EFI_INVALID_PARAMETER;
     102      goto ON_EXIT;
     103    }
     104
    103105    CipherId = AllocatePool (DataSize);
    104106    if (CipherId == NULL) {
     
    107109    }
    108110
    109     for (Index = 0; Index < DataSize / sizeof (EFI_TLS_CIPHER); Index++) {
    110       *(CipherId +Index) = HTONS (*(((UINT16 *) Data) + Index));
    111     }
    112 
    113     Status = TlsSetCipherList (Instance->TlsConn, CipherId, DataSize / sizeof (EFI_TLS_CIPHER));
     111    TlsCipherList = (CONST EFI_TLS_CIPHER *) Data;
     112    CipherCount = DataSize / sizeof (EFI_TLS_CIPHER);
     113    for (Index = 0; Index < CipherCount; Index++) {
     114      CipherId[Index] = ((TlsCipherList[Index].Data1 << 8) |
     115                         TlsCipherList[Index].Data2);
     116    }
     117
     118    Status = TlsSetCipherList (Instance->TlsConn, CipherId, CipherCount);
    114119
    115120    FreePool (CipherId);
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