aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-01-20 19:21:56 +0000
committerSteve Holme <steve_holme@hotmail.com>2015-01-20 19:24:47 +0000
commit6005b0d99cf68f692ea702c011cf075bd02aed6a (patch)
tree3039154d789e51d3766e244948cbe42173826b5e /lib
parent7a8b2885e26d9d541a819ee979aa52fc023f1e6a (diff)
curl_sasl.c: Fixed compilation error when USE_WINDOWS_SSPI defined
curl_sasl.c:1221: error C2065: 'mechtable' : undeclared identifier This error could also happen for non-SSPI builds when cryptography is disabled (CURL_DISABLE_CRYPTO_AUTH is defined).
Diffstat (limited to 'lib')
-rw-r--r--lib/curl_sasl.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
index a7b0992f5..1f696df24 100644
--- a/lib/curl_sasl.c
+++ b/lib/curl_sasl.c
@@ -52,6 +52,23 @@
/* The last #include file should be: */
#include "memdebug.h"
+/* Supported mechanisms */
+const struct {
+ const char * name; /* Name */
+ size_t len; /* Name length */
+ unsigned int bit; /* Flag bit */
+} mechtable[] = {
+ { "LOGIN", 5, SASL_MECH_LOGIN },
+ { "PLAIN", 5, SASL_MECH_PLAIN },
+ { "CRAM-MD5", 8, SASL_MECH_CRAM_MD5 },
+ { "DIGEST-MD5", 10, SASL_MECH_DIGEST_MD5 },
+ { "GSSAPI", 6, SASL_MECH_GSSAPI },
+ { "EXTERNAL", 8, SASL_MECH_EXTERNAL },
+ { "NTLM", 4, SASL_MECH_NTLM },
+ { "XOAUTH2", 7, SASL_MECH_XOAUTH2 },
+ { ZERO_NULL, 0, 0 }
+};
+
#if !defined(CURL_DISABLE_CRYPTO_AUTH) && !defined(USE_WINDOWS_SSPI)
#define DIGEST_QOP_VALUE_AUTH (1 << 0)
#define DIGEST_QOP_VALUE_AUTH_INT (1 << 1)
@@ -76,23 +93,6 @@
}
-/* Supported mechanisms */
-const struct {
- const char * name; /* Name */
- size_t len; /* Name length */
- unsigned int bit; /* Flag bit */
-} mechtable[] = {
- { "LOGIN", 5, SASL_MECH_LOGIN },
- { "PLAIN", 5, SASL_MECH_PLAIN },
- { "CRAM-MD5", 8, SASL_MECH_CRAM_MD5 },
- { "DIGEST-MD5", 10, SASL_MECH_DIGEST_MD5 },
- { "GSSAPI", 6, SASL_MECH_GSSAPI },
- { "EXTERNAL", 8, SASL_MECH_EXTERNAL },
- { "NTLM", 4, SASL_MECH_NTLM },
- { "XOAUTH2", 7, SASL_MECH_XOAUTH2 },
- { ZERO_NULL, 0, 0 }
-};
-
/*
* Return 0 on success and then the buffers are filled in fine.
*