reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
dtls::DtlsSocket Class Reference

#include <DtlsSocket.hxx>

Public Types

enum  SocketType { Client , Server }
 

Public Member Functions

 ~DtlsSocket ()
 
bool handlePacketMaybe (const unsigned char *bytes, size_t len)
 
void expired (DtlsSocketTimer *)
 
bool getRemoteFingerprint (const char *hashFunction, char *fingerprint, size_t fingerprintSize)
 
bool checkFingerprint (const char *hashFunction, const char *fingerprint)
 
void getMyCertFingerprint (char *fingerprint)
 
void startClient ()
 
SocketType getSocketType ()
 
SrtpSessionKeys getSrtpSessionKeys ()
 
SRTP_PROTECTION_PROFILE * getSrtpProfile ()
 
bool createSrtpSessionPolicies (srtp_policy_t &outboundPolicy, srtp_policy_t &inboundPolicy)
 
bool handshakeCompleted ()
 
bool handshakeFailed () const
 
std::chrono::steady_clock::duration getAge () const
 
DtlsSocketContext * getSocketContext ()
 

Static Public Member Functions

static bool isFingerprintHashFunctionSupported (const char *hashFunction)
 
static void computeFingerprint (X509 *cert, char *fingerprint)
 
static bool computeFingerprint (X509 *cert, const EVP_MD *digest, char *fingerprint, size_t fingerprintSize)
 

Static Public Attributes

static const size_t FingerprintSize = 32 * 3
 

Friends

class DtlsFactory
 
class DtlsListener
 

Detailed Description

Definition at line 67 of file DtlsSocket.hxx.

Member Enumeration Documentation

◆ SocketType

Enumerator
Client 
Server 

Definition at line 70 of file DtlsSocket.hxx.

Constructor & Destructor Documentation

◆ ~DtlsSocket()

DtlsSocket::~DtlsSocket ( )

Definition at line 111 of file DtlsSocket.cxx.

Member Function Documentation

◆ checkFingerprint()

bool DtlsSocket::checkFingerprint ( const char *  hashFunction,
const char *  fingerprint 
)

Definition at line 392 of file DtlsSocket.cxx.

◆ computeFingerprint() [1/2]

void DtlsSocket::computeFingerprint ( X509 *  cert,
char *  fingerprint 
)
static

Definition at line 483 of file DtlsSocket.cxx.

◆ computeFingerprint() [2/2]

bool DtlsSocket::computeFingerprint ( X509 *  cert,
const EVP_MD *  digest,
char *  fingerprint,
size_t  fingerprintSize 
)
static

Definition at line 490 of file DtlsSocket.cxx.

◆ createSrtpSessionPolicies()

bool DtlsSocket::createSrtpSessionPolicies ( srtp_policy_t &  outboundPolicy,
srtp_policy_t &  inboundPolicy 
)

Definition at line 531 of file DtlsSocket.cxx.

◆ expired()

void DtlsSocket::expired ( DtlsSocketTimer *  timer)

Definition at line 122 of file DtlsSocket.cxx.

◆ getAge()

std::chrono::steady_clock::duration dtls::DtlsSocket::getAge ( ) const
inline

Definition at line 135 of file DtlsSocket.hxx.

◆ getMyCertFingerprint()

void DtlsSocket::getMyCertFingerprint ( char *  fingerprint)

Definition at line 403 of file DtlsSocket.cxx.

◆ getRemoteFingerprint()

bool DtlsSocket::getRemoteFingerprint ( const char *  hashFunction,
char *  fingerprint,
size_t  fingerprintSize 
)

Definition at line 371 of file DtlsSocket.cxx.

◆ getSocketContext()

DtlsSocketContext * dtls::DtlsSocket::getSocketContext ( )
inline

Definition at line 137 of file DtlsSocket.hxx.

◆ getSocketType()

SocketType dtls::DtlsSocket::getSocketType ( )
inline

Definition at line 105 of file DtlsSocket.hxx.

◆ getSrtpProfile()

SRTP_PROTECTION_PROFILE * DtlsSocket::getSrtpProfile ( )

Definition at line 475 of file DtlsSocket.cxx.

◆ getSrtpSessionKeys()

SrtpSessionKeys DtlsSocket::getSrtpSessionKeys ( )

Definition at line 431 of file DtlsSocket.cxx.

◆ handlePacketMaybe()

bool DtlsSocket::handlePacketMaybe ( const unsigned char *  bytes,
size_t  len 
)

Definition at line 143 of file DtlsSocket.cxx.

◆ handshakeCompleted()

bool dtls::DtlsSocket::handshakeCompleted ( )
inline

Definition at line 129 of file DtlsSocket.hxx.

◆ handshakeFailed()

bool dtls::DtlsSocket::handshakeFailed ( ) const
inline

Definition at line 132 of file DtlsSocket.hxx.

◆ isFingerprintHashFunctionSupported()

bool DtlsSocket::isFingerprintHashFunctionSupported ( const char *  hashFunction)
static

Definition at line 365 of file DtlsSocket.cxx.

◆ startClient()

void DtlsSocket::startClient ( )

Definition at line 135 of file DtlsSocket.cxx.

Friends And Related Symbol Documentation

◆ DtlsFactory

Definition at line 140 of file DtlsSocket.hxx.

◆ DtlsListener

Definition at line 141 of file DtlsSocket.hxx.

Member Data Documentation

◆ FingerprintSize

const size_t dtls::DtlsSocket::FingerprintSize = 32 * 3
static

Definition at line 82 of file DtlsSocket.hxx.


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