Commit 685fee38 authored by Steve Holme's avatar Steve Holme
Browse files

vauth: Moved Curl_sasl_build_spn() to create the initial vauth source files

parent 709991d5
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -20,6 +20,10 @@
#
###########################################################################

LIB_VAUTH_CFILES = vauth/vauth.c

LIB_VAUTH_HFILES = vauth/vauth.h

LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c     \
  vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c               \
  vtls/cyassl.c vtls/schannel.c vtls/darwinssl.c vtls/gskit.c           \
@@ -71,5 +75,5 @@ LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \

LIB_RCFILES = libcurl.rc

CSOURCES = $(LIB_CFILES) $(LIB_VTLS_CFILES)
HHEADERS = $(LIB_HFILES) $(LIB_VTLS_HFILES)
CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES)
HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES)
+1 −0
Original line number Diff line number Diff line
@@ -620,6 +620,7 @@ X_OBJS= \
	$(DIROBJ)\speedcheck.obj \
	$(DIROBJ)\splay.obj \
	$(DIROBJ)\ssh.obj \
	$(DIROBJ)\vauth.obj \
	$(DIROBJ)\vtls.obj \
	$(DIROBJ)\openssl.obj \
	$(DIROBJ)\strdup.obj \
+1 −20
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@

#include "curl_base64.h"
#include "curl_md5.h"
#include "vauth/vauth.h"
#include "vtls/vtls.h"
#include "curl_hmac.h"
#include "curl_sasl.h"
@@ -260,26 +261,6 @@ static CURLcode sasl_digest_get_qop_values(const char *options, int *value)
}
#endif /* !CURL_DISABLE_CRYPTO_AUTH && !USE_WINDOWS_SSPI */

#if !defined(USE_WINDOWS_SSPI)
/*
 * Curl_sasl_build_spn()
 *
 * This is used to build a SPN string in the format service/instance.
 *
 * Parameters:
 *
 * service  [in] - The service type such as www, smtp, pop or imap.
 * instance [in] - The host name or realm.
 *
 * Returns a pointer to the newly allocated SPN.
 */
char *Curl_sasl_build_spn(const char *service, const char *instance)
{
  /* Generate and return our SPN */
  return aprintf("%s/%s", service, instance);
}
#endif

/*
 * sasl_create_plain_message()
 *
+0 −11
Original line number Diff line number Diff line
@@ -136,17 +136,6 @@ struct SASL {
  (wordlen == (sizeof(mech) - 1) / sizeof(char) && \
   !memcmp(line, mech, wordlen))

/* This is used to build a SPN string */
#if !defined(USE_WINDOWS_SSPI)
char *Curl_sasl_build_spn(const char *service, const char *instance);
#else
TCHAR *Curl_sasl_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);
#endif

#ifndef CURL_DISABLE_CRYPTO_AUTH
/* This is used to extract the realm from a challenge message */
bool Curl_sasl_digest_get_pair(const char *str, char *value, char *content,
+1 −18
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@

#include <curl/curl.h>

#include "vauth/vauth.h"
#include "curl_sasl.h"
#include "urldata.h"
#include "curl_base64.h"
@@ -40,24 +41,6 @@
#include "curl_memory.h"
#include "memdebug.h"

/*
* Curl_sasl_build_gssapi_spn()
*
* This is used to build a SPN string in the format service@instance.
*
* Parameters:
*
* service  [in] - The service type such as www, smtp, pop or imap.
* instance [in] - The host name or realm.
*
* Returns a pointer to the newly allocated SPN.
*/
char *Curl_sasl_build_gssapi_spn(const char *service, const char *instance)
{
  /* Generate and return our SPN */
  return aprintf("%s@%s", service, instance);
}

/*
 * Curl_sasl_create_gssapi_user_message()
 *
Loading