The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CContext Class Reference

Inheritance diagram for CContext:
Collaboration diagram for CContext:

List of all members.

Public Types

enum  HandshakeResults { HandshakeOK, HandshakeIncompleteMessage, HandshakeFatalError }
enum  DecryptResults { DecryptOK, DecryptIncompleteMessage, DecryptRenegotiate, DecryptExpired }
enum  Direction { InboundContext, OutboundContext }
typedef unsigned long Sizes

Public Member Functions

virtual CContextCopy () const =0
 CContext (const CContext &rhs)
CContextoperator= (const CContext &rhs)
virtual ~CContext ()
bool IsComplete () const
bool CanSend () const
ULONG GetAttributes () const
SECURITY_STATUS GetLastStatus () const
bool RequirePeerVerification () const
GetTargetName () const =0
virtual void StartHandshake (CToken &outputToken)=0
virtual HandshakeResults ContinueHandshake (const CSecurityBuffer &input, CToken &outputToken, CSecurityBuffer &extraData)=0
void AllowRenegotiate (bool allow)
virtual bool RequestRenegotiate (ClientAuthenticationRequirements requirements, CToken &outputToken)
bool Renegotiating ()
void EncryptData (CSecurityBuffer &header, CSecurityBuffer &data, CSecurityBuffer &trailer)
DecryptResults DecryptData (const CSecurityBuffer &dataIn, CSecurityBuffer &dataOut, unsigned long &dataUsed)
void ShutdownConnection (CToken &outputToken)
void SendAlert (DWORD alertType, DWORD alertNumber, CToken &outputToken)
void SessionControl (DWORD sessionFlags, CToken &outputToken)
Direction GetDirection () const
void QueryContextAttributes (SecPkgContext_ConnectionInfo &connectionInfo) const
CERT_CONTEXT * GetRemoteCertificate () const
Sizes GetTokenSize () const
Sizes GetHeaderSize () const
Sizes GetMaximumInboundMessageSize () const
Sizes GetMaximumOutboundMessageSize () const
Sizes GetTrailerSize () const
bool PeerRequestsRenegotiate ()
virtual void Renegotiate (CToken &outputToken)=0

Static Public Member Functions

GetProtocolAsString (DWORD protocol)
GetAlgorithmAsString (DWORD protocol)
GetAttributesAsString (DWORD attributes)

Protected Member Functions

 CContext (CCountedCredentialsHandle &credentials, Direction direction, ULONG requiredAttributes, ULONG tokenSize, bool networkByteOrder, DWORD maxRecordSize)
CtxtHandleGetContext () const
void CompleteTokenIfRequired (SECURITY_STATUS status, SecBufferDesc *pOutputToken)
void IsContextComplete (SECURITY_STATUS status)
CredHandleGetCredentials () const
bool IsNewContextRequired () const
void ResetContext ()
void CreateNewContext ()
void RestartContext ()
virtual void PeerRequiresRenegotiate ()=0
void PeerRejectsRenegotiation ()
ULONG GetByteOrderFlag () const
void SetLastStatus (SECURITY_STATUS lastStatus)

Protected Attributes

CSmartCredentialsHandle m_credentials
ULONG m_requiredAttributes
ULONG m_achievedAttributes
TimeStamp m_expiry

Member Typedef Documentation

typedef unsigned long Sizes

Member Enumeration Documentation



enum Direction


Constructor & Destructor Documentation

CContext ( const CContext rhs  ) 

virtual ~CContext (  )  [virtual]

CContext ( CCountedCredentialsHandle credentials,
Direction  direction,
ULONG  requiredAttributes,
ULONG  tokenSize,
bool  networkByteOrder,
DWORD  maxRecordSize 
) [protected]

Member Function Documentation

_tstring GetProtocolAsString ( DWORD  protocol  )  [static]

_tstring GetAlgorithmAsString ( DWORD  protocol  )  [static]

_tstring GetAttributesAsString ( DWORD  attributes  )  [static]

virtual CContext* Copy (  )  const [pure virtual]

Implemented in CClientContext, and CServerContext.

CContext & operator= ( const CContext rhs  ) 

bool IsComplete (  )  const

bool CanSend (  )  const

ULONG GetAttributes (  )  const

SECURITY_STATUS GetLastStatus (  )  const

bool RequirePeerVerification (  )  const

virtual JetByteTools::Core::_tstring GetTargetName (  )  const [pure virtual]

Implemented in CClientContext, and CServerContext.

virtual void StartHandshake ( CToken outputToken  )  [pure virtual]

Implemented in CClientContext, and CServerContext.

virtual HandshakeResults ContinueHandshake ( const CSecurityBuffer input,
CToken outputToken,
CSecurityBuffer extraData 
) [pure virtual]

Implemented in CClientContext, and CServerContext.

void AllowRenegotiate ( bool  allow  ) 

bool RequestRenegotiate ( ClientAuthenticationRequirements  requirements,
CToken outputToken 
) [virtual]

bool Renegotiating (  ) 

void EncryptData ( CSecurityBuffer header,
CSecurityBuffer data,
CSecurityBuffer trailer 

CContext::DecryptResults DecryptData ( const CSecurityBuffer dataIn,
CSecurityBuffer dataOut,
unsigned long &  dataUsed 

void ShutdownConnection ( CToken outputToken  ) 

void SendAlert ( DWORD  alertType,
DWORD  alertNumber,
CToken outputToken 

void SessionControl ( DWORD  sessionFlags,
CToken outputToken 

CContext::Direction GetDirection (  )  const

void QueryContextAttributes ( SecPkgContext_ConnectionInfo &  connectionInfo  )  const

CERT_CONTEXT * GetRemoteCertificate (  )  const

CContext::Sizes GetTokenSize (  )  const

CContext::Sizes GetHeaderSize (  )  const

CContext::Sizes GetMaximumInboundMessageSize (  )  const

CContext::Sizes GetMaximumOutboundMessageSize (  )  const

CContext::Sizes GetTrailerSize (  )  const

bool PeerRequestsRenegotiate (  ) 

virtual void Renegotiate ( CToken outputToken  )  [pure virtual]

Implemented in CClientContext, and CServerContext.

CtxtHandle & GetContext (  )  const [protected]

void CompleteTokenIfRequired ( SECURITY_STATUS  status,
SecBufferDesc pOutputToken 
) [protected]

void IsContextComplete ( SECURITY_STATUS  status  )  [protected]

CredHandle * GetCredentials (  )  const [protected]

bool IsNewContextRequired (  )  const [protected]

void ResetContext (  )  [protected]

void CreateNewContext (  )  [protected]

void RestartContext (  )  [protected]

virtual void PeerRequiresRenegotiate (  )  [protected, pure virtual]

Implemented in CClientContext, and CServerContext.

void PeerRejectsRenegotiation (  )  [protected]

ULONG GetByteOrderFlag (  )  const [protected]

void SetLastStatus ( SECURITY_STATUS  lastStatus  )  [protected]

Member Data Documentation

TimeStamp m_expiry [protected]

Generated on Sun Sep 12 19:10:56 2021 for The Server Framework - v7.4 by doxygen 1.5.3