TianoCore EDK2 master
Loading...
Searching...
No Matches
TlsInit.c File Reference
#include "InternalTlsLib.h"

Go to the source code of this file.

Functions

BOOLEAN EFIAPI TlsInitialize (VOID)
 
VOID EFIAPI TlsCtxFree (IN VOID *TlsCtx)
 
VOID *EFIAPI TlsCtxNew (IN UINT8 MajorVer, IN UINT8 MinorVer)
 
VOID EFIAPI TlsFree (IN VOID *Tls)
 
VOID *EFIAPI TlsNew (IN VOID *TlsCtx)
 

Detailed Description

SSL/TLS Initialization Library Wrapper Implementation over OpenSSL.

Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file TlsInit.c.

Function Documentation

◆ TlsCtxFree()

VOID EFIAPI TlsCtxFree ( IN VOID *  TlsCtx)

Free an allocated SSL_CTX object.

Parameters
[in]TlsCtxPointer to the SSL_CTX object to be released.

Definition at line 57 of file TlsInit.c.

◆ TlsCtxNew()

VOID *EFIAPI TlsCtxNew ( IN UINT8  MajorVer,
IN UINT8  MinorVer 
)

Creates a new SSL_CTX object as framework to establish TLS/SSL enabled connections.

Parameters
[in]MajorVerMajor Version of TLS/SSL Protocol.
[in]MinorVerMinor Version of TLS/SSL Protocol.
Returns
Pointer to an allocated SSL_CTX object. If the creation failed, TlsCtxNew() returns NULL.

Definition at line 83 of file TlsInit.c.

◆ TlsFree()

VOID EFIAPI TlsFree ( IN VOID *  Tls)

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.

Parameters
[in]TlsPointer to the TLS object to be freed.

Definition at line 123 of file TlsInit.c.

◆ TlsInitialize()

BOOLEAN EFIAPI TlsInitialize ( VOID  )

Initializes the OpenSSL 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.

Return values
TRUEThe OpenSSL library has been initialized.
FALSEFailed to initialize the OpenSSL library.

Definition at line 25 of file TlsInit.c.

◆ TlsNew()

VOID *EFIAPI TlsNew ( IN VOID *  TlsCtx)

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.

Parameters
[in]TlsCtxPointer to the SSL_CTX object.
Returns
Pointer to an allocated SSL object. If the creation failed, TlsNew() returns NULL.

Definition at line 159 of file TlsInit.c.