/*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* SUCH DAMAGE.
*/
+/*
+ * Utility routines for context handles.
+ */
+
#include "gssapiP_eap.h"
OM_uint32
return GSS_S_FAILURE;
}
- ctx->state = EAP_STATE_IDENTITY;
+ ctx->state = GSSEAP_STATE_INITIAL;
/*
* Integrity, confidentiality, sequencing and replay detection are
static void
releaseInitiatorContext(struct gss_eap_initiator_ctx *ctx)
{
- OM_uint32 minor;
-
- gssEapReleaseCred(&minor, &ctx->defaultCred);
eap_peer_sm_deinit(ctx->eap);
}
gssEapKerberosInit(&tmpMinor, &krbContext);
#ifdef GSSEAP_ENABLE_REAUTH
- if (ctx->flags & CTX_FLAG_KRB_REAUTH_GSS) {
+ if (ctx->flags & CTX_FLAG_KRB_REAUTH) {
gssDeleteSecContext(&tmpMinor, &ctx->kerberosCtx, GSS_C_NO_BUFFER);
} else
#endif
krb5_free_keyblock_contents(krbContext, &ctx->rfc3961Key);
gssEapReleaseName(&tmpMinor, &ctx->initiatorName);
gssEapReleaseName(&tmpMinor, &ctx->acceptorName);
- gss_release_oid(&tmpMinor, &ctx->mechanismUsed);
+ gssEapReleaseOid(&tmpMinor, &ctx->mechanismUsed);
sequenceFree(&tmpMinor, &ctx->seqState);
+ gssEapReleaseCred(&tmpMinor, &ctx->defaultCred);
GSSEAP_MUTEX_DESTROY(&ctx->mutex);
gss_ctx_id_t context_handle,
OM_uint32 *time_rec)
{
+ *minor = 0;
+
if (context_handle->expiryTime == 0) {
*time_rec = GSS_C_INDEFINITE;
} else {