TSDuck v3.43-4441
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::OpenSSL Class Reference

Utilities for the OpenSSL library. More...

#include <tsOpenSSL.h>

Classes

class  Controlled
 Base class for objects which must be terminated with OpenSSL. More...
 
class  Providers
 A singleton which manages OpenSSL cryptographic providers. More...
 

Static Public Member Functions

static SSL_CTX * CreateContext (bool server, bool verify_peer, Report &report)
 Create and configure a SSL_CTX context.
 
static bool Debug ()
 Check if environment variable TS_DEBUG_OPENSSL is defined.
 
static void DebugErrors ()
 Display OpenSSL errors on standard error if environment variable TS_DEBUG_OPENSSL is defined.
 
static void GetErrors (UStringList &errors)
 Get last errors from the OpenSSL library.
 
static void ReportErrors (Report &report, int severity=Severity::Error)
 Report last errors from the OpenSSL library.
 
static UString Version ()
 Get a full version string for the OpenSSL library.
 

Detailed Description

Utilities for the OpenSSL library.

Note that since OpenSSL 1.1.0, no explicit initialization or cleanup is required.

Member Function Documentation

◆ Version()

static UString ts::OpenSSL::Version ( )
static

Get a full version string for the OpenSSL library.

Returns
The version string.

◆ GetErrors()

static void ts::OpenSSL::GetErrors ( UStringList errors)
static

Get last errors from the OpenSSL library.

The error messages are removed from the OpenSSL error message queue.

Parameters
[out]errorsList of error messages.

◆ ReportErrors()

static void ts::OpenSSL::ReportErrors ( Report report,
int  severity = Severity::Error 
)
static

Report last errors from the OpenSSL library.

The error messages are removed from the OpenSSL error message queue.

Parameters
[out]reportWhere to report error messages.
[in]severitySeverity level.

◆ Debug()

static bool ts::OpenSSL::Debug ( )
static

Check if environment variable TS_DEBUG_OPENSSL is defined.

Returns
True if environment variable TS_DEBUG_OPENSSL is defined.

◆ CreateContext()

static SSL_CTX * ts::OpenSSL::CreateContext ( bool  server,
bool  verify_peer,
Report report 
)
static

Create and configure a SSL_CTX context.

Parameters
[in]serverTrue for server side, false for client side.
[in]verify_peerVerify the certificate of the peer.
[in,out]reportWhere to report errors.
Returns
The new SSL_CTX, nullptr on error.

The documentation for this class was generated from the following file: