gss_export_sec_context()--Export Security Context


  Syntax
 #include <krb5.h>

 krb5_error_code gss_export_sec_context (
    OM_uint32 *                         minor_status,
    gss_ctx_id_t *                      context_handle,
    gss_buffer_t                        context_token)
  Service Program Name: QSYS/QKRBGSS

  Default public authority: *USE

  Threadsafe: Yes

The gss_export_sec_context() routine creates a context token for a GSS-API security context. This context token can then be given to another process on the same system. This second process calls gss_import_sec_context() to create a GSS-API security context from the context token. Upon successful completion of gss_export_sec_context(), the security context is no longer available for use by the current process. The security context token created by one implementation of GSS-API cannot be used with a different implementation of GSS-API.


Parameters

minor_status  (Output)
Status code returned from the security mechanism.

context_handle  (Input/Output)
The context handle of the GSS-API security context to be used to create the security context token. The context handle will be set to GSS_C_NO_CONTEXT upon successful completion.

context_token  (Output)
The security context token returned. The storage for the token should be released when it is no longer needed by calling the gss_release_buffer() routine.


Return Value

The return value is one of the following status codes:

GSS_S_COMPLETE
The routine completed successfully.

GSS_S_FAILURE
The routine failed for reasons which are not defined at the GSS level. The minor_status return parameter contains a mechanism-dependent error code describing the reason for the failure.

GSS_S_NO_CONTEXT
The supplied context handle does not refer to a valid context.

GSS_S_CONTEXT_EXPIRED
The supplied context is no longer valid.

GSS_S_UNAVAILABLE
Security context cannot be exported.


Authorities

None.


Error Messages

Message ID Error Message Text
CPE3418 E Possible APAR condition or hardware failure.
CPFA081 E Unable to set return value or error code.


API introduced: V5R2

[ Back to top | Security APIs | APIs by category ]