Lines Matching refs:mechs
62 static char *ssh_gssapi_make_kexalgs_list(gss_OID_set mechs,
72 ssh_gssapi_mech_oids_to_kexnames(const gss_OID_set mechs, char **kexname_list) in ssh_gssapi_mech_oids_to_kexnames() argument
82 if (mechs != GSS_C_NULL_OID_SET || kexname_list == NULL) { in ssh_gssapi_mech_oids_to_kexnames()
94 if (mechs == GSS_C_NULL_OID_SET && kexname_list == NULL) in ssh_gssapi_mech_oids_to_kexnames()
97 if (mechs) { in ssh_gssapi_mech_oids_to_kexnames()
101 (mechs->count + 1)); in ssh_gssapi_mech_oids_to_kexnames()
103 sizeof (ssh_gss_kex_mapping *) * (mechs->count + 1)); in ssh_gssapi_mech_oids_to_kexnames()
105 for (i = 0; i < mechs->count; i++) { in ssh_gssapi_mech_oids_to_kexnames()
106 mech = &mechs->elements[i]; in ssh_gssapi_mech_oids_to_kexnames()
117 ssh_gssapi_dup_oid(&mechs->elements[i]); in ssh_gssapi_mech_oids_to_kexnames()
254 ssh_gssapi_make_kexalgs_list(gss_OID_set mechs, const char *old_kexalgs) in ssh_gssapi_make_kexalgs_list() argument
259 if (mechs == GSS_C_NULL_OID_SET) in ssh_gssapi_make_kexalgs_list()
262 ssh_gssapi_mech_oids_to_kexnames(mechs, &gss_kexalgs); in ssh_gssapi_make_kexalgs_list()
279 ssh_gssapi_modify_kex(Kex *kex, gss_OID_set mechs, char **proposal) in ssh_gssapi_modify_kex() argument
295 if (kex->mechs == GSS_C_NULL_OID_SET && mechs == GSS_C_NULL_OID_SET) in ssh_gssapi_modify_kex()
298 if (kex->mechs == GSS_C_NULL_OID_SET || mechs == GSS_C_NULL_OID_SET) in ssh_gssapi_modify_kex()
302 if (kex->mechs->count == mechs->count) { in ssh_gssapi_modify_kex()
305 for (i = 0; i < mechs->count; i++) { in ssh_gssapi_modify_kex()
307 &kex->mechs->elements[i], mechs, &present); in ssh_gssapi_modify_kex()
310 mechs = GSS_C_NULL_OID_SET; in ssh_gssapi_modify_kex()
317 if (matches == kex->mechs->count) in ssh_gssapi_modify_kex()
341 (void) gss_release_oid_set(&min, &kex->mechs); /* ok if !kex->mechs */ in ssh_gssapi_modify_kex()
344 if (mechs == GSS_C_NULL_OID_SET) in ssh_gssapi_modify_kex()
351 for (i = 0; i < mechs->count; i++) { in ssh_gssapi_modify_kex()
352 maj = gss_add_oid_set_member(&min, &mechs->elements[i], in ssh_gssapi_modify_kex()
362 proposal[PROPOSAL_KEX_ALGS] = ssh_gssapi_make_kexalgs_list(mechs, in ssh_gssapi_modify_kex()
365 kex->mechs = dup_mechs; /* remember what we offer now */ in ssh_gssapi_modify_kex()
386 if (kex->mechs != GSS_C_NULL_OID_SET) { in ssh_gssapi_modify_kex()