Rewrite gss_add_cred() (fix #413)
It turns out gss_add_cred() really needed a complete rewrite. It's much better to first have a gss_duplicate_cred() (which has been needed for other reasons anyways), and use that when the input_cred_handle is not GSS_C_NO_CREDENTIAL and output_cred_handle is not NULL, then mutate that duplicate credential handle (or the input_cred_handle if output_cred_handle is NULL).
This commit is contained in:

committed by
Nico Williams

parent
134b53ead1
commit
e6d1c10808
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2004, PADL Software Pty Ltd.
|
||||
* Copyright (c) 2018 Kungliga Tekniska Högskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -136,15 +138,16 @@ static gssapi_mech_interface_desc spnego_mech = {
|
||||
NULL,
|
||||
spnego_mo,
|
||||
sizeof(spnego_mo) / sizeof(spnego_mo[0]),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL, /* gm_localname */
|
||||
NULL, /* gm_authorize_localname */
|
||||
NULL, /* gm_display_name_ext */
|
||||
NULL, /* gm_inquire_name */
|
||||
NULL, /* gm_get_name_attribute */
|
||||
NULL, /* gm_set_name_attribute */
|
||||
NULL, /* gm_delete_name_attribute */
|
||||
NULL, /* gm_export_name_composite */
|
||||
NULL, /* gm_duplicate_cred */
|
||||
NULL /* gm_compat */
|
||||
};
|
||||
|
||||
gssapi_mech_interface
|
||||
|
Reference in New Issue
Block a user