]> granicus.if.org Git - curl/commitdiff
vauth: Refactored function names after move to new vauth directory
authorSteve Holme <steve_holme@hotmail.com>
Sun, 13 Mar 2016 11:28:42 +0000 (11:28 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Fri, 25 Mar 2016 17:40:12 +0000 (17:40 +0000)
Renamed all the SASL functions that moved to the new vauth directory to
include the correct module name.

17 files changed:
lib/curl_ntlm.c
lib/curl_sasl.c
lib/http_digest.c
lib/http_negotiate.c
lib/http_negotiate_sspi.c
lib/vauth/cleartext.c
lib/vauth/cram.c
lib/vauth/digest.c
lib/vauth/digest.h
lib/vauth/digest_sspi.c
lib/vauth/krb5_gssapi.c
lib/vauth/krb5_sspi.c
lib/vauth/ntlm.c
lib/vauth/ntlm_sspi.c
lib/vauth/oauth2.c
lib/vauth/vauth.c
lib/vauth/vauth.h

index f3fac5babfe8b2e10e885bae333f2c4f8a422f37..dbf567b4ef3a214fa405de04aebd1e25222651ba 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -76,7 +76,7 @@ CURLcode Curl_input_ntlm(struct connectdata *conn,
       header++;
 
     if(*header) {
-      result = Curl_sasl_decode_ntlm_type2_message(conn->data, header, ntlm);
+      result = Curl_auth_decode_ntlm_type2_message(conn->data, header, ntlm);
       if(result)
         return result;
 
@@ -170,7 +170,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
   case NTLMSTATE_TYPE1:
   default: /* for the weird cases we (re)start here */
     /* Create a type-1 message */
-    result = Curl_sasl_create_ntlm_type1_message(userp, passwdp, ntlm, &base64,
+    result = Curl_auth_create_ntlm_type1_message(userp, passwdp, ntlm, &base64,
                                                  &len);
     if(result)
       return result;
@@ -190,7 +190,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
 
   case NTLMSTATE_TYPE2:
     /* We already received the type-2 message, create a type-3 message */
-    result = Curl_sasl_create_ntlm_type3_message(conn->data, userp, passwdp,
+    result = Curl_auth_create_ntlm_type3_message(conn->data, userp, passwdp,
                                                  ntlm, &base64, &len);
     if(result)
       return result;
@@ -227,8 +227,8 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
 
 void Curl_http_ntlm_cleanup(struct connectdata *conn)
 {
-  Curl_sasl_ntlm_cleanup(&conn->ntlm);
-  Curl_sasl_ntlm_cleanup(&conn->proxyntlm);
+  Curl_auth_ntlm_cleanup(&conn->ntlm);
+  Curl_auth_ntlm_cleanup(&conn->proxyntlm);
 
 #if defined(NTLM_WB_ENABLED)
   Curl_ntlm_wb_cleanup(conn);
index e92eda5b5d5f0900d40f0865983123efd7c05a03..32c8534e7ce25fa1ce223799589ee6a9771af767 100644 (file)
@@ -86,14 +86,14 @@ void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused)
 #if defined(USE_KERBEROS5)
   /* Cleanup the gssapi structure */
   if(authused == SASL_MECH_GSSAPI) {
-    Curl_sasl_gssapi_cleanup(&conn->krb5);
+    Curl_auth_gssapi_cleanup(&conn->krb5);
   }
 #endif
 
 #if defined(USE_NTLM)
   /* Cleanup the NTLM structure */
   if(authused == SASL_MECH_NTLM) {
-    Curl_sasl_ntlm_cleanup(&conn->ntlm);
+    Curl_auth_ntlm_cleanup(&conn->ntlm);
   }
 #endif
 
@@ -279,7 +279,8 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
     sasl->authused = SASL_MECH_EXTERNAL;
 
     if(force_ir || data->set.sasl_ir)
-      result = sasl_create_external_message(data, conn->user, &resp, &len);
+      result = Curl_auth_create_external_message(data, conn->user, &resp,
+                                                 &len);
   }
   else if(conn->bits.user_passwd) {
 #if defined(USE_KERBEROS5)
@@ -291,7 +292,7 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
       sasl->authused = SASL_MECH_GSSAPI;
 
       if(force_ir || data->set.sasl_ir)
-        result = Curl_sasl_create_gssapi_user_message(data, conn->user,
+        result = Curl_auth_create_gssapi_user_message(data, conn->user,
                                                       conn->passwd,
                                                       sasl->params->service,
                                                       sasl->mutual_auth,
@@ -321,7 +322,7 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
       sasl->authused = SASL_MECH_NTLM;
 
       if(force_ir || data->set.sasl_ir)
-        result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+        result = Curl_auth_create_ntlm_type1_message(conn->user, conn->passwd,
                                                      &conn->ntlm, &resp, &len);
       }
     else
@@ -333,11 +334,11 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
       sasl->authused = SASL_MECH_OAUTHBEARER;
 
       if(force_ir || data->set.sasl_ir)
-        result = sasl_create_oauth_bearer_message(data, conn->user,
-                                                  conn->host.name,
-                                                  conn->port,
-                                                  conn->oauth_bearer,
-                                                  &resp, &len);
+        result = Curl_auth_create_oauth_bearer_message(data, conn->user,
+                                                       conn->host.name,
+                                                       conn->port,
+                                                       conn->oauth_bearer,
+                                                       &resp, &len);
     }
     else if((enabledmechs & SASL_MECH_XOAUTH2) && conn->oauth_bearer) {
       mech = SASL_MECH_STRING_XOAUTH2;
@@ -345,10 +346,10 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
       sasl->authused = SASL_MECH_XOAUTH2;
 
       if(force_ir || data->set.sasl_ir)
-        result = sasl_create_oauth_bearer_message(data, conn->user,
-                                                  NULL, 0,
-                                                  conn->oauth_bearer,
-                                                  &resp, &len);
+        result = Curl_auth_create_oauth_bearer_message(data, conn->user,
+                                                       NULL, 0,
+                                                       conn->oauth_bearer,
+                                                       &resp, &len);
     }
     else if(enabledmechs & SASL_MECH_LOGIN) {
       mech = SASL_MECH_STRING_LOGIN;
@@ -357,7 +358,7 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
       sasl->authused = SASL_MECH_LOGIN;
 
       if(force_ir || data->set.sasl_ir)
-        result = sasl_create_login_message(data, conn->user, &resp, &len);
+        result = Curl_auth_create_login_message(data, conn->user, &resp, &len);
     }
     else if(enabledmechs & SASL_MECH_PLAIN) {
       mech = SASL_MECH_STRING_PLAIN;
@@ -365,8 +366,8 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
       sasl->authused = SASL_MECH_PLAIN;
 
       if(force_ir || data->set.sasl_ir)
-        result = sasl_create_plain_message(data, conn->user, conn->passwd,
-                                           &resp, &len);
+        result = Curl_auth_create_plain_message(data, conn->user, conn->passwd,
+                                                &resp, &len);
     }
   }
 
@@ -432,32 +433,33 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
     *progress = SASL_DONE;
     return result;
   case SASL_PLAIN:
-    result = sasl_create_plain_message(data, conn->user, conn->passwd, &resp,
-                                       &len);
+    result = Curl_auth_create_plain_message(data, conn->user, conn->passwd,
+                                            &resp,
+                                            &len);
     break;
   case SASL_LOGIN:
-    result = sasl_create_login_message(data, conn->user, &resp, &len);
+    result = Curl_auth_create_login_message(data, conn->user, &resp, &len);
     newstate = SASL_LOGIN_PASSWD;
     break;
   case SASL_LOGIN_PASSWD:
-    result = sasl_create_login_message(data, conn->passwd, &resp, &len);
+    result = Curl_auth_create_login_message(data, conn->passwd, &resp, &len);
     break;
   case SASL_EXTERNAL:
-    result = sasl_create_external_message(data, conn->user, &resp, &len);
+    result = Curl_auth_create_external_message(data, conn->user, &resp, &len);
     break;
 
 #ifndef CURL_DISABLE_CRYPTO_AUTH
   case SASL_CRAMMD5:
     sasl->params->getmessage(data->state.buffer, &serverdata);
-    result = sasl_decode_cram_md5_message(serverdata, &chlg, &chlglen);
+    result = Curl_auth_decode_cram_md5_message(serverdata, &chlg, &chlglen);
     if(!result)
-      result = sasl_create_cram_md5_message(data, chlg, conn->user,
-                                            conn->passwd, &resp, &len);
+      result = Curl_auth_create_cram_md5_message(data, chlg, conn->user,
+                                                 conn->passwd, &resp, &len);
     free(chlg);
     break;
   case SASL_DIGESTMD5:
     sasl->params->getmessage(data->state.buffer, &serverdata);
-    result = Curl_sasl_create_digest_md5_message(data, serverdata,
+    result = Curl_auth_create_digest_md5_message(data, serverdata,
                                                  conn->user, conn->passwd,
                                                  sasl->params->service,
                                                  &resp, &len);
@@ -473,17 +475,17 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
 #ifdef USE_NTLM
   case SASL_NTLM:
     /* Create the type-1 message */
-    result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+    result = Curl_auth_create_ntlm_type1_message(conn->user, conn->passwd,
                                                  &conn->ntlm, &resp, &len);
     newstate = SASL_NTLM_TYPE2MSG;
     break;
   case SASL_NTLM_TYPE2MSG:
     /* Decode the type-2 message */
     sasl->params->getmessage(data->state.buffer, &serverdata);
-    result = Curl_sasl_decode_ntlm_type2_message(data, serverdata,
+    result = Curl_auth_decode_ntlm_type2_message(data, serverdata,
                                                  &conn->ntlm);
     if(!result)
-      result = Curl_sasl_create_ntlm_type3_message(data, conn->user,
+      result = Curl_auth_create_ntlm_type3_message(data, conn->user,
                                                    conn->passwd, &conn->ntlm,
                                                    &resp, &len);
     break;
@@ -491,7 +493,7 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
 
 #if defined(USE_KERBEROS5)
   case SASL_GSSAPI:
-    result = Curl_sasl_create_gssapi_user_message(data, conn->user,
+    result = Curl_auth_create_gssapi_user_message(data, conn->user,
                                                   conn->passwd,
                                                   sasl->params->service,
                                                   sasl->mutual_auth, NULL,
@@ -504,7 +506,7 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
     if(sasl->mutual_auth) {
       /* Decode the user token challenge and create the optional response
          message */
-      result = Curl_sasl_create_gssapi_user_message(data, NULL, NULL, NULL,
+      result = Curl_auth_create_gssapi_user_message(data, NULL, NULL, NULL,
                                                     sasl->mutual_auth,
                                                     serverdata, &conn->krb5,
                                                     &resp, &len);
@@ -512,14 +514,14 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
     }
     else
       /* Decode the security challenge and create the response message */
-      result = Curl_sasl_create_gssapi_security_message(data, serverdata,
+      result = Curl_auth_create_gssapi_security_message(data, serverdata,
                                                         &conn->krb5,
                                                         &resp, &len);
     break;
   case SASL_GSSAPI_NO_DATA:
     sasl->params->getmessage(data->state.buffer, &serverdata);
     /* Decode the security challenge and create the response message */
-    result = Curl_sasl_create_gssapi_security_message(data, serverdata,
+    result = Curl_auth_create_gssapi_security_message(data, serverdata,
                                                       &conn->krb5,
                                                       &resp, &len);
     break;
@@ -528,20 +530,20 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
   case SASL_OAUTH2:
     /* Create the authorisation message */
     if(sasl->authused == SASL_MECH_OAUTHBEARER) {
-      result = sasl_create_oauth_bearer_message(data, conn->user,
-                                                conn->host.name,
-                                                conn->port,
-                                                conn->oauth_bearer,
-                                                &resp, &len);
+      result = Curl_auth_create_oauth_bearer_message(data, conn->user,
+                                                     conn->host.name,
+                                                     conn->port,
+                                                     conn->oauth_bearer,
+                                                     &resp, &len);
 
       /* Failures maybe sent by the server as continuations for OAUTHBEARER */
       newstate = SASL_OAUTH2_RESP;
     }
     else
-      result = sasl_create_oauth_bearer_message(data, conn->user,
-                                                NULL, 0,
-                                                conn->oauth_bearer,
-                                                &resp, &len);
+      result = Curl_auth_create_oauth_bearer_message(data, conn->user,
+                                                     NULL, 0,
+                                                     conn->oauth_bearer,
+                                                     &resp, &len);
     break;
 
   case SASL_OAUTH2_RESP:
index de7a92384609f10e316aacf9fbda1bec2aba3816..782a7a2407acbea7fabbc25790275cfacc6585b8 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -65,7 +65,7 @@ CURLcode Curl_input_digest(struct connectdata *conn,
   while(*header && ISSPACE(*header))
     header++;
 
-  return Curl_sasl_decode_digest_http_message(header, digest);
+  return Curl_auth_decode_digest_http_message(header, digest);
 }
 
 CURLcode Curl_output_digest(struct connectdata *conn,
@@ -152,7 +152,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
   if(!path)
     return CURLE_OUT_OF_MEMORY;
 
-  result = Curl_sasl_create_digest_http_message(data, userp, passwdp, request,
+  result = Curl_auth_create_digest_http_message(data, userp, passwdp, request,
                                                 path, digest, &response, &len);
   free(path);
   if(result)
@@ -172,8 +172,8 @@ CURLcode Curl_output_digest(struct connectdata *conn,
 
 void Curl_digest_cleanup(struct SessionHandle *data)
 {
-  Curl_sasl_digest_cleanup(&data->state.digest);
-  Curl_sasl_digest_cleanup(&data->state.proxydigest);
+  Curl_auth_digest_cleanup(&data->state.digest);
+  Curl_auth_digest_cleanup(&data->state.proxydigest);
 }
 
 #endif
index a22b3a3241b5b0290c32c671d0272e89e6307a1b..3f52bbcf35e68e12e59334f90d333fb797e53184 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -62,7 +62,7 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
 
   if(!neg_ctx->server_name) {
     /* Generate our SPN */
-    char *spn = Curl_sasl_build_gssapi_spn(
+    char *spn = Curl_auth_build_gssapi_spn(
       proxy ? data->set.str[STRING_PROXY_SERVICE_NAME] :
       data->set.str[STRING_SERVICE_NAME],
       proxy ? conn->proxy.name : conn->host.name);
index f3c8c4d108d901708202470bdfae7136b1a09332..2d869ae8854cfbeab3a84fd9b05e2100447117b5 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -94,7 +94,7 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
       return CURLE_BAD_FUNCTION_ARGUMENT;
 
     /* Generate our SPN */
-    neg_ctx->server_name = Curl_sasl_build_spn(
+    neg_ctx->server_name = Curl_auth_build_spn(
       proxy ? data->set.str[STRING_PROXY_SERVICE_NAME] :
       data->set.str[STRING_SERVICE_NAME],
       proxy ? conn->proxy.name : conn->host.name);
index 75a9463c96ea5ef4319461623977eed19d8dc7f0..71b0442dde87b0f25e41d741276516852fdb18d5 100644 (file)
@@ -43,7 +43,7 @@
 #include "memdebug.h"
 
 /*
- * sasl_create_plain_message()
+ * Curl_auth_create_plain_message()
  *
  * This is used to generate an already encoded PLAIN message ready
  * for sending to the recipient.
  *
  * Returns CURLE_OK on success.
  */
-CURLcode sasl_create_plain_message(struct SessionHandle *data,
-                                   const char *userp,
-                                   const char *passwdp,
-                                   char **outptr, size_t *outlen)
+CURLcode Curl_auth_create_plain_message(struct SessionHandle *data,
+                                        const char *userp,
+                                        const char *passwdp,
+                                        char **outptr, size_t *outlen)
 {
   CURLcode result;
   char *plainauth;
@@ -95,7 +95,7 @@ CURLcode sasl_create_plain_message(struct SessionHandle *data,
 }
 
 /*
- * sasl_create_login_message()
+ * Curl_auth_create_login_message()
  *
  * This is used to generate an already encoded LOGIN message containing the
  * user name or password ready for sending to the recipient.
@@ -110,9 +110,9 @@ CURLcode sasl_create_plain_message(struct SessionHandle *data,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode sasl_create_login_message(struct SessionHandle *data,
-                                   const char *valuep, char **outptr,
-                                   size_t *outlen)
+CURLcode Curl_auth_create_login_message(struct SessionHandle *data,
+                                        const char *valuep, char **outptr,
+                                        size_t *outlen)
 {
   size_t vlen = strlen(valuep);
 
@@ -133,7 +133,7 @@ CURLcode sasl_create_login_message(struct SessionHandle *data,
 }
 
 /*
- * sasl_create_external_message()
+ * Curl_auth_create_external_message()
  *
  * This is used to generate an already encoded EXTERNAL message containing
  * the user name ready for sending to the recipient.
@@ -148,10 +148,10 @@ CURLcode sasl_create_login_message(struct SessionHandle *data,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode sasl_create_external_message(struct SessionHandle *data,
-                                      const char *user, char **outptr,
-                                      size_t *outlen)
+CURLcode Curl_auth_create_external_message(struct SessionHandle *data,
+                                           const char *user, char **outptr,
+                                           size_t *outlen)
 {
   /* This is the same formatting as the login message */
-  return sasl_create_login_message(data, user, outptr, outlen);
+  return Curl_auth_create_login_message(data, user, outptr, outlen);
 }
index 846cb554deef0ff22960ab39ccc654d97eee7f1c..6f69e2ae90fe81d39d3b39d5eb99de8378233353 100644 (file)
@@ -41,7 +41,7 @@
 #include "memdebug.h"
 
 /*
- * sasl_decode_cram_md5_message()
+ * Curl_auth_decode_cram_md5_message()
  *
  * This is used to decode an already encoded CRAM-MD5 challenge message.
  *
@@ -54,8 +54,8 @@
  *
  * Returns CURLE_OK on success.
  */
-CURLcode sasl_decode_cram_md5_message(const char *chlg64, char **outptr,
-                                      size_t *outlen)
+CURLcode Curl_auth_decode_cram_md5_message(const char *chlg64, char **outptr,
+                                           size_t *outlen)
 {
   CURLcode result = CURLE_OK;
   size_t chlg64len = strlen(chlg64);
@@ -71,7 +71,7 @@ CURLcode sasl_decode_cram_md5_message(const char *chlg64, char **outptr,
 }
 
 /*
- * sasl_create_cram_md5_message()
+ * Curl_auth_create_cram_md5_message()
  *
  * This is used to generate an already encoded CRAM-MD5 response message ready
  * for sending to the recipient.
@@ -88,11 +88,11 @@ CURLcode sasl_decode_cram_md5_message(const char *chlg64, char **outptr,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode sasl_create_cram_md5_message(struct SessionHandle *data,
-                                      const char *chlg,
-                                      const char *userp,
-                                      const char *passwdp,
-                                      char **outptr, size_t *outlen)
+CURLcode Curl_auth_create_cram_md5_message(struct SessionHandle *data,
+                                           const char *chlg,
+                                           const char *userp,
+                                           const char *passwdp,
+                                           char **outptr, size_t *outlen)
 {
   CURLcode result = CURLE_OK;
   size_t chlglen = 0;
index 185bfa46f0174bac6f046b92e5c0320a960c7800..4a5fc4c65d25e4f7e184fdd52973f87b60b151b8 100644 (file)
@@ -66,7 +66,7 @@
   }
 #endif /* !USE_WINDOWS_SSPI */
 
-bool Curl_sasl_digest_get_pair(const char *str, char *value, char *content,
+bool Curl_auth_digest_get_pair(const char *str, char *value, char *content,
                                const char **endptr)
 {
   int c;
@@ -135,7 +135,7 @@ bool Curl_sasl_digest_get_pair(const char *str, char *value, char *content,
 
 #if !defined(USE_WINDOWS_SSPI)
 /* Convert md5 chunk to RFC2617 (section 3.1.3) -suitable ascii string*/
-static void sasl_digest_md5_to_ascii(unsigned char *source, /* 16 bytes */
+static void auth_digest_md5_to_ascii(unsigned char *source, /* 16 bytes */
                                      unsigned char *dest) /* 33 bytes */
 {
   int i;
@@ -144,7 +144,7 @@ static void sasl_digest_md5_to_ascii(unsigned char *source, /* 16 bytes */
 }
 
 /* Perform quoted-string escaping as described in RFC2616 and its errata */
-static char *sasl_digest_string_quoted(const char *source)
+static char *auth_digest_string_quoted(const char *source)
 {
   char *dest, *d;
   const char *s = source;
@@ -178,7 +178,7 @@ static char *sasl_digest_string_quoted(const char *source)
 /* Retrieves the value for a corresponding key from the challenge string
  * returns TRUE if the key could be found, FALSE if it does not exists
  */
-static bool sasl_digest_get_key_value(const char *chlg,
+static bool auth_digest_get_key_value(const char *chlg,
                                       const char *key,
                                       char *value,
                                       size_t max_val_len,
@@ -200,7 +200,7 @@ static bool sasl_digest_get_key_value(const char *chlg,
   return TRUE;
 }
 
-static CURLcode sasl_digest_get_qop_values(const char *options, int *value)
+static CURLcode auth_digest_get_qop_values(const char *options, int *value)
 {
   char *tmp;
   char *token;
@@ -233,7 +233,7 @@ static CURLcode sasl_digest_get_qop_values(const char *options, int *value)
 }
 
 /*
- * sasl_decode_digest_md5_message()
+ * auth_decode_digest_md5_message()
  *
  * This is used internally to decode an already encoded DIGEST-MD5 challenge
  * message into the seperate attributes.
@@ -252,7 +252,7 @@ static CURLcode sasl_digest_get_qop_values(const char *options, int *value)
  *
  * Returns CURLE_OK on success.
  */
-static CURLcode sasl_decode_digest_md5_message(const char *chlg64,
+static CURLcode auth_decode_digest_md5_message(const char *chlg64,
                                                char *nonce, size_t nlen,
                                                char *realm, size_t rlen,
                                                char *alg, size_t alen,
@@ -275,27 +275,27 @@ static CURLcode sasl_decode_digest_md5_message(const char *chlg64,
     return CURLE_BAD_CONTENT_ENCODING;
 
   /* Retrieve nonce string from the challenge */
-  if(!sasl_digest_get_key_value((char *) chlg, "nonce=\"", nonce, nlen,
+  if(!auth_digest_get_key_value((char *) chlg, "nonce=\"", nonce, nlen,
                                 '\"')) {
     free(chlg);
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
   /* Retrieve realm string from the challenge */
-  if(!sasl_digest_get_key_value((char *) chlg, "realm=\"", realm, rlen,
+  if(!auth_digest_get_key_value((char *) chlg, "realm=\"", realm, rlen,
                                 '\"')) {
     /* Challenge does not have a realm, set empty string [RFC2831] page 6 */
     strcpy(realm, "");
   }
 
   /* Retrieve algorithm string from the challenge */
-  if(!sasl_digest_get_key_value((char *) chlg, "algorithm=", alg, alen, ',')) {
+  if(!auth_digest_get_key_value((char *) chlg, "algorithm=", alg, alen, ',')) {
     free(chlg);
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
   /* Retrieve qop-options string from the challenge */
-  if(!sasl_digest_get_key_value((char *) chlg, "qop=\"", qop, qlen, '\"')) {
+  if(!auth_digest_get_key_value((char *) chlg, "qop=\"", qop, qlen, '\"')) {
     free(chlg);
     return CURLE_BAD_CONTENT_ENCODING;
   }
@@ -306,7 +306,7 @@ static CURLcode sasl_decode_digest_md5_message(const char *chlg64,
 }
 
 /*
- * Curl_sasl_create_digest_md5_message()
+ * Curl_auth_create_digest_md5_message()
  *
  * This is used to generate an already encoded DIGEST-MD5 response message
  * ready for sending to the recipient.
@@ -324,7 +324,7 @@ static CURLcode sasl_decode_digest_md5_message(const char *chlg64,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_digest_md5_message(struct SessionHandle *data,
                                              const char *chlg64,
                                              const char *userp,
                                              const char *passwdp,
@@ -352,7 +352,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
   char *spn         = NULL;
 
   /* Decode the challange message */
-  result = sasl_decode_digest_md5_message(chlg64, nonce, sizeof(nonce),
+  result = auth_decode_digest_md5_message(chlg64, nonce, sizeof(nonce),
                                           realm, sizeof(realm),
                                           algorithm, sizeof(algorithm),
                                           qop_options, sizeof(qop_options));
@@ -364,7 +364,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
     return CURLE_BAD_CONTENT_ENCODING;
 
   /* Get the qop-values from the qop-options */
-  result = sasl_digest_get_qop_values(qop_options, &qop_values);
+  result = auth_digest_get_qop_values(qop_options, &qop_values);
   if(result)
     return result;
 
@@ -415,7 +415,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
     snprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]);
 
   /* Generate our SPN */
-  spn = Curl_sasl_build_spn(service, realm);
+  spn = Curl_auth_build_spn(service, realm);
   if(!spn)
     return CURLE_OUT_OF_MEMORY;
 
@@ -486,7 +486,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
 }
 
 /*
- * Curl_sasl_decode_digest_http_message()
+ * Curl_auth_decode_digest_http_message()
  *
  * This is used to decode a HTTP DIGEST challenge message into the seperate
  * attributes.
@@ -498,7 +498,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
+CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
                                               struct digestdata *digest)
 {
   bool before = FALSE; /* got a nonce before */
@@ -512,7 +512,7 @@ CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
     before = TRUE;
 
   /* Clean up any former leftovers and initialise to defaults */
-  Curl_sasl_digest_cleanup(digest);
+  Curl_auth_digest_cleanup(digest);
 
   for(;;) {
     char value[DIGEST_MAX_VALUE_LENGTH];
@@ -523,7 +523,7 @@ CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
       chlg++;
 
     /* Extract a value=content pair */
-    if(Curl_sasl_digest_get_pair(chlg, value, content, &chlg)) {
+    if(Curl_auth_digest_get_pair(chlg, value, content, &chlg)) {
       if(Curl_raw_equal(value, "nonce")) {
         free(digest->nonce);
         digest->nonce = strdup(content);
@@ -626,7 +626,7 @@ CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
 }
 
 /*
- * Curl_sasl_create_digest_http_message()
+ * Curl_auth_create_digest_http_message()
  *
  * This is used to generate a HTTP DIGEST response message ready for sending
  * to the recipient.
@@ -645,7 +645,7 @@ CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_digest_http_message(struct SessionHandle *data,
                                               const char *userp,
                                               const char *passwdp,
                                               const unsigned char *request,
@@ -701,7 +701,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
   CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */
   Curl_md5it(md5buf, md5this);
   free(md5this);
-  sasl_digest_md5_to_ascii(md5buf, ha1);
+  auth_digest_md5_to_ascii(md5buf, ha1);
 
   if(digest->algo == CURLDIGESTALGO_MD5SESS) {
     /* nonce and cnonce are OUTSIDE the hash */
@@ -712,7 +712,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
     CURL_OUTPUT_DIGEST_CONV(data, tmp); /* Convert on non-ASCII machines */
     Curl_md5it(md5buf, (unsigned char *) tmp);
     free(tmp);
-    sasl_digest_md5_to_ascii(md5buf, ha1);
+    auth_digest_md5_to_ascii(md5buf, ha1);
   }
 
   /*
@@ -745,7 +745,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
   CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */
   Curl_md5it(md5buf, md5this);
   free(md5this);
-  sasl_digest_md5_to_ascii(md5buf, ha2);
+  auth_digest_md5_to_ascii(md5buf, ha2);
 
   if(digest->qop) {
     md5this = (unsigned char *) aprintf("%s:%s:%08x:%s:%s:%s",
@@ -769,7 +769,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
   CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */
   Curl_md5it(md5buf, md5this);
   free(md5this);
-  sasl_digest_md5_to_ascii(md5buf, request_digest);
+  auth_digest_md5_to_ascii(md5buf, request_digest);
 
   /* For test case 64 (snooped from a Mozilla 1.3a request)
 
@@ -784,7 +784,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
      characters.  algorithm and qop with standard values only contain web-safe
      characters.
   */
-  userp_quoted = sasl_digest_string_quoted(userp);
+  userp_quoted = auth_digest_string_quoted(userp);
   if(!userp_quoted)
     return CURLE_OUT_OF_MEMORY;
 
@@ -856,7 +856,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
 }
 
 /*
- * Curl_sasl_digest_cleanup()
+ * Curl_auth_digest_cleanup()
  *
  * This is used to clean up the digest specific data.
  *
@@ -865,7 +865,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
  * digest    [in/out] - The digest data struct being cleaned up.
  *
  */
-void Curl_sasl_digest_cleanup(struct digestdata *digest)
+void Curl_auth_digest_cleanup(struct digestdata *digest)
 {
   Curl_safefree(digest->nonce);
   Curl_safefree(digest->cnonce);
index b6ff2fd056386327d12336572b7fd2e6f3268160..d2c48687ab537d4d229792305055e4f642ce81a9 100644 (file)
@@ -35,7 +35,7 @@ enum {
 };
 
 /* This is used to extract the realm from a challenge message */
-bool Curl_sasl_digest_get_pair(const char *str, char *value, char *content,
+bool Curl_auth_digest_get_pair(const char *str, char *value, char *content,
                                const char **endptr);
 
 #endif
index c161bdd4d27ed2e615a1101ee5003556bd2d363d..a882534f0fcbffb040cdff7c707eafe80a51a4a3 100644 (file)
@@ -44,7 +44,7 @@
 #include "memdebug.h"
 
 /*
- * Curl_sasl_create_digest_md5_message()
+ * Curl_auth_create_digest_md5_message()
  *
  * This is used to generate an already encoded DIGEST-MD5 response message
  * ready for sending to the recipient.
@@ -62,7 +62,7 @@
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_digest_md5_message(struct SessionHandle *data,
                                              const char *chlg64,
                                              const char *userp,
                                              const char *passwdp,
@@ -125,7 +125,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
   }
 
   /* Generate our SPN */
-  spn = Curl_sasl_build_spn(service, data->easy_conn->host.name);
+  spn = Curl_auth_build_spn(service, data->easy_conn->host.name);
   if(!spn) {
     free(output_token);
     free(input_token);
@@ -255,7 +255,7 @@ CURLcode Curl_override_sspi_http_realm(const char *chlg,
         chlg++;
 
       /* Extract a value=content pair */
-      if(Curl_sasl_digest_get_pair(chlg, value, content, &chlg)) {
+      if(Curl_auth_digest_get_pair(chlg, value, content, &chlg)) {
         if(Curl_raw_equal(value, "realm")) {
 
           /* Setup identity's domain and length */
@@ -297,7 +297,7 @@ CURLcode Curl_override_sspi_http_realm(const char *chlg,
 }
 
 /*
- * Curl_sasl_decode_digest_http_message()
+ * Curl_auth_decode_digest_http_message()
  *
  * This is used to decode a HTTP DIGEST challenge message into the seperate
  * attributes.
@@ -309,7 +309,7 @@ CURLcode Curl_override_sspi_http_realm(const char *chlg,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
+CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
                                               struct digestdata *digest)
 {
   size_t chlglen = strlen(chlg);
@@ -330,7 +330,7 @@ CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
 }
 
 /*
- * Curl_sasl_create_digest_http_message()
+ * Curl_auth_create_digest_http_message()
  *
  * This is used to generate a HTTP DIGEST response message ready for sending
  * to the recipient.
@@ -349,7 +349,7 @@ CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_digest_http_message(struct SessionHandle *data,
                                               const char *userp,
                                               const char *passwdp,
                                               const unsigned char *request,
@@ -506,7 +506,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
 }
 
 /*
- * Curl_sasl_digest_cleanup()
+ * Curl_auth_digest_cleanup()
  *
  * This is used to clean up the digest specific data.
  *
@@ -515,7 +515,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
  * digest    [in/out] - The digest data struct being cleaned up.
  *
  */
-void Curl_sasl_digest_cleanup(struct digestdata *digest)
+void Curl_auth_digest_cleanup(struct digestdata *digest)
 {
   /* Free the input token */
   Curl_safefree(digest->input_token);
index 62a95a6c9f1a33ba6c506088f62ea4bf89344318..20274a02db22112a5e739bf463ec875f483206b6 100644 (file)
@@ -42,7 +42,7 @@
 #include "memdebug.h"
 
 /*
- * Curl_sasl_create_gssapi_user_message()
+ * Curl_auth_create_gssapi_user_message()
  *
  * This is used to generate an already encoded GSSAPI (Kerberos V5) user token
  * message ready for sending to the recipient.
@@ -64,7 +64,7 @@
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data,
                                               const char *userp,
                                               const char *passwdp,
                                               const char *service,
@@ -88,7 +88,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
 
   if(krb5->context == GSS_C_NO_CONTEXT) {
     /* Generate our SPN */
-    char *spn = Curl_sasl_build_gssapi_spn(service,
+    char *spn = Curl_auth_build_gssapi_spn(service,
                                            data->easy_conn->host.name);
     if(!spn)
       return CURLE_OUT_OF_MEMORY;
@@ -165,7 +165,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
 }
 
 /*
- * Curl_sasl_create_gssapi_security_message()
+ * Curl_auth_create_gssapi_security_message()
  *
  * This is used to generate an already encoded GSSAPI (Kerberos V5) security
  * token message ready for sending to the recipient.
@@ -181,7 +181,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_gssapi_security_message(struct SessionHandle *data,
                                                   const char *chlg64,
                                                   struct kerberos5data *krb5,
                                                   char **outptr,
@@ -346,7 +346,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
 }
 
 /*
- * Curl_sasl_gssapi_cleanup()
+ * Curl_auth_gssapi_cleanup()
  *
  * This is used to clean up the GSSAPI (Kerberos V5) specific data.
  *
@@ -355,7 +355,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
  * krb5     [in/out] - The Kerberos 5 data struct being cleaned up.
  *
  */
-void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5)
+void Curl_auth_gssapi_cleanup(struct kerberos5data *krb5)
 {
   OM_uint32 minor_status;
 
index 284fd98ddae6f04f04dbb9c98ffdfbaf189e535c..a1d438f50829f60358c8ca6785ed1ed0013795d0 100644 (file)
@@ -40,7 +40,7 @@
 #include "memdebug.h"
 
 /*
- * Curl_sasl_create_gssapi_user_message()
+ * Curl_auth_create_gssapi_user_message()
  *
  * This is used to generate an already encoded GSSAPI (Kerberos V5) user token
  * message ready for sending to the recipient.
@@ -61,7 +61,7 @@
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data,
                                               const char *userp,
                                               const char *passwdp,
                                               const char *service,
@@ -103,7 +103,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
       return CURLE_OUT_OF_MEMORY;
 
     /* Generate our SPN */
-    krb5->spn = Curl_sasl_build_spn(service, data->easy_conn->host.name);
+    krb5->spn = Curl_auth_build_spn(service, data->easy_conn->host.name);
     if(!krb5->spn)
       return CURLE_OUT_OF_MEMORY;
 
@@ -213,7 +213,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
 }
 
 /*
- * Curl_sasl_create_gssapi_security_message()
+ * Curl_auth_create_gssapi_security_message()
  *
  * This is used to generate an already encoded GSSAPI (Kerberos V5) security
  * token message ready for sending to the recipient.
@@ -229,7 +229,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_gssapi_security_message(struct SessionHandle *data,
                                                   const char *chlg64,
                                                   struct kerberos5data *krb5,
                                                   char **outptr,
@@ -445,7 +445,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
 }
 
 /*
- * Curl_sasl_gssapi_cleanup()
+ * Curl_auth_gssapi_cleanup()
  *
  * This is used to clean up the GSSAPI (Kerberos V5) specific data.
  *
@@ -454,7 +454,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
  * krb5     [in/out] - The Kerberos 5 data struct being cleaned up.
  *
  */
-void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5)
+void Curl_auth_gssapi_cleanup(struct kerberos5data *krb5)
 {
   /* Free our security context */
   if(krb5->context) {
index aef29bdfbd0997be551efb53c9abcfe20189a1ce..e27ce59bea93440074faec381e43d9ed233bd1b9 100644 (file)
@@ -217,7 +217,7 @@ static CURLcode ntlm_decode_type2_target(struct SessionHandle *data,
 */
 
 /*
- * Curl_sasl_decode_ntlm_type2_message()
+ * Curl_auth_decode_ntlm_type2_message()
  *
  * This is used to decode an already encoded NTLM type-2 message. The message
  * is first decoded from a base64 string into a raw NTLM message and checked
@@ -232,7 +232,7 @@ static CURLcode ntlm_decode_type2_target(struct SessionHandle *data,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data,
+CURLcode Curl_auth_decode_ntlm_type2_message(struct SessionHandle *data,
                                              const char *type2msg,
                                              struct ntlmdata *ntlm)
 {
@@ -329,7 +329,7 @@ static void unicodecpy(unsigned char *dest, const char *src, size_t length)
 }
 
 /*
- * Curl_sasl_create_ntlm_type1_message()
+ * Curl_auth_create_ntlm_type1_message()
  *
  * This is used to generate an already encoded NTLM type-1 message ready for
  * sending to the recipient using the appropriate compile time crypto API.
@@ -345,7 +345,7 @@ static void unicodecpy(unsigned char *dest, const char *src, size_t length)
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
+CURLcode Curl_auth_create_ntlm_type1_message(const char *userp,
                                              const char *passwdp,
                                              struct ntlmdata *ntlm,
                                              char **outptr, size_t *outlen)
@@ -378,7 +378,7 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
   (void)passwdp;
 
   /* Clean up any former leftovers and initialise to defaults */
-  Curl_sasl_ntlm_cleanup(ntlm);
+  Curl_auth_ntlm_cleanup(ntlm);
 
 #if USE_NTRESPONSES && USE_NTLM2SESSION
 #define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY
@@ -448,7 +448,7 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
 }
 
 /*
- * Curl_sasl_create_ntlm_type3_message()
+ * Curl_auth_create_ntlm_type3_message()
  *
  * This is used to generate an already encoded NTLM type-3 message ready for
  * sending to the recipient using the appropriate compile time crypto API.
@@ -465,7 +465,7 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_ntlm_type3_message(struct SessionHandle *data,
                                              const char *userp,
                                              const char *passwdp,
                                              struct ntlmdata *ntlm,
@@ -815,13 +815,13 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
   /* Return with binary blob encoded into base64 */
   result = Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen);
 
-  Curl_sasl_ntlm_cleanup(ntlm);
+  Curl_auth_ntlm_cleanup(ntlm);
 
   return result;
 }
 
 /*
-* Curl_sasl_ntlm_cleanup()
+* Curl_auth_ntlm_cleanup()
 *
 * This is used to clean up the NTLM specific data.
 *
@@ -830,7 +830,7 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
 * ntlm    [in/out] - The NTLM data struct being cleaned up.
 *
 */
-void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm)
+void Curl_auth_ntlm_cleanup(struct ntlmdata *ntlm)
 {
   /* Free the target info */
   Curl_safefree(ntlm->target_info);
index 3f48d50800bb25bd323e8c270d7bf90f6715bfac..532e270fdbbb017723dec4fe3e8f59c2c7c732dc 100644 (file)
@@ -38,7 +38,7 @@
 #include "memdebug.h"
 
 /*
- * Curl_sasl_create_ntlm_type1_message()
+ * Curl_auth_create_ntlm_type1_message()
  *
  * This is used to generate an already encoded NTLM type-1 message ready for
  * sending to the recipient.
@@ -54,7 +54,7 @@
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
+CURLcode Curl_auth_create_ntlm_type1_message(const char *userp,
                                              const char *passwdp,
                                              struct ntlmdata *ntlm,
                                              char **outptr, size_t *outlen)
@@ -67,7 +67,7 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
   TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
 
   /* Clean up any former leftovers and initialise to defaults */
-  Curl_sasl_ntlm_cleanup(ntlm);
+  Curl_auth_ntlm_cleanup(ntlm);
 
   /* Query the security package for NTLM */
   status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM),
@@ -150,7 +150,7 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
 }
 
 /*
- * Curl_sasl_decode_ntlm_type2_message()
+ * Curl_auth_decode_ntlm_type2_message()
  *
  * This is used to decode an already encoded NTLM type-2 message.
  *
@@ -162,7 +162,7 @@ CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data,
+CURLcode Curl_auth_decode_ntlm_type2_message(struct SessionHandle *data,
                                              const char *type2msg,
                                              struct ntlmdata *ntlm)
 {
@@ -196,7 +196,8 @@ CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data,
 }
 
 /*
- * Curl_sasl_create_ntlm_type3_message()
+* Curl_auth_create_ntlm_type3_message()
+ * Curl_auth_create_ntlm_type3_message()
  *
  * This is used to generate an already encoded NTLM type-3 message ready for
  * sending to the recipient.
@@ -213,7 +214,7 @@ CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_ntlm_type3_message(struct SessionHandle *data,
                                              const char *userp,
                                              const char *passwdp,
                                              struct ntlmdata *ntlm,
@@ -267,13 +268,13 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
   result = Curl_base64_encode(data, (char *) ntlm->output_token,
                               type_3_buf.cbBuffer, outptr, outlen);
 
-  Curl_sasl_ntlm_cleanup(ntlm);
+  Curl_auth_ntlm_cleanup(ntlm);
 
   return result;
 }
 
 /*
- * Curl_sasl_ntlm_cleanup()
+ * Curl_auth_ntlm_cleanup()
  *
  * This is used to clean up the NTLM specific data.
  *
@@ -282,7 +283,7 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
  * ntlm    [in/out] - The NTLM data struct being cleaned up.
  *
  */
-void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm)
+void Curl_auth_ntlm_cleanup(struct ntlmdata *ntlm)
 {
   /* Free our security context */
   if(ntlm->context) {
index dcee71b6a57394d6731d93fb596b133668f4e947..0c80c8bb45e93f45a36d08cc0f83dbd46f558c4e 100644 (file)
@@ -37,7 +37,7 @@
 #include "memdebug.h"
 
 /*
- * sasl_create_oauth_bearer_message()
+ * Curl_auth_create_oauth_bearer_message()
  *
  * This is used to generate an already encoded OAuth 2.0 message ready for
  * sending to the recipient.
  *
  * Returns CURLE_OK on success.
  */
-CURLcode sasl_create_oauth_bearer_message(struct SessionHandle *data,
-                                          const char *user,
-                                          const char *host,
-                                          const long port,
-                                          const char *bearer,
-                                          char **outptr, size_t *outlen)
+CURLcode Curl_auth_create_oauth_bearer_message(struct SessionHandle *data,
+                                               const char *user,
+                                               const char *host,
+                                               const long port,
+                                               const char *bearer,
+                                               char **outptr, size_t *outlen)
 {
   CURLcode result = CURLE_OK;
   char *oauth = NULL;
index b21caeafd56342a9e646e00635ee400fa2eb8491..7ed60b11d5516e3bc3f87479b67e5aad9ddc7ea5 100644 (file)
@@ -33,7 +33,7 @@
 #include "memdebug.h"
 
 /*
- * Curl_sasl_build_spn()
+ * Curl_auth_build_spn()
  *
  * This is used to build a SPN string in the format service/instance.
  *
  * Returns a pointer to the newly allocated SPN.
  */
 #if !defined(USE_WINDOWS_SSPI)
-char *Curl_sasl_build_spn(const char *service, const char *instance)
+char *Curl_auth_build_spn(const char *service, const char *instance)
 {
   /* Generate and return our SPN */
   return aprintf("%s/%s", service, instance);
 }
 #else
-TCHAR *Curl_sasl_build_spn(const char *service, const char *instance)
+TCHAR *Curl_auth_build_spn(const char *service, const char *instance)
 {
   char *utf8_spn = NULL;
   TCHAR *tchar_spn = NULL;
@@ -87,7 +87,7 @@ TCHAR *Curl_sasl_build_spn(const char *service, const char *instance)
 
 #if defined(HAVE_GSSAPI)
 /*
- * Curl_sasl_build_gssapi_spn()
+ * Curl_auth_build_gssapi_spn()
  *
  * This is used to build a SPN string in the format service@instance.
  *
@@ -98,7 +98,7 @@ TCHAR *Curl_sasl_build_spn(const char *service, const char *instance)
  *
  * Returns a pointer to the newly allocated SPN.
  */
-char *Curl_sasl_build_gssapi_spn(const char *service, const char *instance)
+char *Curl_auth_build_gssapi_spn(const char *service, const char *instance)
 {
   /* Generate and return our SPN */
   return aprintf("%s@%s", service, instance);
index 674c4b1c7f932a60cdcdbd0245edb2402703109d..7f2f488264474a179a51cff31983fc0b8c1ebbec 100644 (file)
@@ -40,45 +40,45 @@ struct kerberos5data;
 
 /* This is used to build a SPN string */
 #if !defined(USE_WINDOWS_SSPI)
-char *Curl_sasl_build_spn(const char *service, const char *instance);
+char *Curl_auth_build_spn(const char *service, const char *instance);
 #else
-TCHAR *Curl_sasl_build_spn(const char *service, const char *instance);
+TCHAR *Curl_auth_build_spn(const char *service, const char *instance);
 #endif
 
 #if defined(HAVE_GSSAPI)
-char *Curl_sasl_build_gssapi_spn(const char *service, const char *instance);
+char *Curl_auth_build_gssapi_spn(const char *service, const char *instance);
 #endif
 
 /* This is used to generate a base64 encoded PLAIN cleartext message */
-CURLcode sasl_create_plain_message(struct SessionHandle *data,
-                                   const char *userp,
-                                   const char *passwdp,
-                                   char **outptr, size_t *outlen);
+CURLcode Curl_auth_create_plain_message(struct SessionHandle *data,
+                                        const char *userp,
+                                        const char *passwdp,
+                                        char **outptr, size_t *outlen);
 
 /* This is used to generate a base64 encoded LOGIN cleartext message */
-CURLcode sasl_create_login_message(struct SessionHandle *data,
-                                   const char *valuep, char **outptr,
-                                   size_t *outlen);
+CURLcode Curl_auth_create_login_message(struct SessionHandle *data,
+                                        const char *valuep, char **outptr,
+                                        size_t *outlen);
 
 /* This is used to generate a base64 encoded EXTERNAL cleartext message */
-CURLcode sasl_create_external_message(struct SessionHandle *data,
-                                      const char *user, char **outptr,
-                                      size_t *outlen);
+CURLcode Curl_auth_create_external_message(struct SessionHandle *data,
+                                           const char *user, char **outptr,
+                                           size_t *outlen);
 
 #if !defined(CURL_DISABLE_CRYPTO_AUTH)
 /* This is used to decode a CRAM-MD5 challenge message */
-CURLcode sasl_decode_cram_md5_message(const char *chlg64, char **outptr,
-                                      size_t *outlen);
+CURLcode Curl_auth_decode_cram_md5_message(const char *chlg64, char **outptr,
+                                           size_t *outlen);
 
 /* This is used to generate a CRAM-MD5 response message */
-CURLcode sasl_create_cram_md5_message(struct SessionHandle *data,
-                                      const char *chlg,
-                                      const char *userp,
-                                      const char *passwdp,
-                                      char **outptr, size_t *outlen);
+CURLcode Curl_auth_create_cram_md5_message(struct SessionHandle *data,
+                                           const char *chlg,
+                                           const char *userp,
+                                           const char *passwdp,
+                                           char **outptr, size_t *outlen);
 
 /* This is used to generate a base64 encoded DIGEST-MD5 response message */
-CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_digest_md5_message(struct SessionHandle *data,
                                              const char *chlg64,
                                              const char *userp,
                                              const char *passwdp,
@@ -86,11 +86,11 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
                                              char **outptr, size_t *outlen);
 
 /* This is used to decode a HTTP DIGEST challenge message */
-CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
+CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
                                               struct digestdata *digest);
 
 /* This is used to generate a HTTP DIGEST response message */
-CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_digest_http_message(struct SessionHandle *data,
                                               const char *userp,
                                               const char *passwdp,
                                               const unsigned char *request,
@@ -99,44 +99,44 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
                                               char **outptr, size_t *outlen);
 
 /* This is used to clean up the digest specific data */
-void Curl_sasl_digest_cleanup(struct digestdata *digest);
+void Curl_auth_digest_cleanup(struct digestdata *digest);
 #endif /* !CURL_DISABLE_CRYPTO_AUTH */
 
 #if defined(USE_NTLM)
 /* This is used to generate a base64 encoded NTLM type-1 message */
-CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
+CURLcode Curl_auth_create_ntlm_type1_message(const char *userp,
                                              const char *passwdp,
                                              struct ntlmdata *ntlm,
                                              char **outptr,
                                              size_t *outlen);
 
 /* This is used to decode a base64 encoded NTLM type-2 message */
-CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data,
+CURLcode Curl_auth_decode_ntlm_type2_message(struct SessionHandle *data,
                                              const char *type2msg,
                                              struct ntlmdata *ntlm);
 
 /* This is used to generate a base64 encoded NTLM type-3 message */
-CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_ntlm_type3_message(struct SessionHandle *data,
                                              const char *userp,
                                              const char *passwdp,
                                              struct ntlmdata *ntlm,
                                              char **outptr, size_t *outlen);
 
 /* This is used to clean up the NTLM specific data */
-void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm);
+void Curl_auth_ntlm_cleanup(struct ntlmdata *ntlm);
 #endif /* USE_NTLM */
 
 /* This is used to generate a base64 encoded OAuth 2.0 message */
-CURLcode sasl_create_oauth_bearer_message(struct SessionHandle *data,
-                                          const char *user,
-                                          const char *host,
-                                          const long port,
-                                          const char *bearer,
-                                          char **outptr, size_t *outlen);
+CURLcode Curl_auth_create_oauth_bearer_message(struct SessionHandle *data,
+                                               const char *user,
+                                               const char *host,
+                                               const long port,
+                                               const char *bearer,
+                                               char **outptr, size_t *outlen);
 #if defined(USE_KERBEROS5)
 /* This is used to generate a base64 encoded GSSAPI (Kerberos V5) user token
    message */
-CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data,
                                               const char *userp,
                                               const char *passwdp,
                                               const char *service,
@@ -147,14 +147,14 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
 
 /* This is used to generate a base64 encoded GSSAPI (Kerberos V5) security
    token message */
-CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
+CURLcode Curl_auth_create_gssapi_security_message(struct SessionHandle *data,
                                                   const char *input,
                                                   struct kerberos5data *krb5,
                                                   char **outptr,
                                                   size_t *outlen);
 
 /* This is used to clean up the GSSAPI specific data */
-void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5);
+void Curl_auth_gssapi_cleanup(struct kerberos5data *krb5);
 #endif /* USE_KERBEROS5 */
 
 #endif /* HEADER_CURL_VAUTH_H */