Commit 978b808f authored by Steve Holme's avatar Steve Holme
Browse files

smtp: Moved auth-mechanism constants into a separate header file

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.
parent 74be9935
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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

lib/curl_sasl.h

0 → 100644
+36 −0
Original line number Diff line number Diff line
#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 */
+1 −0
Original line number Diff line number Diff line
@@ -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 */
+0 −9
Original line number Diff line number Diff line
@@ -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;