TSDuck v3.45-4709
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::TLSServerBase Class Reference

Common properties for all forms of SSL/TLS server. More...

#include <tsTLSServerBase.h>

Inheritance diagram for ts::TLSServerBase:

Public Member Functions

virtual ~TLSServerBase ()
 Virtual destructor.
 
const UStringgetCertificatePath () const
 Get the certificate path for the server.
 
const UStringgetCertificateStore () const
 Get the certificate store.
 
size_t getEphemeralRSABits () const
 Get the size in bits of the ephemeral RSA key which is used for the ephemeral self-signed certificate.
 
const UStringgetKeyPath () const
 Get the private key path for the server.
 
void setArgs (const TLSArgs &args)
 Set command line arguments for the server.
 
void setCertificatePath (const UString &path)
 Set the certificate path for the server.
 
void setCertificateStore (const UString &name)
 Set the certificate store.
 
void setEphemeralRSABits (size_t bits)
 Specify to use an ephemeral self-signed certificate with an ephemeral RSA key of the specified size.
 
void setKeyPath (const UString &path)
 Set the private key path for the server.
 

Protected Member Functions

 TLSServerBase ()=default
 Constructor is accessible to subclasses only.
 

Detailed Description

Common properties for all forms of SSL/TLS server.

Member Function Documentation

◆ setArgs()

void ts::TLSServerBase::setArgs ( const TLSArgs args)
inline

Set command line arguments for the server.

Parameters
[in]argsTLS arguments.

◆ setCertificatePath()

void ts::TLSServerBase::setCertificatePath ( const UString path)
inline

Set the certificate path for the server.

Parameters
[in]pathPath to the certificate.
  • On UNIX systems (with OpenSSL), this is the path name of the certificate file in PEM format.
  • On Windows, this is the name of a certificate, either its "friendly name", its subject name (without "CN="), its DNS name.

◆ getCertificatePath()

const UString & ts::TLSServerBase::getCertificatePath ( ) const
inline

Get the certificate path for the server.

Returns
A constant reference to the path to the certificate.
See also
setCertificatePath()

◆ setKeyPath()

void ts::TLSServerBase::setKeyPath ( const UString path)
inline

Set the private key path for the server.

Parameters
[in]pathPath to the private key.
  • On UNIX systems (with OpenSSL), this is the path name of the private key file in PEM format.
  • On Windows, the private key is retrieved with the certificate and this parameter is unused.

◆ getKeyPath()

const UString & ts::TLSServerBase::getKeyPath ( ) const
inline

Get the private key path for the server.

Returns
A constant reference to the path to the private key.
See also
setKeyPath()

◆ setCertificateStore()

void ts::TLSServerBase::setCertificateStore ( const UString name)
inline

Set the certificate store.

Parameters
[in]name
  • On UNIX systems (with OpenSSL), this parameter is unused.
  • On Windows, the possible values are "system" (Cert:\LocalMachine\My) and "user" (Cert:\CurrentUser\My). The default is "user".

◆ getCertificateStore()

const UString & ts::TLSServerBase::getCertificateStore ( ) const
inline

Get the certificate store.

Returns
A constant reference to the name of the certificate store.
See also
setCertificateStore()

◆ setEphemeralRSABits()

void ts::TLSServerBase::setEphemeralRSABits ( size_t  bits)
inline

Specify to use an ephemeral self-signed certificate with an ephemeral RSA key of the specified size.

Parameters
[in]bitsSize in bits of the ephemeral RSA key. When set to zero, no ephemeral self-signed certificate is used and a persistent certificate must be used.

◆ getEphemeralRSABits()

size_t ts::TLSServerBase::getEphemeralRSABits ( ) const
inline

Get the size in bits of the ephemeral RSA key which is used for the ephemeral self-signed certificate.

Returns
Size in bits of the ephemeral RSA key. When zero, no ephemeral self-signed certificate is used.

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