gssapi: credential store extensions (#451)
Implement the GSS-API credential store API extensions defined by MIT here: https://k5wiki.kerberos.org/wiki/Projects/Credential_Store_extensions Note: we kill off gss_acquire_cred_ext() here. This was never a public API, although mechanisms could have implemented it and I briefly used it in my BrowserID prototype mechanism. gss_acquire_cred_ext_from() occupies the place in the dispatch table where gss_acquire_cred_ext() used to, but this structure was never visible outside Heimdal (i.e. it is only used by internal mechanisms); (Mechanisms that need to accept arbitrary key/value dictionaries from applications should now implement gss_acquire_cred_from().)
This commit is contained in:

committed by
Nico Williams

parent
a7d42cdf6b
commit
e0bb9c10ca
@@ -34,14 +34,15 @@
|
||||
#include "ntlm.h"
|
||||
|
||||
OM_uint32 GSSAPI_CALLCONV
|
||||
_gss_ntlm_acquire_cred(OM_uint32 *min_stat,
|
||||
gss_const_name_t desired_name,
|
||||
OM_uint32 time_req,
|
||||
const gss_OID_set desired_mechs,
|
||||
gss_cred_usage_t cred_usage,
|
||||
gss_cred_id_t *output_cred_handle,
|
||||
gss_OID_set *actual_mechs,
|
||||
OM_uint32 *time_rec)
|
||||
_gss_ntlm_acquire_cred_from(OM_uint32 *min_stat,
|
||||
gss_const_name_t desired_name,
|
||||
OM_uint32 time_req,
|
||||
const gss_OID_set desired_mechs,
|
||||
gss_cred_usage_t cred_usage,
|
||||
gss_const_key_value_set_t cred_store,
|
||||
gss_cred_id_t *output_cred_handle,
|
||||
gss_OID_set *actual_mechs,
|
||||
OM_uint32 *time_rec)
|
||||
{
|
||||
ntlm_name name = (ntlm_name) desired_name;
|
||||
const char *domain = NULL;
|
||||
|
@@ -43,10 +43,10 @@ _gss_ntlm_duplicate_cred(OM_uint32 *minor_status,
|
||||
OM_uint32 junk;
|
||||
|
||||
if (input_cred_handle == GSS_C_NO_CREDENTIAL)
|
||||
return _gss_ntlm_acquire_cred(minor_status, GSS_C_NO_NAME,
|
||||
GSS_C_INDEFINITE, GSS_C_NO_OID_SET,
|
||||
GSS_C_BOTH, output_cred_handle, NULL,
|
||||
NULL);
|
||||
return _gss_ntlm_acquire_cred_from(minor_status, GSS_C_NO_NAME,
|
||||
GSS_C_INDEFINITE, GSS_C_NO_OID_SET,
|
||||
GSS_C_BOTH, GSS_C_NO_CRED_STORE,
|
||||
output_cred_handle, NULL, NULL);
|
||||
|
||||
*output_cred_handle = GSS_C_NO_CREDENTIAL;
|
||||
|
||||
|
@@ -65,7 +65,7 @@ static gssapi_mech_interface_desc ntlm_mech = {
|
||||
"ntlm",
|
||||
{10, rk_UNCONST("\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a") },
|
||||
0,
|
||||
_gss_ntlm_acquire_cred,
|
||||
NULL,
|
||||
_gss_ntlm_release_cred,
|
||||
_gss_ntlm_init_sec_context,
|
||||
_gss_ntlm_accept_sec_context,
|
||||
@@ -105,7 +105,7 @@ static gssapi_mech_interface_desc ntlm_mech = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
_gss_ntlm_acquire_cred_from,
|
||||
_gss_ntlm_iter_creds_f,
|
||||
_gss_ntlm_destroy_cred,
|
||||
NULL,
|
||||
@@ -123,6 +123,8 @@ static gssapi_mech_interface_desc ntlm_mech = {
|
||||
NULL, /* gm_delete_name_attribute */
|
||||
NULL, /* gm_export_name_composite */
|
||||
NULL, /* gm_duplicate_cred */
|
||||
NULL, /* gm_add_cred_from */
|
||||
NULL, /* gm_store_cred_into */
|
||||
NULL, /* gm_compat */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user