diff options
-rw-r--r-- | MdePkg/Include/IndustryStandard/Tls1.h | 10 | ||||
-rw-r--r-- | NetworkPkg/HttpDxe/HttpProto.c | 4 | ||||
-rw-r--r-- | NetworkPkg/HttpDxe/HttpsSupport.c | 16 | ||||
-rw-r--r-- | NetworkPkg/TlsDxe/TlsImpl.c | 6 | ||||
-rw-r--r-- | NetworkPkg/TlsDxe/TlsProtocol.c | 4 |
5 files changed, 20 insertions, 20 deletions
diff --git a/MdePkg/Include/IndustryStandard/Tls1.h b/MdePkg/Include/IndustryStandard/Tls1.h index 14eb2654a5..019ff617de 100644 --- a/MdePkg/Include/IndustryStandard/Tls1.h +++ b/MdePkg/Include/IndustryStandard/Tls1.h @@ -3,7 +3,7 @@ This file contains common TLS 1.0/1.1/1.2 definitions from RFC 2246/4346/5246 - Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -72,10 +72,10 @@ /// TLS Content Type, refers to A.1 of rfc-2246, rfc-4346 and rfc-5246. /// typedef enum { - TLS_CONTENT_TYPE_CHANGE_CIPHER_SPEC = 20, - TLS_CONTENT_TYPE_ALERT = 21, - TLS_CONTENT_TYPE_HANDSHAKE = 22, - TLS_CONTENT_TYPE_APPLICATION_DATA = 23, + TlsContentTypeChangeCipherSpec = 20, + TlsContentTypeAlert = 21, + TlsContentTypeHandshake = 22, + TlsContentTypeApplicationData = 23, } TLS_CONTENT_TYPE; /// diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 2e784def4c..2e8c42e629 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -1,7 +1,7 @@ /** @file
Miscellaneous routines for HttpDxe driver.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1491,7 +1491,7 @@ HttpTransmitTcp ( Status = EFI_OUT_OF_RESOURCES;
return Status;
}
- ((TLS_RECORD_HEADER *) Buffer)->ContentType = TLS_CONTENT_TYPE_APPLICATION_DATA;
+ ((TLS_RECORD_HEADER *) Buffer)->ContentType = TlsContentTypeApplicationData;
((TLS_RECORD_HEADER *) Buffer)->Version.Major = HttpInstance->TlsConfigData.Version.Major;
((TLS_RECORD_HEADER *) Buffer)->Version.Minor = HttpInstance->TlsConfigData.Version.Minor;
((TLS_RECORD_HEADER *) Buffer)->Length = (UINT16) (TxStringLen);
diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c b/NetworkPkg/HttpDxe/HttpsSupport.c index c9e6988968..77e5371242 100644 --- a/NetworkPkg/HttpDxe/HttpsSupport.c +++ b/NetworkPkg/HttpDxe/HttpsSupport.c @@ -1,7 +1,7 @@ /** @file Miscellaneous routines specific to Https for HttpDxe driver. -Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR> (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -883,10 +883,10 @@ TlsReceiveOnePdu ( } RecordHeader = *(TLS_RECORD_HEADER *) Header; - if ((RecordHeader.ContentType == TLS_CONTENT_TYPE_HANDSHAKE || - RecordHeader.ContentType == TLS_CONTENT_TYPE_ALERT || - RecordHeader.ContentType == TLS_CONTENT_TYPE_CHANGE_CIPHER_SPEC || - RecordHeader.ContentType == TLS_CONTENT_TYPE_APPLICATION_DATA) && + if ((RecordHeader.ContentType == TlsContentTypeHandshake || + RecordHeader.ContentType == TlsContentTypeAlert || + RecordHeader.ContentType == TlsContentTypeChangeCipherSpec || + RecordHeader.ContentType == TlsContentTypeApplicationData) && (RecordHeader.Version.Major == 0x03) && /// Major versions are same. (RecordHeader.Version.Minor == TLS10_PROTOCOL_VERSION_MINOR || RecordHeader.Version.Minor ==TLS11_PROTOCOL_VERSION_MINOR || @@ -1497,7 +1497,7 @@ HttpsReceive ( // RecordHeader = *(TLS_RECORD_HEADER *) BufferIn; - if ((RecordHeader.ContentType == TLS_CONTENT_TYPE_APPLICATION_DATA) && + if ((RecordHeader.ContentType == TlsContentTypeApplicationData) && (RecordHeader.Version.Major == 0x03) && (RecordHeader.Version.Minor == TLS10_PROTOCOL_VERSION_MINOR || RecordHeader.Version.Minor == TLS11_PROTOCOL_VERSION_MINOR || @@ -1587,7 +1587,7 @@ HttpsReceive ( // // Parsing buffer. // - ASSERT (((TLS_RECORD_HEADER *) (TempFragment.Bulk))->ContentType == TLS_CONTENT_TYPE_APPLICATION_DATA); + ASSERT (((TLS_RECORD_HEADER *) (TempFragment.Bulk))->ContentType == TlsContentTypeApplicationData); BufferInSize = ((TLS_RECORD_HEADER *) (TempFragment.Bulk))->Length; BufferIn = AllocateZeroPool (BufferInSize); @@ -1603,7 +1603,7 @@ HttpsReceive ( // FreePool (TempFragment.Bulk); - } else if ((RecordHeader.ContentType == TLS_CONTENT_TYPE_ALERT) && + } else if ((RecordHeader.ContentType == TlsContentTypeAlert) && (RecordHeader.Version.Major == 0x03) && (RecordHeader.Version.Minor == TLS10_PROTOCOL_VERSION_MINOR || RecordHeader.Version.Minor == TLS11_PROTOCOL_VERSION_MINOR || diff --git a/NetworkPkg/TlsDxe/TlsImpl.c b/NetworkPkg/TlsDxe/TlsImpl.c index bb71bd8dfd..efdec2d92d 100644 --- a/NetworkPkg/TlsDxe/TlsImpl.c +++ b/NetworkPkg/TlsDxe/TlsImpl.c @@ -1,7 +1,7 @@ /** @file The Miscellaneous Routines for TlsDxe driver. -Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -105,7 +105,7 @@ TlsEncryptPacket ( while ((UINTN) BufferInPtr < (UINTN) BufferIn + BufferInSize) { RecordHeaderIn = (TLS_RECORD_HEADER *) BufferInPtr; - if (RecordHeaderIn->ContentType != TLS_CONTENT_TYPE_APPLICATION_DATA) { + if (RecordHeaderIn->ContentType != TlsContentTypeApplicationData) { Status = EFI_INVALID_PARAMETER; goto ERROR; } @@ -256,7 +256,7 @@ TlsDecryptPacket ( while ((UINTN) BufferInPtr < (UINTN) BufferIn + BufferInSize) { RecordHeaderIn = (TLS_RECORD_HEADER *) BufferInPtr; - if (RecordHeaderIn->ContentType != TLS_CONTENT_TYPE_APPLICATION_DATA) { + if (RecordHeaderIn->ContentType != TlsContentTypeApplicationData) { Status = EFI_INVALID_PARAMETER; goto ERROR; } diff --git a/NetworkPkg/TlsDxe/TlsProtocol.c b/NetworkPkg/TlsDxe/TlsProtocol.c index ee1c496239..58a83c3ab7 100644 --- a/NetworkPkg/TlsDxe/TlsProtocol.c +++ b/NetworkPkg/TlsDxe/TlsProtocol.c @@ -1,7 +1,7 @@ /** @file Implementation of EFI TLS Protocol Interfaces. - Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -523,7 +523,7 @@ TlsBuildResponsePacket ( // // Must be alert message, Decrypt it and build the ResponsePacket. // - ASSERT (((TLS_RECORD_HEADER *) RequestBuffer)->ContentType == TLS_CONTENT_TYPE_ALERT); + ASSERT (((TLS_RECORD_HEADER *) RequestBuffer)->ContentType == TlsContentTypeAlert); Status = TlsHandleAlert ( Instance->TlsConn, |