static SECURITY_STATUS SEC_ENTRY kerberos_DeleteSecurityContext(PCtxtHandle phContext)
{
#ifdef WITH_GSSAPI
	KRB_CONTEXT* context;
	context = (KRB_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext);

	if (!context)
		return SEC_E_INVALID_HANDLE;

	krb5_k_free_key(context->ctx, context->session_key);
	krb5_k_free_key(context->ctx, context->initiator_key);
	krb5_k_free_key(context->ctx, context->acceptor_key);

	if (context->auth_ctx)
		krb5_auth_con_free(context->ctx, context->auth_ctx);

	krb5_free_context(context->ctx);

	return SEC_E_OK;
#else
	return SEC_E_UNSUPPORTED_FUNCTION;
#endif
}
static SECURITY_STATUS SEC_ENTRY kerberos_DeleteSecurityContext(PCtxtHandle phContext)
{
#ifdef WITH_GSSAPI
	KRB_CONTEXT* context;
	context = (KRB_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext);

	if (!context)
		return SEC_E_INVALID_HANDLE;

	krb5_k_free_key(context->ctx, context->session_key);
	krb5_k_free_key(context->ctx, context->initiator_key);
	krb5_k_free_key(context->ctx, context->acceptor_key);

	if (context->auth_ctx)
		krb5_auth_con_free(context->ctx, context->auth_ctx);

	krb5_free_context(context->ctx);

	return SEC_E_OK;
#else
	return SEC_E_UNSUPPORTED_FUNCTION;
#endif
}