mirror of
https://github.com/curl/curl.git
synced 2026-07-27 11:07:37 +03:00
gss-api: stub gss_inquire_context for debug builds
The GSS-API debug stub did not implement gss_inquire_context, so the NTLM-detection logic in spnego_gssapi.c could not be exercised without a real Kerberos environment. Add stub_gss_inquire_context that returns the NTLMSSP OID when the stub context is in NTLM mode and the Kerberos OID otherwise. Wrap it behind Curl_gss_inquire_context so the stub is transparently selected when CURL_STUB_GSS_CREDS is set. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
This commit is contained in:
parent
e16ac344de
commit
8f21383178
3 changed files with 66 additions and 4 deletions
|
|
@ -248,9 +248,9 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
|
|||
OM_uint32 inquire_major, inquire_minor;
|
||||
gss_OID mech_type = GSS_C_NO_OID;
|
||||
|
||||
inquire_major = gss_inquire_context(&inquire_minor, nego->context,
|
||||
NULL, NULL, NULL, &mech_type,
|
||||
NULL, NULL, NULL);
|
||||
inquire_major = Curl_gss_inquire_context(&inquire_minor,
|
||||
nego->context,
|
||||
&mech_type);
|
||||
if(!GSS_ERROR(inquire_major) && mech_type &&
|
||||
mech_type->length == ntlmssp_oid.length &&
|
||||
!memcmp(mech_type->elements, ntlmssp_oid.elements,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue