![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cSSLConfig.h>
Public Attributes | |
cRangeT< SSL_VERSION_TYPE > | m_VerRange |
What range of versions do we support? More... | |
bool | m_bExtendedMasterSecret |
flag for extended master secret. Extended Master Secret, aka Session Hash (draft-ietf-tls-session-hash-02). More... | |
IRandomNoise * | m_pRandom |
random number generator. g_Rand. More... | |
bool | m_bAllowRC4 |
flag for enable/disabling SSL_Cipher_RC4_128. default = false. GET RID OF THIS using m_pCipherSuiteList More... | |
const SSL_CipherSuite_t * | m_pCipherSuiteList [SSL_VERSION_QTY] |
allowed ciphersuites for each version More... | |
cECPGroupPrefs | m_ECPGroupsAllowed |
Allow only these ECPGroup_TYPE curves. 0 terminated array of ECPGroup_TYPE. More... | |
const char ** | m_ppAlpnList |
ordered list of supported protocols. nullptr terminated. More... | |
bool | m_bFallbackSCSV |
flag for allowing fallback connections SSL_FALLBACK_SCSV cipher suite ? (Client only) More... | |
SSL_RENO_LEGACY_TYPE | m_eRenoLegacyType |
Allow legacy renegotiation. More... | |
bool | m_bUseSessionTickets |
use session tickets? (default true for client) More... | |
TIMESECD_t | m_nTicketLifeSeconds |
session ticket lifetime More... | |
SSL_AUTHMODE_TYPE | m_eAuthMode |
Verification mode for cert failures. More... | |
IX509VerifyCert * | m_pVerifyCert |
Alternate mechanism to check certs. More... | |
cRefPtr< cX509Crt > | m_pCaChain |
own trusted CA chain More... | |
cRefPtr< cX509Crl > | m_pCaCrl |
trusted CA CRLs More... | |
cBigUnsigned | m_dhm_P |
prime modulus for DHM. cKeyExDHM More... | |
cBigInteger | m_dhm_G |
generator for DHM. cKeyExDHM More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
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] |
config options that control how a SSL connection behaves.
GraySSL::cSSLConfig::cSSLConfig | ( | ) |
GraySSL::cSSLConfig::~cSSLConfig | ( | ) |
bool GraySSL::cSSLConfig::CheckOpts | ( | ) |
const char * GraySSL::cSSLConfig::FindAlpn | ( | const BYTE * | pFind, |
StrLen_t | nLenFind | ||
) | const |
Find a match in my list.
bool GraySSL::cSSLConfig::IsECPGroupAllowed | ( | const cECPGroup & | grp | ) | const |
Check is a curve proposed by the peer is in our list.
void GraySSL::cSSLConfig::put_AllowRC4 | ( | bool | bAllowRC4 | ) |
Disable or enable support for RC4 TODO get rid of this make RC4 off by default ? or just m_pCipherSuiteList
HRESULT GraySSL::cSSLConfig::put_AlpnProtocols | ( | const char ** | ppAlpnList | ) |
Set the supported Application Layer Protocols. "Empty strings MUST NOT be included and byte strings MUST NOT be truncated". Check lengths now rather than later.
|
inline |
Set the certificate verification mode
void GraySSL::cSSLConfig::put_EncryptThenMac | ( | bool | etm | ) |
Enable or disable Encrypt-then-MAC (Default: true)
|
inline |
Set the fallback flag (client-side only). (Default: true).
HRESULT GraySSL::cSSLConfig::put_MaxFragLenCode | ( | SSL_MAX_FRAG_TYPE | eMaxFragLenCode | ) |
Set the maximum fragment length to emit and/or negotiate (Default: k_Content_Size_Max, usually 2^14 bytes) (Server: set maximum fragment length to emit, usually negotiated by the client during handshake (Client: set maximum fragment length to emit and negotiate with the server during handshake)
|
inline |
set Random number generator
|
inline |
Prevent or allow legacy renegotiation. (Default: SSL_RENO_LEGACY_NO_RENEGOTIATION)
SSL_RENO_LEGACY_NO_RENEGOTIATION allows connections to be established even if the peer does not support secure renegotiation, but does not allow renegotiation to take place if not secure. (Interoperable and secure option)
SSL_RENO_LEGACY_ALLOW_RENEGOTIATION allows renegotiations with non-upgraded peers. Allowing legacy renegotiation makes the connection vulnerable to specific man in the middle attacks. (See RFC 5746) (Most interoperable and least secure option)
SSL_RENO_LEGACY_BREAK_HANDSHAKE breaks off connections if peer does not support secure renegotiation. Results in interoperability issues with non-upgraded peers that do not support renegotiation altogether. (Most secure option, interoperability issues)
|
inline |
Set session ticket lifetime (server only)
void GraySSL::cSSLConfig::put_UseExtendedMasterSecret | ( | bool | ems | ) |
Enable or disable Extended Master Secret negotiation. (Default: true)
|
inline |
ONLY Used for testing. Server side only. Enable / Disable session tickets
|
inline |
Activate negotiation of truncated HMAC (Default: false on client, true on server.)
|
inline |
Set the verification callback (Optional). If set, the verify callback is called for each certificate in the chain.
void GraySSL::cSSLConfig::put_VersionMax | ( | SSL_VERSION_TYPE | v | ) |
Set the maximum supported version sent from the client side and/or accepted at the server side (Default: SSL_VER_MAJOR_MAX, SSL_VERSION_SUPPORT_MAX)
void GraySSL::cSSLConfig::put_VersionMin | ( | SSL_VERSION_TYPE | v | ) |
Set the minimum accepted SSL/TLS protocol version (Default: SSL_VER_MAJOR_MIN, k_SSL_VERSION_SUPPORT_MIN)
Set the data required to verify peer certificate
void GraySSL::cSSLConfig::SetCipherSuiteList | ( | const SSL_CipherSuite_t * | ciphersuites, |
SSL_VERSION_TYPE | v | ||
) |
Set the list of allowed ciphersuites and the preference order. First in the list has the highest preference. (Overrides all version specific lists)
HRESULT GraySSL::cSSLConfig::SetKeyExDHMParams | ( | const char * | dhm_P, |
const char * | dhm_G | ||
) |
HRESULT GraySSL::cSSLConfig::VerifyCrt | ( | cX509Crt * | pCrt, |
const char * | pszPeerCN, | ||
OUT X509_Verify_t & | eVerifyResults | ||
) | const |
bool GraySSL::cSSLConfig::m_bAllowRC4 |
flag for enable/disabling SSL_Cipher_RC4_128. default = false. GET RID OF THIS using m_pCipherSuiteList
bool GraySSL::cSSLConfig::m_bExtendedMasterSecret |
flag for extended master secret. Extended Master Secret, aka Session Hash (draft-ietf-tls-session-hash-02).
bool GraySSL::cSSLConfig::m_bFallbackSCSV |
flag for allowing fallback connections SSL_FALLBACK_SCSV cipher suite ? (Client only)
bool GraySSL::cSSLConfig::m_bUseSessionTickets |
use session tickets? (default true for client)
cBigInteger GraySSL::cSSLConfig::m_dhm_G |
generator for DHM. cKeyExDHM
cBigUnsigned GraySSL::cSSLConfig::m_dhm_P |
prime modulus for DHM. cKeyExDHM
SSL_AUTHMODE_TYPE GraySSL::cSSLConfig::m_eAuthMode |
Verification mode for cert failures.
cECPGroupPrefs GraySSL::cSSLConfig::m_ECPGroupsAllowed |
Allow only these ECPGroup_TYPE curves. 0 terminated array of ECPGroup_TYPE.
SSL_RENO_LEGACY_TYPE GraySSL::cSSLConfig::m_eRenoLegacyType |
Allow legacy renegotiation.
TIMESECD_t GraySSL::cSSLConfig::m_nTicketLifeSeconds |
session ticket lifetime
const SSL_CipherSuite_t* GraySSL::cSSLConfig::m_pCipherSuiteList[SSL_VERSION_QTY] |
allowed ciphersuites for each version
const char** GraySSL::cSSLConfig::m_ppAlpnList |
ordered list of supported protocols. nullptr terminated.
IRandomNoise* GraySSL::cSSLConfig::m_pRandom |
random number generator. g_Rand.
IX509VerifyCert* GraySSL::cSSLConfig::m_pVerifyCert |
Alternate mechanism to check certs.
cRangeT<SSL_VERSION_TYPE> GraySSL::cSSLConfig::m_VerRange |
What range of versions do we support?