CryptoPkg: Add Null instance of the TlsLib class
https://bugzilla.tianocore.org/show_bug.cgi?id=2258 Add a Null instance of the TlsLib class. This lib instance can be used as a template for new implementations of the TlsLib class and can also be used to reduce CI build times for build checks that depend on the TlsLib class. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
committed by
Michael D Kinney
parent
412c963842
commit
79cd636f3e
111
CryptoPkg/Library/TlsLibNull/TlsInitNull.c
Normal file
111
CryptoPkg/Library/TlsLibNull/TlsInitNull.c
Normal file
@@ -0,0 +1,111 @@
|
||||
/** @file
|
||||
SSL/TLS Initialization Null Library Wrapper Implementation.
|
||||
|
||||
Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#include "InternalTlsLib.h"
|
||||
|
||||
/**
|
||||
Initializes the library.
|
||||
|
||||
This function registers ciphers and digests used directly and indirectly
|
||||
by SSL/TLS, and initializes the readable error messages.
|
||||
This function must be called before any other action takes places.
|
||||
|
||||
@retval TRUE The library has been initialized.
|
||||
@retval FALSE Failed to initialize the library.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
TlsInitialize (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
Free an allocated SSL_CTX object.
|
||||
|
||||
@param[in] TlsCtx Pointer to the SSL_CTX object to be released.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
TlsCtxFree (
|
||||
IN VOID *TlsCtx
|
||||
)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
Creates a new SSL_CTX object as framework to establish TLS/SSL enabled
|
||||
connections.
|
||||
|
||||
@param[in] MajorVer Major Version of TLS/SSL Protocol.
|
||||
@param[in] MinorVer Minor Version of TLS/SSL Protocol.
|
||||
|
||||
@return Pointer to an allocated SSL_CTX object.
|
||||
If the creation failed, TlsCtxNew() returns NULL.
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
TlsCtxNew (
|
||||
IN UINT8 MajorVer,
|
||||
IN UINT8 MinorVer
|
||||
)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
Free an allocated TLS object.
|
||||
|
||||
This function removes the TLS object pointed to by Tls and frees up the
|
||||
allocated memory. If Tls is NULL, nothing is done.
|
||||
|
||||
@param[in] Tls Pointer to the TLS object to be freed.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
TlsFree (
|
||||
IN VOID *Tls
|
||||
)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
Create a new TLS object for a connection.
|
||||
|
||||
This function creates a new TLS object for a connection. The new object
|
||||
inherits the setting of the underlying context TlsCtx: connection method,
|
||||
options, verification setting.
|
||||
|
||||
@param[in] TlsCtx Pointer to the SSL_CTX object.
|
||||
|
||||
@return Pointer to an allocated SSL object.
|
||||
If the creation failed, TlsNew() returns NULL.
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
TlsNew (
|
||||
IN VOID *TlsCtx
|
||||
)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user