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

#include <cSSLMsg.h>

Inheritance diagram for GrayLib::cSSLMsgHeader:
GrayLib::cSSL

Public Member Functions

 cSSLMsgHeader () noexcept
 
 cSSLMsgHeader (SSL_MSG_TYPE eMsgType, SSL_VERSION_TYPE eVer, WORD wContLen)
 
bool isValidMsgType () const noexcept
 
SSL_MSG_TYPE get_MsgType () const noexcept
 
void put_MsgType (SSL_MSG_TYPE eMsgType)
 
bool isValidVersion () const noexcept
 
SSL_VERSION_TYPE get_Version () const noexcept
 
void put_Version (SSL_VERSION_TYPE v)
 
bool isValidContLength () const noexcept
 
WORD get_ContLength () const noexcept
 
void put_ContLength (WORD nContLen)
 
bool isValid () const
 
void Set (SSL_MSG_TYPE eMsgType, SSL_VERSION_TYPE eVer, WORD wContLength)
 

Public Attributes

BYTE m_nMsgType
 SSL_MSG_TYPE. Message or content type. More...
 
BYTE m_nVersion3
 Major version is always 3. Anything but 3 is junk. SSL_VERSION_MAJOR_BYTE. More...
 
BYTE m_nVersion
 Minor version byte from SSL_VERSION_TYPE. More...
 
BYTE m_nContLengthH
 k_Content_Size_Max More...
 
BYTE m_nContLengthL
 CONTENT/payload length of m_u to follow. network order = high,low order bytes. not include self. More...
 

Static Public Attributes

static const size_t k_nSizePref = 3
 just type and version. not length. More...
 
- 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

Header for SSLv3/TLS. NOT SSLv2.

Constructor & Destructor Documentation

◆ cSSLMsgHeader() [1/2]

GrayLib::cSSLMsgHeader::cSSLMsgHeader ( )
inlinenoexcept

◆ cSSLMsgHeader() [2/2]

GrayLib::cSSLMsgHeader::cSSLMsgHeader ( SSL_MSG_TYPE  eMsgType,
SSL_VERSION_TYPE  eVer,
WORD  wContLen 
)
inline

Member Function Documentation

◆ get_ContLength()

WORD GrayLib::cSSLMsgHeader::get_ContLength ( ) const
inlinenoexcept

Decode data/payload length to host order. Does NOT include size of cSSLMsgHeader.

◆ get_MsgType()

SSL_MSG_TYPE GrayLib::cSSLMsgHeader::get_MsgType ( ) const
inlinenoexcept

◆ get_Version()

SSL_VERSION_TYPE GrayLib::cSSLMsgHeader::get_Version ( ) const
inlinenoexcept

Get just the minor version number. thats all that matters. ASSUME m_nVersion3 = 3

◆ isValid()

bool GrayLib::cSSLMsgHeader::isValid ( ) const
inline

Sanity check

◆ isValidContLength()

bool GrayLib::cSSLMsgHeader::isValidContLength ( ) const
inlinenoexcept

◆ isValidMsgType()

bool GrayLib::cSSLMsgHeader::isValidMsgType ( ) const
inlinenoexcept

◆ isValidVersion()

bool GrayLib::cSSLMsgHeader::isValidVersion ( ) const
inlinenoexcept

◆ put_ContLength()

void GrayLib::cSSLMsgHeader::put_ContLength ( WORD  nContLen)
inline

◆ put_MsgType()

void GrayLib::cSSLMsgHeader::put_MsgType ( SSL_MSG_TYPE  eMsgType)
inline

◆ put_Version()

void GrayLib::cSSLMsgHeader::put_Version ( SSL_VERSION_TYPE  v)
inline

◆ Set()

void GrayLib::cSSLMsgHeader::Set ( SSL_MSG_TYPE  eMsgType,
SSL_VERSION_TYPE  eVer,
WORD  wContLength 
)
inline

Member Data Documentation

◆ k_nSizePref

const size_t GrayLib::cSSLMsgHeader::k_nSizePref = 3
static

just type and version. not length.

◆ m_nContLengthH

BYTE GrayLib::cSSLMsgHeader::m_nContLengthH

k_Content_Size_Max

◆ m_nContLengthL

BYTE GrayLib::cSSLMsgHeader::m_nContLengthL

CONTENT/payload length of m_u to follow. network order = high,low order bytes. not include self.

◆ m_nMsgType

BYTE GrayLib::cSSLMsgHeader::m_nMsgType

SSL_MSG_TYPE. Message or content type.

◆ m_nVersion

BYTE GrayLib::cSSLMsgHeader::m_nVersion

Minor version byte from SSL_VERSION_TYPE.

◆ m_nVersion3

BYTE GrayLib::cSSLMsgHeader::m_nVersion3

Major version is always 3. Anything but 3 is junk. SSL_VERSION_MAJOR_BYTE.


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