/* The last #include file should be: */
#include "memdebug.h"
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
extern void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5);
#endif
*/
void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused)
{
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
/* Cleanup the gssapi structure */
if(authused == SASL_MECH_GSSAPI) {
Curl_sasl_gssapi_cleanup(&conn->krb5);
struct connectdata;
struct ntlmdata;
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
struct kerberos5data;
#endif
#endif /* USE_NTLM */
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
/* This is used to generate a base64 encoded GSSAPI (Kerberos V5) user token
message */
CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
struct kerberos5data *krb5,
char **outptr,
size_t *outlen);
-#endif
+#endif /* USE_KRB5 */
/* This is used to generate a base64 encoded XOAUTH2 authentication message
containing the user name and bearer token */
/* The last #include file should be: */
#include "memdebug.h"
+#if defined(USE_KRB5)
void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5);
+#endif
/*
* Curl_sasl_build_spn()
return result;
}
-
#endif /* !CURL_DISABLE_CRYPTO_AUTH */
+#if defined(USE_KRB5)
/*
* Curl_sasl_create_gssapi_user_message()
*
/* Reset any variables */
krb5->token_max = 0;
}
+#endif /* USE_KRB5 */
#endif /* USE_WINDOWS_SSPI */
#define USE_SSL /* SSL support has been enabled */
#endif
+/* Single point where USE_SPNEGO definition might be defined */
#if !defined(CURL_DISABLE_CRYPTO_AUTH) && \
(defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI))
#define USE_SPNEGO
#endif
-/* Single point where USE_NTLM definition might be done */
+/* Single point where USE_KRB5 definition might be defined */
+#if !defined(CURL_DISABLE_CRYPTO_AUTH) && defined(USE_WINDOWS_SSPI)
+#define USE_KRB5
+#endif
+
+/* Single point where USE_NTLM definition might be defined */
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM) && \
!defined(CURL_DISABLE_CRYPTO_AUTH)
#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || \
}
#endif
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
/* For AUTHENTICATE GSSAPI (without initial response) responses */
static CURLcode imap_state_auth_gssapi_resp(struct connectdata *conn,
int imapcode,
break;
#endif
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
case IMAP_AUTHENTICATE_GSSAPI:
result = imap_state_auth_gssapi_resp(conn, imapcode, imapc->state);
break;
/* Calculate the supported authentication mechanism, by decreasing order of
security, as well as the initial response where appropriate */
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
if((imapc->authmechs & SASL_MECH_GSSAPI) &&
(imapc->prefmech & SASL_MECH_GSSAPI)) {
imapc->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */
}
#endif
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
/* For AUTH GSSAPI (without initial response) responses */
static CURLcode pop3_state_auth_gssapi_resp(struct connectdata *conn,
int pop3code,
break;
#endif
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
case POP3_AUTH_GSSAPI:
result = pop3_state_auth_gssapi_resp(conn, pop3code, pop3c->state);
break;
/* Calculate the supported authentication mechanism, by decreasing order of
security, as well as the initial response where appropriate */
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
if((pop3c->authmechs & SASL_MECH_GSSAPI) &&
(pop3c->prefmech & SASL_MECH_GSSAPI)) {
pop3c->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */
}
#endif
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
/* For AUTH GSSAPI (without initial response) responses */
static CURLcode smtp_state_auth_gssapi_resp(struct connectdata *conn,
int smtpcode,
break;
#endif
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
case SMTP_AUTH_GSSAPI:
result = smtp_state_auth_gssapi_resp(conn, smtpcode, smtpc->state);
break;
/* Calculate the supported authentication mechanism, by decreasing order of
security, as well as the initial response where appropriate */
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
if((smtpc->authmechs & SASL_MECH_GSSAPI) &&
(smtpc->prefmech & SASL_MECH_GSSAPI)) {
smtpc->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */
#endif
/* Struct used for GSSAPI (Kerberos V5) authentication */
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
struct kerberos5data {
CredHandle *credentials;
CtxtHandle *context;
struct sockaddr_in local_addr;
#endif
-#if defined(USE_WINDOWS_SSPI) /* Consider moving some of the above GSS-API */
+#if defined(USE_KRB5) /* Consider moving some of the above GSS-API */
struct kerberos5data krb5; /* variables into the structure definition, */
#endif /* however, some of them are ftp specific. */