summaryrefslogtreecommitdiff
path: root/NetworkPkg
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/TlsDxe/TlsProtocol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/NetworkPkg/TlsDxe/TlsProtocol.c b/NetworkPkg/TlsDxe/TlsProtocol.c
index a5f95a0..298ffdd 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);