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

#include <cSSLHandshake.h>

Inheritance diagram for GraySSL::cSSLHandshake:
GrayLib::cSSL

Public Member Functions

 cSSLHandshake ()
 
 ~cSSLHandshake ()
 
HRESULT ReadGroupDefs (UINT nGroupQty, const BYTE *p)
 
void SetHasherVer1 (SSL_VERSION_TYPE eVer, const cSSLCipherSuite *pCipherSuite)
 
bool SetHasherVer2 (SSL_VERSION_TYPE eVer, const cSSLCipherSuite *pCipherSuite)
 
void UpdateHandHashes (const BYTE *buf, size_t len)
 
bool SelectKeyCrt (const cSSLCipherSuite *pCipherSuite, SSL_VERSION_TYPE nVer)
 

Public Attributes

SSL_Hash_TYPE m_eSignHashType
 Hash algorithm for signature. More...
 
SSL_CERT_TYPE m_eCertType
 Requested cert type. More...
 
SSL_Hash_TYPE m_eHashTypeVerify
 Hash algorithm for Signature verify. More...
 
cKeyExDHM m_KeyExchDHM
 DHM key exchange. More...
 
cKeyExECDH m_KeyExchECDH
 ECDH key exchange. More...
 
cECPGroupPrefs m_ECPGroups
 Supported elliptic curves. Server side only. More...
 
cX509KeyCrtPairm_pKeyCrtHand
 
cX509KeyCrtPairm_pKeyCrtSNI
 key/cert list selected from m_pSNICallback More...
 
cHashMD5Builder m_fin_md5
 
cHashSHA1Builder m_fin_sha1
 
cHashSHA256Builder m_fin_sha256
 
cHashSHA384Builder m_fin_sha384
 
const ISSLHandshakeHasherm_pHasher
 pointer to static const interface based on SSL version. More...
 
SSL_Hash_TYPE m_eHashChecksum
 
BYTE m_randbytes [64]
 random bytes. 32 + 32 More...
 
BYTE m_premaster [sizeof(uSSLPremasterSecret)]
 premaster secret. k_MAC_Size_Max More...
 
size_t m_nPremasterLen
 premaster length <= sizeof(uSSLPremasterSecret) More...
 
bool m_bResume
 session resume indicator. Get Session from the SessionCache if i can. More...
 
SSL_VERSION_TYPE m_nVerMax
 max. version client More...
 
bool m_bTLS_EXT
 client extension presence TLS_EXT_ec_point_formats_PRESENT More...
 
bool m_bNewSessionTicket
 use NewSessionTicket? TLS_EXT_SessionTicket More...
 
bool m_bExtendedMasterSecret
 use Extended Master Secret? More...
 

Additional Inherited Members

- Static Public Attributes inherited from GrayLib::cSSL
static const size_t k_PSK_Size_Max = 32
 256 bits More...
 
static const size_t k_MAC_Size_Max = 48
 16 to 48. SHA-384 used for HMAC. like k_HashSizeMax More...
 
static const size_t k_Number_Size_Max = 1024
 Max reasonable size of a big number used for crypt purposes. 8k bits. like cBigInteger::k_SIZE_MAX. More...
 
static const size_t k_Content_Size_Max = 16384
 Size of content. >= k_MaxFragLens[MAX]. More...
 
static const WORD k_MaxFragLens [SSL_MAX_FRAG_LEN_QTY]
 

Detailed Description

This structure contains the parameters only needed during handshake states. Handshake specific crypto variables

Constructor & Destructor Documentation

◆ cSSLHandshake()

GraySSL::cSSLHandshake::cSSLHandshake ( )

◆ ~cSSLHandshake()

GraySSL::cSSLHandshake::~cSSLHandshake ( )

Free referenced items in an SSL handshake context and clear memory

Member Function Documentation

◆ ReadGroupDefs()

HRESULT GraySSL::cSSLHandshake::ReadGroupDefs ( UINT  nGroupQty,
const BYTE *  p 
)

◆ SelectKeyCrt()

bool GraySSL::cSSLHandshake::SelectKeyCrt ( const cSSLCipherSuite pCipherSuite,
SSL_VERSION_TYPE  nVer 
)

◆ SetHasherVer1()

