diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-11-17 11:50:11 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-11-24 08:46:20 +0800 |
commit | 0878771f0c6d7fcbf3617a530b4d6a49316c7ab9 (patch) | |
tree | b488f87955218e4710576bc109a6c7bcc9e29aee /CryptoPkg/Include | |
parent | c6c501654e85d712bc6381b1c9f2beb28b44ec68 (diff) | |
download | edk2-0878771f0c6d7fcbf3617a530b4d6a49316c7ab9.tar.gz edk2-0878771f0c6d7fcbf3617a530b4d6a49316c7ab9.tar.bz2 edk2-0878771f0c6d7fcbf3617a530b4d6a49316c7ab9.zip |
CryptoPkg/TlsLib: Change the return type of TlsInitialize().
V2:
* Correct the commit log.
Currently, the return code of OPENSSL_init_ssl(0 or 1) and RandomSeed
(TRUE or FALSE) are not checked in TlsInitialize(). Also "VOID" is used
as the return type of TlsInitialize(), which can't be used to capture
the returned value for error handling.
From Long Qin (CryptoPkg owner):
The early version of OPENSSL_init_ssl() use the "VOID" as the return
value, which was updated to "int" later because the function changes
can fail.
So, this patch is to change the return type of TlsInitialize() to
follow up the OPENSSL_init_ssl() update.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Long Qin <qin.long@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>
Diffstat (limited to 'CryptoPkg/Include')
-rw-r--r-- | CryptoPkg/Include/Library/TlsLib.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CryptoPkg/Include/Library/TlsLib.h b/CryptoPkg/Include/Library/TlsLib.h index fa6cb99d78..b69d513285 100644 --- a/CryptoPkg/Include/Library/TlsLib.h +++ b/CryptoPkg/Include/Library/TlsLib.h @@ -1,7 +1,7 @@ /** @file
Defines TLS Library APIs.
-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
@@ -22,8 +22,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. by SSL/TLS, and initializes the readable error messages.
This function must be called before any other action takes places.
+ @retval TRUE The OpenSSL library has been initialized.
+ @retval FALSE Failed to initialize the OpenSSL library.
+
**/
-VOID
+BOOLEAN
EFIAPI
TlsInitialize (
VOID
|