X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=NetworkPkg%2FTlsDxe%2FTlsProtocol.c;h=298ffdd659a2829bd1d60cc23b3e987984b84a74;hp=a5f95a09834516e9ca7f90e0726216c3f22c2f25;hb=b1c81b6ec3dc3776ffbe8bcc37b1049afcabd24f;hpb=44eb974081ce6abb98fb82ec35b77d790f48dda3 diff --git a/NetworkPkg/TlsDxe/TlsProtocol.c b/NetworkPkg/TlsDxe/TlsProtocol.c index a5f95a0983..298ffdd659 100644 --- a/NetworkPkg/TlsDxe/TlsProtocol.c +++ b/NetworkPkg/TlsDxe/TlsProtocol.c @@ -60,6 +60,7 @@ TlsSetSessionData ( EFI_STATUS Status; TLS_INSTANCE *Instance; UINT16 *CipherId; + CONST EFI_TLS_CIPHER *TlsCipherList; UINTN CipherCount; UINTN Index; @@ -113,9 +114,11 @@ TlsSetSessionData ( goto ON_EXIT; } + TlsCipherList = (CONST EFI_TLS_CIPHER *) Data; CipherCount = DataSize / sizeof (EFI_TLS_CIPHER); for (Index = 0; Index < CipherCount; Index++) { - *(CipherId +Index) = HTONS (*(((UINT16 *) Data) + Index)); + CipherId[Index] = ((TlsCipherList[Index].Data1 << 8) | + TlsCipherList[Index].Data2); } Status = TlsSetCipherList (Instance->TlsConn, CipherId, CipherCount);