Lines Matching refs:gps
189 struct gssapi_ph1_state *gps;
195 gps = racoon_calloc(1, sizeof (struct gssapi_ph1_state));
196 if (gps == NULL) {
200 gps->gss_context = GSS_C_NO_CONTEXT;
201 gps->gss_cred = GSS_C_NO_CREDENTIAL;
203 gssapi_set_state(iph1, gps);
257 GSS_C_NO_OID_SET, GSS_C_BOTH, &gps->gss_cred, NULL, NULL);
277 struct gssapi_ph1_state *gps;
286 gps = gssapi_get_state(iph1);
309 rtoken = gps->gsscnt_p == 0 ? dummy : &gps->gss_p[gps->gsscnt_p - 1];
310 itoken = &gps->gss[gps->gsscnt];
312 gps->gss_status = gss_init_sec_context(&min_stat, gps->gss_cred,
313 &gps->gss_context, partner, GSS_C_NO_OID,
319 if (GSS_ERROR(gps->gss_status)) {
331 gps->gss_status);
337 gps->gsscnt++;
348 struct gssapi_ph1_state *gps;
357 gps = gssapi_get_state(iph1);
359 rtoken = &gps->gss_p[gps->gsscnt_p - 1];
360 itoken = &gps->gss[gps->gsscnt];
362 gps->gss_status = gss_accept_sec_context(&min_stat, &gps->gss_context,
363 gps->gss_cred, rtoken, GSS_C_NO_CHANNEL_BINDINGS, &client_name,
366 if (GSS_ERROR(gps->gss_status)) {
392 gps->gsscnt++;
403 struct gssapi_ph1_state *gps;
410 gps = gssapi_get_state(iph1);
412 gsstoken = &gps->gss_p[gps->gsscnt_p];
417 gps->gsscnt_p++;
425 struct gssapi_ph1_state *gps;
429 gps = gssapi_get_state(iph1);
430 if (gps == NULL) {
435 gsstoken = &gps->gss[gps->gsscnt - 1];
446 struct gssapi_ph1_state *gps;
451 gps = gssapi_get_state(iph1);
452 if (gps == NULL) {
458 for (i = len = 0; i < gps->gsscnt; i++)
459 len += gps->gss[i].length;
465 for (i = 0; i < gps->gsscnt; i++) {
466 memcpy(p, gps->gss[i].value, gps->gss[i].length);
467 p += gps->gss[i].length;
473 "%d itokens of length %zu\n", gps->gsscnt, (*tokens)->l);
481 struct gssapi_ph1_state *gps;
486 gps = gssapi_get_state(iph1);
487 if (gps == NULL) {
499 for (i = len = 0; i < gps->gsscnt_p; i++)
500 len += gps->gss_p[i].length;
506 for (i = 0; i < gps->gsscnt_p; i++) {
507 memcpy(p, gps->gss_p[i].value, gps->gss_p[i].length);
508 p += gps->gss_p[i].length;
519 struct gssapi_ph1_state *gps;
525 gps = gssapi_get_state(iph1);
526 if (gps == NULL) {
543 maj_stat = gss_wrap(&min_stat, gps->gss_context, 1, GSS_C_QOP_DEFAULT,
579 struct gssapi_ph1_state *gps;
585 gps = gssapi_get_state(iph1);
586 if (gps == NULL) {
599 maj_stat = gss_unwrap(&min_stat, gps->gss_context, hash_in, hash_out,
624 gps;
626 gps = gssapi_get_state(iph1);
628 gps->gss_flags |= GSSFLAG_ID_SENT;
634 struct gssapi_ph1_state *gps;
636 gps = gssapi_get_state(iph1);
638 return (gps->gss_flags & GSSFLAG_ID_SENT) != 0;
644 struct gssapi_ph1_state *gps;
646 gps = gssapi_get_state(iph1);
648 gps->gss_flags |= GSSFLAG_ID_RCVD;
654 struct gssapi_ph1_state *gps;
656 gps = gssapi_get_state(iph1);
658 return (gps->gss_flags & GSSFLAG_ID_RCVD) != 0;
664 struct gssapi_ph1_state *gps;
667 gps = gssapi_get_state(iph1);
669 if (gps == NULL)
674 if (gps->gss_cred != GSS_C_NO_CREDENTIAL) {
675 maj_stat = gss_release_cred(&min_stat, &gps->gss_cred);
680 racoon_free(gps);