*cred_handle = (gss_cred_id_t)spcred;
}
- if (ret == GSS_S_COMPLETE && spcred == NULL) {
- /*
- * If the mechanism allocated a new credential handle, then
- * we need to wrap it up in an SPNEGO credential handle.
- */
-
- spcred = malloc(sizeof(spnego_gss_cred_id_rec));
- if (spcred == NULL) {
- gss_release_cred(&tmp_minor_status, &mcred);
- *minor_status = ENOMEM;
- return (GSS_S_FAILURE);
- }
- spcred->mcred = mcred;
- spcred->neg_mechs = GSS_C_NULL_OID_SET;
- *cred_handle = (gss_cred_id_t)spcred;
- }
-
return (ret);
}