Package pyGlobus :: Module security :: Class GSSContext
[show private | hide private]
[frames | no frames]

Class GSSContext


A class for the underlying gss_ctx_id_t object.
Method Summary
  __init__(self, handle, free)
Constructs an instance.
  __del__(self)
Destroys an instance.
  accept_context(self, acceptor_cred, token_string)
Return major and minor status error codes from the GSSAPI.
  get_handle(self)
  init_context(self, init_cred, target_name, input_token)
Tries to establish a secuirty context with a server
  inquire(self)
Obtain information about the context.

Method Details

__init__(self, handle=None, free=1)
(Constructor)

Constructs an instance.

Each instance wraps a gss_ctx_id_t object. Defaults to a GSS_C_NO_CONTEXT
Parameters:
handle - An optional argument that, if present, should contain a SWIG'ized pointer to a gss_ctx_id_t object.
free - Should the underlying gss_ctx_id_t object be freed when an instance is destroyed.

__del__(self)
(Destructor)

Destroys an instance.

Deletes the underlying gss_ctx_id_t object, and free's the memory if the instance owns the underlying handle.

accept_context(self, acceptor_cred, token_string)

Parameters:
acceptor_cred - is a GSSCred object which contains the credential that the acceptor will use to authenticate itself
token_string - is a token received from the corresponding init_sec call
Returns:
major and minor status error codes from the GSSAPI. A string of tokens which represent credentials from the client who is initiating the context.
Raises:
GSSContextException - A GSSContextException is raised if an error occurs in the underlying gss-api call.

init_context(self, init_cred, target_name, input_token)

Tries to establish a secuirty context with a server
Parameters:
init_cred - is a GSSCred object which contains the client's credential handle
target_name - is a string
input_token - is a GSSBuffer object
Returns:
major and minor status error codes from the GSSAPI. A string of tokens which represent credentials from the client who is initiating the context.
Raises:
GSSContextException - A GSSContextException is raised if an error occurs in the underlying gss-api call.

inquire(self)

Obtain information about the context.
Returns:
A 7-tuple containing: A GSSName object containing the initiators name. A GSSName object with the acceptors name. An int containing the number of seconds the context will remain valid for. A string containing a SWIG'ized pointer to a static gss_OID struct containing the mechanism type. An int containing the context flags. A bool indicating if the connection was initiated locally. A bool indicating if the connection is currently open.
Raises:
GSSContextException - A GSSContextException is raised if an error occurs in the underlying gss-api call.

Generated by Epydoc 2.0 on Mon Oct 13 13:47:19 2003 http://epydoc.sf.net