version 1.160, 2006/08/03 03:34:42 |
version 1.161, 2006/08/18 13:54:54 |
|
|
|
|
/* Check to see if the mechanism is usable before we offer it */ |
/* Check to see if the mechanism is usable before we offer it */ |
while (mech < gss_supported->count && !ok) { |
while (mech < gss_supported->count && !ok) { |
if (gssctxt) |
|
ssh_gssapi_delete_ctx(&gssctxt); |
|
ssh_gssapi_build_ctx(&gssctxt); |
|
ssh_gssapi_set_oid(gssctxt, &gss_supported->elements[mech]); |
|
|
|
/* My DER encoding requires length<128 */ |
/* My DER encoding requires length<128 */ |
if (gss_supported->elements[mech].length < 128 && |
if (gss_supported->elements[mech].length < 128 && |
!GSS_ERROR(ssh_gssapi_import_name(gssctxt, |
ssh_gssapi_check_mechanism(&gssctxt, |
authctxt->host))) { |
&gss_supported->elements[mech], authctxt->host)) { |
ok = 1; /* Mechanism works */ |
ok = 1; /* Mechanism works */ |
} else { |
} else { |
mech++; |
mech++; |
} |
} |
} |
} |
|
|
if (!ok) { |
if (!ok) |
ssh_gssapi_delete_ctx(&gssctxt); |
|
return 0; |
return 0; |
} |
|
|
|
authctxt->methoddata=(void *)gssctxt; |
authctxt->methoddata=(void *)gssctxt; |
|
|