]> granicus.if.org Git - curl/commitdiff
smtp: Moved auth-mechanism constants into a separate header file
authorSteve Holme <steve_holme@hotmail.com>
Fri, 25 May 2012 20:49:25 +0000 (21:49 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Fri, 25 May 2012 20:49:25 +0000 (21:49 +0100)
Move the SMTP_AUTH constants into a separate header file in
preparation for adding SASL based authentication to POP3 as the two
protocols will need to share them.

lib/Makefile.inc
lib/curl_sasl.h [new file with mode: 0644]
lib/smtp.c
lib/smtp.h

index 69ad159f3bd89a6c8f8fa8e24c251c088ebc2702..da11f8e0cb0f48b4605609c4dc41a67373f129fe 100644 (file)
@@ -39,4 +39,5 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h     \
   curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
   warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h     \
   gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h asyn.h curl_ntlm.h \
-  curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h curl_ntlm_msgs.h
+  curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h curl_ntlm_msgs.h       \
+  curl_sasl.h
diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h
new file mode 100644 (file)
index 0000000..dbbbad4
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef HEADER_CURL_SASL_H
+#define HEADER_CURL_SASL_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, 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
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+#include "pingpong.h"
+
+/* Authentication mechanism flags */
+#define SMTP_AUTH_LOGIN         0x0001
+#define SMTP_AUTH_PLAIN         0x0002
+#define SMTP_AUTH_CRAM_MD5      0x0004
+#define SMTP_AUTH_DIGEST_MD5    0x0008
+#define SMTP_AUTH_GSSAPI        0x0010
+#define SMTP_AUTH_EXTERNAL      0x0020
+#define SMTP_AUTH_NTLM          0x0040
+
+#endif /* HEADER_CURL_SASL_H */
index 5b2d9d38d5c3e171e9f60d0c2b40fb2818ecef86..ab1afbb967ecb7a43a38e18c5e70facac0385cd2 100644 (file)
@@ -88,6 +88,7 @@
 #include "curl_hmac.h"
 #include "curl_gethostname.h"
 #include "curl_ntlm_msgs.h"
+#include "curl_sasl.h"
 #include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
index 55f169e027c3456f43cf7bea608efb58c57593b3..a010494c3de585b5ceaaea0b28dbf10765d3fdc4 100644 (file)
@@ -67,15 +67,6 @@ struct smtp_conn {
   bool ssldone; /* is connect() over SSL done? only relevant in multi mode */
 };
 
-/* Authentication mechanism flags. */
-#define SMTP_AUTH_LOGIN         0x0001
-#define SMTP_AUTH_PLAIN         0x0002
-#define SMTP_AUTH_CRAM_MD5      0x0004
-#define SMTP_AUTH_DIGEST_MD5    0x0008
-#define SMTP_AUTH_GSSAPI        0x0010
-#define SMTP_AUTH_EXTERNAL      0x0020
-#define SMTP_AUTH_NTLM          0x0040
-
 extern const struct Curl_handler Curl_handler_smtp;
 extern const struct Curl_handler Curl_handler_smtps;