void GraySSL::cSSLHandshake::SetHasherVer1 ( SSL_VERSION_TYPE  eVer,
const cSSLCipherSuite pCipherSuite 
)

◆ SetHasherVer2()

bool GraySSL::cSSLHandshake::SetHasherVer2 ( SSL_VERSION_TYPE  eVer,
const cSSLCipherSuite pCipherSuite 
)

◆ UpdateHandHashes()

void GraySSL::cSSLHandshake::UpdateHandHashes ( const BYTE *  buf,
size_t  len 
)

Update hashes during handshake. SSL_MSG_HANDSHAKE or v2 hello. ASSERT(this->isStateHandshake());

Member Data Documentation

◆ m_bExtendedMasterSecret

bool GraySSL::cSSLHandshake::m_bExtendedMasterSecret

use Extended Master Secret?

◆ m_bNewSessionTicket

bool GraySSL::cSSLHandshake::m_bNewSessionTicket

use NewSessionTicket? TLS_EXT_SessionTicket

◆ m_bResume

bool GraySSL::cSSLHandshake::m_bResume

session resume indicator. Get Session from the SessionCache if i can.

◆ m_bTLS_EXT

bool GraySSL::cSSLHandshake::m_bTLS_EXT

client extension presence TLS_EXT_ec_point_formats_PRESENT

TLS extension flags (for extensions with outgoing ServerHello content that need it (e.g. for RENEGOTIATION_INFO the server already knows because of state of the renegotiation flag, so no indicator is required)

◆ m_eCertType

SSL_CERT_TYPE GraySSL::cSSLHandshake::m_eCertType

Requested cert type.

◆ m_ECPGroups

cECPGroupPrefs GraySSL::cSSLHandshake::m_ECPGroups

Supported elliptic curves. Server side only.

◆ m_eHashChecksum

SSL_Hash_TYPE GraySSL::cSSLHandshake::m_eHashChecksum

◆ m_eHashTypeVerify

SSL_Hash_TYPE GraySSL::cSSLHandshake::m_eHashTypeVerify

Hash algorithm for Signature verify.

◆ m_eSignHashType

SSL_Hash_TYPE GraySSL::cSSLHandshake::m_eSignHashType

Hash algorithm for signature.

◆ m_fin_md5

cHashMD5Builder GraySSL::cSSLHandshake::m_fin_md5

◆ m_fin_sha1

cHashSHA1Builder GraySSL::cSSLHandshake::m_fin_sha1

◆ m_fin_sha256

cHashSHA256Builder GraySSL::cSSLHandshake::m_fin_sha256

◆ m_fin_sha384

cHashSHA384Builder GraySSL::cSSLHandshake::m_fin_sha384

◆ m_KeyExchDHM

cKeyExDHM GraySSL::cSSLHandshake::m_KeyExchDHM

DHM key exchange.

◆ m_KeyExchECDH

cKeyExECDH GraySSL::cSSLHandshake::m_KeyExchECDH

ECDH key exchange.

◆ m_nPremasterLen

size_t GraySSL::cSSLHandshake::m_nPremasterLen

premaster length <= sizeof(uSSLPremasterSecret)

◆ m_nVerMax

SSL_VERSION_TYPE GraySSL::cSSLHandshake::m_nVerMax

max. version client

◆ m_pHasher

const ISSLHandshakeHasher* GraySSL::cSSLHandshake::m_pHasher

pointer to static const interface based on SSL version.

◆ m_pKeyCrtHand

cX509KeyCrtPair* GraySSL::cSSLHandshake::m_pKeyCrtHand

Current key/cert or key/cert list. On client: pointer to ssl->key_cert, only the first entry used. On server: starts as a pointer to ssl->key_cert, then becomes a pointer to the chosen key from this list or the SNI list.

◆ m_pKeyCrtSNI

cX509KeyCrtPair* GraySSL::cSSLHandshake::m_pKeyCrtSNI

key/cert list selected from m_pSNICallback

◆ m_premaster

BYTE GraySSL::cSSLHandshake::m_premaster[sizeof(uSSLPremasterSecret)]

premaster secret. k_MAC_Size_Max

◆ m_randbytes

BYTE GraySSL::cSSLHandshake::m_randbytes[64]

random bytes. 32 + 32


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