PyCtxtHandle.QueryContextAttributes

QueryContextAttributes(Attribute)

Retrieves info about a security context

Parameters

Attribute : int

SECPKG_ATTR_* constant

Comments

Not all attributes are available for every security package

Attribute Return type


SECPKG_ATTR_ACCESS_TOKENPyHANDLE - returns a handle to the context's access token
SECPKG_ATTR_AUTHORITYPyUnicode - returns the name of the authenticating entity
SECPKG_ATTR_CIPHER_STRENGTHS(int,int) - returns the mininum and maximum cipher strengths allowed
SECPKG_ATTR_CONNECTION_INFOReturns a dictionary of connection info representing a SecPkgContext_ConnectionInfo struct
SECPKG_ATTR_SESSION_KEYstring - returns the session key for the context
SECPKG_ATTR_ISSUER_LIST_EX(int, string) - Returns names of trusted certificate issuers
SECPKG_ATTR_FLAGSint - returns flags negotiated when context was established
SECPKG_ATTR_PACKAGE_INFOdict - returns dictionary containing info for context's security package
SECPKG_ATTR_NEGOTIATION_INFO(int, dict) - returns state of negotiation (SECPKG_NEGOTIATION_COMPLETE, SECPKG_NEGOTIATION_OPTIMISTIC,SECPKG_NEGOTIATION_IN_PROGRESS) and info for negotiated package
SECPKG_ATTR_NAMESPyUnicode - returns the user name for the context
SECPKG_ATTR_SIZESdict containing buffer sizes to be used with the context
SECPKG_ATTR_PASSWORD_EXPIRYPyDateTime - returns time password expires
SECPKG_ATTR_LIFESPAN(PyDateTime,PyDateTime) - returns time period during which context is valid
SECPKG_ATTR_NATIVE_NAMES(PyUnicode ,PyUnicode ) - returns client and server names
SECPKG_ATTR_TARGET_INFORMATIONstring - returns the target for the context
SECPKG_ATTR_STREAM_SIZESdict (see SecPkgContext_StreamSizes) containing message buffer sizes
SECPKG_ATTR_KEY_INFOdict (see SecPkgContext_KeyInfo) containing encryption key parameters
SECPKG_ATTR_DCE_INFOnot supported yet SecPkgContext_DceInfo
SECPKG_ATTR_LOCAL_CERT_CONTEXTnot supported yet PCCERT_CONTEXT
SECPKG_ATTR_REMOTE_CERT_CONTEXTnot supported yet PCCERT_CONTEXT
SECPKG_ATTR_ROOT_STOREnot supported yet HCERTCONTEXT
SECPKG_ATTR_SUPPORTED_ALGSnot supported yet SecPkgCred_SupportedAlgs
SECPKG_ATTR_SUPPORTED_PROTOCOLSnot supported yet SecPkgCred_SupportedProtocols