# test default (i.e., krb5) mechanism with GSS_C_DCE_STYLE
tgs_test(realm, ['-dce'])
+ mark('AP')
+ ccache_save(realm)
+ tgs_test(realm, ['-krb5'])
+ tgs_test(realm, ['-spnego'])
+ tgs_test(realm, ['-iakerb'], ['-iakerb'])
+ tgs_test(realm, ['-dce'])
+
mark('pw')
pw_test(realm, ['-krb5'])
pw_test(realm, ['-spnego'])
OM_uint32 major_status = GSS_S_FAILURE;
OM_uint32 code;
iakerb_ctx_id_t ctx;
- int initialContextToken = (*context_handle == GSS_C_NO_CONTEXT);
+ krb5_boolean first_token = (*context_handle == GSS_C_NO_CONTEXT);
- if (initialContextToken) {
+ if (first_token) {
code = iakerb_alloc_context(&ctx, 0);
if (code != 0)
goto cleanup;
major_status = GSS_S_DEFECTIVE_TOKEN;
if (code != 0)
goto cleanup;
- if (initialContextToken) {
- *context_handle = (gss_ctx_id_t)ctx;
- ctx = NULL;
- }
if (src_name != NULL)
*src_name = GSS_C_NO_NAME;
if (ret_flags != NULL)
*mech_type = gss_mech_iakerb;
cleanup:
- if (initialContextToken && GSS_ERROR(major_status)) {
- iakerb_release_context(ctx);
- *context_handle = GSS_C_NO_CONTEXT;
+ if (first_token) {
+ if (GSS_ERROR(major_status)) {
+ iakerb_release_context(ctx);
+ *context_handle = GSS_C_NO_CONTEXT;
+ } else {
+ *context_handle = (gss_ctx_id_t)ctx;
+ }
}
*minor_status = code;