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

#include <cSSLMsg.h>

Inheritance diagram for GrayLib::cSSLMsgHandHello:
GrayLib::cSSL

Public Member Functions

HRESULT ReadHello (const BYTE *pData, size_t nSize)
 
size_t get_WriteHelloSize () const noexcept
 
HRESULT WriteHello (BYTE *pData) const
 

Public Attributes

BYTE m_nClientVersion3
 Major version is always 3. SSL_VERSION_MAJOR_BYTE. More...
 
BYTE m_nClientVersion
 Minor version byte from SSL_VERSION_TYPE. ProtocolVersion. More...
 
DWORD m_TimeUnixGmt
 32 bit cTimeInt/TIMESEC_t. used as part of random below. More...
 
BYTE m_Random [28]
 A bit random number. More...
 
cHeapBlock m_SessionId
 (var len <= 32) More...
 
cArrayVal< SSL_CipherSuite_tm_aCipherSuite
 Cryptographic suite selector. a key exchange algorithm and a CipherSpec combo. (2^16-1) More...
 
cArrayVal< SSL_Compress_tm_aCompressionMethod
 (2^8-1) More...
 
cHeapBlock m_Extensions
 Other stuff for forward version compatibility. cSSLMsgHandExt. 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

params from SSL_MSG_HANDSHAKE SSL_HAND_ClientHello or SSL_HAND_ServerHello messages. Variable length declare what ciphers and compression algorithms i support/desire. http://en.wikipedia.org/wiki/CipherSuite in order of preference

  1. key exchange algorithm. (RSA, Diffie-Hellman, ECDH, SRP, PSK). Auth (RSA, DSA, ECDSA)
  2. a bulk encryption algorithm. (RC4, Triple DES, AES, IDEA, DES, or Camellia)
  3. a message authentication code (MAC) algorithm. (MD5 or one of the SHA hash functions)
  4. a pseudo random function (PRF)
  5. compression algorithm.

Member Function Documentation

◆ get_WriteHelloSize()

size_t GrayLib::cSSLMsgHandHello::get_WriteHelloSize ( ) const
noexcept
Returns
size needed to serialize this. SSL_MSG_HANDSHAKE

◆ ReadHello()

HRESULT GrayLib::cSSLMsgHandHello::ReadHello ( const BYTE *  pData,
size_t  nSize 
)

Parse content of SSL_MSG_HANDSHAKE SSL_HAND_ClientHello. HRESULT_WIN32_C(ERROR_IO_INCOMPLETE) = incomplete but not fatal?

◆ WriteHello()

HRESULT GrayLib::cSSLMsgHandHello::WriteHello ( BYTE *  pData) const

Write get_WriteHelloSize() bytes for SSL_MSG_HANDSHAKE

Returns
size

Member Data Documentation

◆ m_aCipherSuite

cArrayVal<SSL_CipherSuite_t> GrayLib::cSSLMsgHandHello::m_aCipherSuite

Cryptographic suite selector. a key exchange algorithm and a CipherSpec combo. (2^16-1)

◆ m_aCompressionMethod

cArrayVal<SSL_Compress_t> GrayLib::cSSLMsgHandHello::m_aCompressionMethod

(2^8-1)

◆ m_Extensions

cHeapBlock GrayLib::cSSLMsgHandHello::m_Extensions

Other stuff for forward version compatibility. cSSLMsgHandExt.

◆ m_nClientVersion

BYTE GrayLib::cSSLMsgHandHello::m_nClientVersion

Minor version byte from SSL_VERSION_TYPE. ProtocolVersion.

◆ m_nClientVersion3

BYTE GrayLib::cSSLMsgHandHello::m_nClientVersion3

Major version is always 3. SSL_VERSION_MAJOR_BYTE.

◆ m_Random

BYTE GrayLib::cSSLMsgHandHello::m_Random[28]

A bit random number.

◆ m_SessionId

cHeapBlock GrayLib::cSSLMsgHandHello::m_SessionId

(var len <= 32)

◆ m_TimeUnixGmt

DWORD GrayLib::cSSLMsgHandHello::m_TimeUnixGmt

32 bit cTimeInt/TIMESEC_t. used as part of random below.


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