next up previous contents index
Next: The krb5_auth_context Up: Main functions Previous: Main functions   Contents   Index

The krb5_context

The krb5_context is designed to represent the per process state. When the library is made thread-safe, the context will represent the per-thread state. Global parameters which are ``context'' specific are stored in this structure, including default realm, default encryption type, default configuration files and the like. Functions exist to provide full access to the data structures stored in the context and should not be accessed directly by developers.


\begin{funcdecl}{krb5_init_context}{krb5_error_code}{\funcout}
\funcarg{krb5_context *}{context}
\end{funcdecl}

Initializes the context *context for the application. Currently the context contains the encryption types, a pointer to operating specific data and the default realm. In the future, the context may be also contain thread specific data. The data in the context should be freed with krb5_free_context.

Returns system errors.


\begin{funcdecl}{krb5_free_context}{void}{\funcinout}
\funcarg{krb5_context}{context}
\end{funcdecl}

Frees the context returned by krb5_init_context. Internally calls krb5_os_free_context.


\begin{funcdecl}{krb5_set_default_in_tkt_etypes}{krb5_error_code}{\funcinout}
\f...
..._context}{context}
\funcin
\funcarg{const krb5_enctype *}{etypes}
\end{funcdecl}

Sets the desired default encryption type etypes for the context if valid.

Returns ENOMEM, KRB5_PROG_ETYPE_NOSUPP.


\begin{funcdecl}{krb5_get_default_in_tkt_etypes}{krb5_error_code}{\funcinout}
\f...
...krb5_context}{context}
\funcout
\funcarg{krb5_enctype **}{etypes}
\end{funcdecl}

Retrieves the default encryption types from the context and stores them in etypes which should be freed by the caller.

Returns ENOMEM.


next up previous contents index
Next: The krb5_auth_context Up: Main functions Previous: Main functions   Contents   Index
Autobuild 2009-09-05