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

#include <cSSLChannel.h>

Inheritance diagram for GrayLib::cSSLServerStream:
Gray::cRefBase GrayLib::cSSLChannel GrayLib::cProtocolStream IUnknown

Public Member Functions

 cSSLServerStream (cSSLServerFactory *pFactory, IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut)
 
virtual ~cSSLServerStream ()
 
 IUNKNOWN_DISAMBIG (cRefBase)
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 
- Public Member Functions inherited from GrayLib::cSSLChannel
 cSSLChannel ()
 
virtual ~cSSLChannel ()
 
void ChangeCipherSpec ()
 
 UNITTEST2_PREDEF (cSSLChannel)
 
- Public Member Functions inherited from GrayLib::cProtocolStream
 cProtocolStream (IProtocolFactory *pProtocolFactory, IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut)
 
virtual ~cProtocolStream ()
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept override
 
 STDMETHOD_ (cString, get_Name)() const override
 
 STDMETHOD_ (cStringA, get_SymName)() const override
 
bool isConnected () const
 
cStreamInputget_StreamInp () const
 
cStreamOutputget_StreamOut () const
 
virtual size_t get_ProtocolMaxMessageSize () const
 
virtual HRESULT DisposeThis ()
 
virtual HRESULT OnTickStream ()
 

Public Attributes

cProtocolStreamPtr m_pProtocol2
 The protocol wrapped by this cSSLServerStream. More...
 
- Public Attributes inherited from GrayLib::cSSLChannel
bool m_bFinished
 
cSSLMsgHandHello m_Hello
 last set of hello params. More...
 
cSSLSession m_Neg
 the encryption we are negotiating. not active til Cont_ChangeCipherSpec. More...
 
cSSLSession m_Cur
 the current active selected encryption of the channel. More...
 
cNewPtr< cCipherBasem_pCrypt
 the current active encryption. More...
 
- Public Attributes inherited from GrayLib::cProtocolStream
IProtocolFactory *const m_pProtocolFactory
 What IProtocolFactory produced this? More...
 
IUnkObject *const m_pServerConnection
 the cNetServerConnection or other top level parent for this protocol. More...
 
HASHCODE_t const m_nHashCode
 the m_pClient->get_HashCode() id for this client connection/stream. More...
 

Protected Member Functions

HRESULT OnHand_ClientHello (const BYTE *pHandshakeData, DWORD dwDataLength)
 
HRESULT OnAlert (const cSSLMsgX &msg)
 
HRESULT OnChangeCipherSpec (const cSSLMsgX &msg)
 
HRESULT OnHandshake (const cSSLMsgX &msg)
 
HRESULT OnApplication (const cSSLMsgX &msg)
 
virtual HRESULT ProcessStreamPacket () override
 

Additional Inherited Members

- Protected Attributes inherited from GrayLib::cProtocolStream
cStreamInputm_pStreamInp
 for use with ProcessStreamPacket() More...
 
cStreamOutputm_pStreamOut
 TX responses back to the remote client go here. (e.g. cNetServerConnection->cNetStream) More...
 
cString m_sName
 a user readable name. Usually the IP address or reverse DNS lookup. can be upgraded as lookup or login becomes avail. m_pClient->get_Name() More...
 

Detailed Description

Server side of client SSL connection.

Constructor & Destructor Documentation

◆ cSSLServerStream()

GrayLib::cSSLServerStream::cSSLServerStream ( cSSLServerFactory pFactory,
IUnkObject *  pServerConnection,
cStreamInput pStreamInp,
cStreamOutput pStreamOut 
)

◆ ~cSSLServerStream()

GrayLib::cSSLServerStream::~cSSLServerStream ( )
virtual

Member Function Documentation

◆ IUNKNOWN_DISAMBIG()

GrayLib::cSSLServerStream::IUNKNOWN_DISAMBIG ( cRefBase  )

◆ OnAlert()

HRESULT GrayLib::cSSLServerStream::OnAlert ( const cSSLMsgX msg)
protected

SSL_MSG_ALERT

◆ OnApplication()

HRESULT GrayLib::cSSLServerStream::OnApplication ( const cSSLMsgX msg)
protected

SSL_MSG_APPLICATION_DATA

◆ OnChangeCipherSpec()

HRESULT GrayLib::cSSLServerStream::OnChangeCipherSpec ( const cSSLMsgX msg)
protected

SSL_MSG_CHANGE_CIPHER_SPEC

◆ OnHand_ClientHello()

HRESULT GrayLib::cSSLServerStream::OnHand_ClientHello ( const BYTE *  pHandshakeData,
DWORD  dwDataLength 
)
protected

◆ OnHandshake()

HRESULT GrayLib::cSSLServerStream::OnHandshake ( const cSSLMsgX msg)
protected

SSL_MSG_HANDSHAKE

◆ ProcessStreamPacket()

HRESULT GrayLib::cSSLServerStream::ProcessStreamPacket ( )
overrideprotectedvirtual

override cProtocolStream Process server side of SLL/TLS connection. Called periodically to process queued incoming data. if any.

Returns
<0 = error. HRESULT_WIN32_C(ERROR_IO_INCOMPLETE) = not complete message. S_OK = processed full message.

Reimplemented from GrayLib::cProtocolStream.

Member Data Documentation

◆ m_pProtocol2

cProtocolStreamPtr GrayLib::cSSLServerStream::m_pProtocol2

The protocol wrapped by this cSSLServerStream.


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