diff options
author | Steve Holme <steve_holme@hotmail.com> | 2016-04-02 06:15:29 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2016-04-02 06:15:29 +0100 |
commit | ced0cbb5b72bab6ad1a8393a22e6443cdbf611f1 (patch) | |
tree | 9865dfafcc21746b65eccd2595ba564765bcf0b9 /lib/vauth/krb5_gssapi.c | |
parent | 4edcfc6bf07f0703b8cbccf823725e6e7356aaba (diff) |
krb5: Moved host from Curl_auth_create_gssapi_user_message() to be argument
For consistency with the spnego and oauth2 code moved the setting of
the host name outside of the Curl_auth_create_gssapi_user_messag()
function.
This will allow us to more easily override it in the future.
Diffstat (limited to 'lib/vauth/krb5_gssapi.c')
-rw-r--r-- | lib/vauth/krb5_gssapi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/vauth/krb5_gssapi.c b/lib/vauth/krb5_gssapi.c index 87accd13e..56cfc3621 100644 --- a/lib/vauth/krb5_gssapi.c +++ b/lib/vauth/krb5_gssapi.c @@ -53,6 +53,7 @@ * userp [in] - The user name. * passdwp [in] - The user's password. * service [in] - The service type such as www, smtp, pop or imap. + * host [in[ - The host name. * mutual_auth [in] - Flag specifing whether or not mutual authentication * is enabled. * chlg64 [in] - Pointer to the optional base64 encoded challenge @@ -68,6 +69,7 @@ CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data, const char *userp, const char *passwdp, const char *service, + const char *host, const bool mutual_auth, const char *chlg64, struct kerberos5data *krb5, @@ -88,8 +90,7 @@ CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data, if(krb5->context == GSS_C_NO_CONTEXT) { /* Generate our SPN */ - char *spn = Curl_auth_build_gssapi_spn(service, - data->easy_conn->host.name); + char *spn = Curl_auth_build_gssapi_spn(service, host); if(!spn) return CURLE_OUT_OF_MEMORY; |