Don't use mech default cred when input cred isn't
gss_init_sec_context() with input_cred_handle != GSS_C_NO_CREDENTIAL should NOT proceed if there is no element in the given credential for the requested mechanism.
This commit is contained in:
@@ -184,6 +184,13 @@ gss_init_sec_context(OM_uint32 * minor_status,
|
|||||||
else
|
else
|
||||||
cred_handle = _gss_mech_cred_find(initiator_cred_handle, mech_type);
|
cred_handle = _gss_mech_cred_find(initiator_cred_handle, mech_type);
|
||||||
|
|
||||||
|
if (initiator_cred_handle != GSS_C_NO_CREDENTIAL &&
|
||||||
|
cred_handle == NULL) {
|
||||||
|
if (allocated_ctx)
|
||||||
|
free(ctx);
|
||||||
|
return GSS_S_NO_CRED;
|
||||||
|
}
|
||||||
|
|
||||||
major_status = m->gm_init_sec_context(minor_status,
|
major_status = m->gm_init_sec_context(minor_status,
|
||||||
cred_handle,
|
cred_handle,
|
||||||
&ctx->gc_ctx,
|
&ctx->gc_ctx,
|
||||||
|
Reference in New Issue
Block a user