(int, int, PyTime) = InitializeSecurityContext(Credential, Context , TargetName , ContextReq , TargetDataRep , pInput , NewContext , pOutput )

Creates a security context based on credentials created by AcquireCredentialsHandle


Credential : PyCredHandle

A credentials handle as returned by win32security::AcquireCredentialsHandle

Context : PyCtxtHandle

Use None on initial call, then handle returned in NewContext thereafter

TargetName : str/unicode

Target of context, security package specific - Use None with NTLM

ContextReq : int

Combination of ISC_REQ_* flags

TargetDataRep : int


pInput : PySecBufferDesc

Data buffer - use None initially

NewContext : PyCtxtHandle

Uninitialized context handle to receive output

pOutput : PySecBufferDesc

Buffer that receives output data for subsequent calls

Return Value

Return value is a tuple of (return code, attribute flags, expiration time)