Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cSSLSession Class Reference

#include <cSSLSession.h>

Inheritance diagram for GrayLib::cSSLSession:
GrayLib::cSSLSessionBase2 GrayLib::cSSLSessionBase1 GrayLib::cSSLSessionConfig

Public Member Functions

 cSSLSession ()
 
 ~cSSLSession ()
 
void SetZeroSession ()
 
size_t WriteSession (BYTE *buf, size_t buf_len) const
 
HRESULT ReadSession (const BYTE *buf, size_t len)
 
- Public Member Functions inherited from GrayLib::cSSLSessionBase2
 cSSLSessionBase2 () noexcept
 
void SetZeroSession () noexcept
 
- Public Member Functions inherited from GrayLib::cSSLSessionBase1
 cSSLSessionBase1 () noexcept
 
bool isIdValid () const noexcept
 
BYTE get_IdSize () const noexcept
 
bool isMatchId (BYTE nIdSize, const BYTE *pId) const
 
bool isMatchId (const cSSLSessionBase1 *pSession) const
 
bool isMatchHead (const cSSLSessionBase1 *pSession) const
 
void SetId (BYTE nIdSize, const BYTE *pId)
 
HRESULT SetIdRandom (IRandomNoise *pRandom)
 
void SetPayload1 (const cSSLSessionBase1 *pSession)
 
void SetPayload2 (const cSSLSessionBase1 *pSession)
 
void SetZeroSession ()
 
- Public Member Functions inherited from GrayLib::cSSLSessionConfig
 cSSLSessionConfig () noexcept
 

Public Attributes

cRefPtr< cX509Crtm_pPeerCert
 new peer X.509 cert chain. X509.v3 [X509] certificate of the peer. optional More...
 
cHeapBlock m_Ticket
 RFC 5077 session ticket TLS_EXT_SessionTicket. Client only. opaque blob encrypted by server. More...
 
- Public Attributes inherited from GrayLib::cSSLSessionBase1
BYTE m_Id [32]
 session identifier. unique. More...
 
BYTE m_nIdSize
 session m_Id length actually used. >=16 && <=32 More...
 
SSL_CipherSuite_TYPE m_eCipherSuite
 chosen ciphersuite. SSL_CipherSuite_TYPE More...
 
SSL_COMPRESS_TYPE m_eCompression
 chosen compression. SSL_COMPRESS_TYPE More...
 
BYTE m_MasterSecret [48]
 the master secret More...
 
X509_Verify_t m_eVerifyResults
 verification result More...
 
TIMESEC_t m_TimeStamp
 entry time stamp. cTimeInt // When last used. More...
 
- Public Attributes inherited from GrayLib::cSSLSessionConfig
SSL_MAX_FRAG_TYPE m_eMaxFragLenCode
 MaxFragmentLength chosen by us. RFC 6066. More...
 
bool m_bEncryptThenMac
 flag for encrypt-then-mac for use with CBC. Enable support for Encrypt-then-MAC, RFC 7366. More...
 
bool m_bTruncatedHMAC
 negotiate truncated hmac? Enable support for RFC 6066 truncated HMAC in SSL. More...
 

Detailed Description

current SSL session data. can be cached or serialized. All serialized as part of ticket.

Constructor & Destructor Documentation

◆ cSSLSession()

GrayLib::cSSLSession::cSSLSession ( )

◆ ~cSSLSession()

GrayLib::cSSLSession::~cSSLSession ( )

Member Function Documentation

◆ ReadSession()

HRESULT GrayLib::cSSLSession::ReadSession ( const BYTE *  buf,
size_t  len 
)

read TLS_EXT_SessionTicket Create NEW Un-serialize session, see WriteSession() SSL_HAND_NEW_SESSION_TICKET Call this after 'new'

◆ SetZeroSession()

void GrayLib::cSSLSession::SetZeroSession ( )

Free referenced items in an SSL session including the peer certificate and clear memory

◆ WriteSession()

size_t GrayLib::cSSLSession::WriteSession ( BYTE *  buf,
size_t  buf_len 
) const

for SSL_HAND_NEW_SESSION_TICKET Serialize a session in the following format: 0 . n-1 session structure, n = sizeof(cSSLSession) n . n+2 m_pPeerCert length = m (0 if no certificate) n+3 . n+2+m peer cert ASN.1

Assumes ticket is nullptr (always true on server side).

Member Data Documentation

◆ m_pPeerCert

cRefPtr<cX509Crt> GrayLib::cSSLSession::m_pPeerCert

new peer X.509 cert chain. X509.v3 [X509] certificate of the peer. optional

◆ m_Ticket

cHeapBlock GrayLib::cSSLSession::m_Ticket

RFC 5077 session ticket TLS_EXT_SessionTicket. Client only. opaque blob encrypted by server.


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