Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
POP3_TYPE_ANY, or ~0, is written to pop3c->preftype in lib/pop3c.c, an
unsigned int variable. The result of ~0 is -1, which caused a warning
due to writing a negative number to an unsigned variable. To fix this,
make the expression ~0U so that its value is considered the unsigned
number UINT_MAX which is what SASL_AUTH_ANY does in curl_sasl.h.
|
|
Should a client application fail to decode an authentication message
received from a server, or not support any of the parameters given by
the server in the message, then the authentication phrase should be
cancelled gracefully by the client rather than simply terminating the
connection.
The authentication phrase should be cancelled by simply sending a '*'
to the server, in response to erroneous data being received, as per
RFC-3501, RFC-4954 and RFC-5034.
This patch adds the necessary state machine constants and appropriate
response handlers in order to add this functionality for the CRAM-MD5,
DIGEST-MD5 and NTLM authentication mechanisms.
|
|
Added the ability to use an XOAUTH2 bearer token [RFC6750] with POP3 for
authentication using RFC6749 "OAuth 2.0 Authorization Framework".
The bearer token is expected to be valid for the user specified in
conn->user. If CURLOPT_XOAUTH2_BEARER is defined and the connection has
an advertised auth mechanism of "XOAUTH2", the user and access token are
formatted as a base64 encoded string and sent to the server as
"AUTH XOAUTH2 <bearer token>".
|
|
... to use left-shifted values, like those defined in curl.h, rather
than 16-bit hexadecimal values.
|
|
|
|
Added support for specifying the preferred authentication type and SASL
mechanism in the URL as per RFC-2384.
|
|
Changed the final POP3_AUTH constant to POP3_AUTH_FINAL for consistency
with the response function.
|
|
Reordered the state and ssl_done variables in order to provide more
consistency between the email protocols as well as for for an upcoming
change.
|
|
Removed this pointer to a downloaded bytes counter because it was set in
pop3_init() to point to the same variable the transfer functions keep
the count in (k->bytecount), effectively making the code in transfer.c
"*k->bytecountp = k->bytecount" a no-op.
|
|
Updated the mailbox variable to correctly reflect it's purpose. The
name mailbox was a leftover from when IMAP and POP3 support was
initially added to curl.
|
|
|
|
Removed user and passwd from the POP3 struct as these cannot be set on
a per-request basis and are leftover from legacy FTP code.
Changed some comments still using FTP terminology.
|
|
Moved the mailbox and custom request variables from the per-connection
struct pop3_conn to the new per-request struct and fixed references
accordingly.
|
|
Created a new POP3 structure and changed the type of the pop3 proto
variable in connectdata from FTP* to POP*.
|
|
Corrected the order of the CAPA / CAPABILITY state machine constants to
match the execution order.
|
|
Introduced detection of the STLS capability, in order to add support
for TLS upgrades without unconditionally sending the STLS command.
|
|
Updated the ssldone comment as multi mode is always used internally now.
|
|
Added support for asynchronous SSL upgrade when using the
multi-interface.
|
|
This reverts renaming and usage of lib/*.h header files done
28-12-2012, reverting 2 commits:
f871de0... build: make use of 76 lib/*.h renamed files
ffd8e12... build: rename 76 lib/*.h files
This also reverts removal of redundant include guard (redundant thanks
to changes in above commits) done 2-12-2013, reverting 1 commit:
c087374... curl_setup.h: remove redundant include guard
This also reverts renaming and usage of lib/*.c source files done
3-12-2013, reverting 3 commits:
13606bb... build: make use of 93 lib/*.c renamed files
5b6e792... build: rename 93 lib/*.c files
7d83dff... build: commit 13606bbfde follow-up 1
Start of related discussion thread:
http://curl.haxx.se/mail/lib-2013-01/0012.html
Asking for confirmation on pushing this revertion commit:
http://curl.haxx.se/mail/lib-2013-01/0048.html
Confirmation summary:
http://curl.haxx.se/mail/lib-2013-01/0079.html
NOTICE: The list of 2 files that have been modified by other
intermixed commits, while renamed, and also by at least one
of the 6 commits this one reverts follows below. These 2 files
will exhibit a hole in history unless git's '--follow' option
is used when viewing logs.
lib/curl_imap.h
lib/curl_smtp.h
|
|
76 private header files renamed to use our standard naming scheme.
This commit only does the file renaming.
----------------------------------------
renamed: amigaos.h -> curl_amigaos.h
renamed: arpa_telnet.h -> curl_arpa_telnet.h
renamed: asyn.h -> curl_asyn.h
renamed: axtls.h -> curl_axtls.h
renamed: bundles.h -> curl_bundles.h
renamed: conncache.h -> curl_conncache.h
renamed: connect.h -> curl_connect.h
renamed: content_encoding.h -> curl_content_encoding.h
renamed: cookie.h -> curl_cookie.h
renamed: cyassl.h -> curl_cyassl.h
renamed: dict.h -> curl_dict.h
renamed: easyif.h -> curl_easyif.h
renamed: escape.h -> curl_escape.h
renamed: file.h -> curl_file.h
renamed: fileinfo.h -> curl_fileinfo.h
renamed: formdata.h -> curl_formdata.h
renamed: ftp.h -> curl_ftp.h
renamed: ftplistparser.h -> curl_ftplistparser.h
renamed: getinfo.h -> curl_getinfo.h
renamed: gopher.h -> curl_gopher.h
renamed: gtls.h -> curl_gtls.h
renamed: hash.h -> curl_hash.h
renamed: hostcheck.h -> curl_hostcheck.h
renamed: hostip.h -> curl_hostip.h
renamed: http.h -> curl_http.h
renamed: http_chunks.h -> curl_http_chunks.h
renamed: http_digest.h -> curl_http_digest.h
renamed: http_negotiate.h -> curl_http_negotiate.h
renamed: http_proxy.h -> curl_http_proxy.h
renamed: if2ip.h -> curl_if2ip.h
renamed: imap.h -> curl_imap.h
renamed: inet_ntop.h -> curl_inet_ntop.h
renamed: inet_pton.h -> curl_inet_pton.h
renamed: krb4.h -> curl_krb4.h
renamed: llist.h -> curl_llist.h
renamed: memdebug.h -> curl_memdebug.h
renamed: multiif.h -> curl_multiif.h
renamed: netrc.h -> curl_netrc.h
renamed: non-ascii.h -> curl_non-ascii.h
renamed: nonblock.h -> curl_nonblock.h
renamed: nssg.h -> curl_nssg.h
renamed: parsedate.h -> curl_parsedate.h
renamed: pingpong.h -> curl_pingpong.h
renamed: polarssl.h -> curl_polarssl.h
renamed: pop3.h -> curl_pop3.h
renamed: progress.h -> curl_progress.h
renamed: qssl.h -> curl_qssl.h
renamed: rawstr.h -> curl_rawstr.h
renamed: rtsp.h -> curl_rtsp.h
renamed: select.h -> curl_select.h
renamed: sendf.h -> curl_sendf.h
renamed: setup.h -> curl_setup.h
renamed: setup_once.h -> curl_setup_once.h
renamed: share.h -> curl_share.h
renamed: slist.h -> curl_slist.h
renamed: smtp.h -> curl_smtp.h
renamed: sockaddr.h -> curl_sockaddr.h
renamed: socks.h -> curl_socks.h
renamed: speedcheck.h -> curl_speedcheck.h
renamed: splay.h -> curl_splay.h
renamed: ssh.h -> curl_ssh.h
renamed: sslgen.h -> curl_sslgen.h
renamed: ssluse.h -> curl_ssluse.h
renamed: strdup.h -> curl_strdup.h
renamed: strequal.h -> curl_strequal.h
renamed: strerror.h -> curl_strerror.h
renamed: strtok.h -> curl_strtok.h
renamed: strtoofft.h -> curl_strtoofft.h
renamed: telnet.h -> curl_telnet.h
renamed: tftp.h -> curl_tftp.h
renamed: timeval.h -> curl_timeval.h
renamed: transfer.h -> curl_transfer.h
renamed: url.h -> curl_url.h
renamed: urldata.h -> curl_urldata.h
renamed: warnless.h -> curl_warnless.h
renamed: wildcard.h -> curl_wildcard.h
----------------------------------------
|
|
|
|
Enhanced the authentication type / mechanism detection in preparation
for the introduction of APOP support.
|
|
|
|
Corrected lines longer than 78 characters.
Changed POP3_AUTH_FINAL to POP3_AUTH to match SMTP code now that the
AUTH command is no longer sent on its own.
Introduced some comments in data sending functions.
Another attempt at trying to rational code and comment style.
|
|
|
|
Not all SASL enabled POP3 servers support the AUTH command on its own
when trying to detect the supported mechanisms. As such changed the
mechanism detection to use the CAPA command instead.
|
|
|
|
|
|
|
|
|
|
Changed the order of the state machine to match the order of actual
events.
Reworked some comments and function parameter positioning that I missed
the other day.
|
|
Added support for detecting the supported SASL authentication mechanisms
via the AUTH command. There are two ways of detecting them, either by
using the AUTH command, that will return -ERR if not supported or by
using the CAPA command which will return SASL and the list of mechanisms
if supported, not include SASL if SASL authentication is not supported
or -ERR if the CAPA command is not supported. As such it seems simpler
to use the AUTH command and fallback to normal clear text authentication
if the the command is not supported.
Additionally updated the test cases to return -ERR when the AUTH command
is encountered. Additional test cases will be added when support for the
individual authentication mechanisms is added.
|
|
Moved EOB definition into header file.
Switched the logic around in pop3_endofresp() to allow for the
introduction of auth-mechanism detection.
Repositioned second and third function variables where they will fit
within the 78 character line limit.
Tidied up some comments.
|
|
Reworked the command sending from two specific LIST and RETR command
functions into a single command based function as well as the two
associated response handlers into a generic command handler.
|
|
This feature allows the user to specify and use additional POP3
commands such as UIDL and DELE via libcurl's CURLOPT_CUSTOMREQUEST or
curl's -X command line option.
|
|
Simplified the code to remove the need for a separate "LIST <msg id>"
command handler and state machine and instead use the LIST command
handler for both operations.
|
|
|
|
By making sure the function can detect an "end of body" sequence
immediately on the first line, test 811 is now enabled.
|
|
Added tests for a number of POP3 LIST operations, including one
that shows a curl problem when listing no messages, so is
disabled.
|
|
|
|
If you pass a URL to pop3 that does not contain a message ID as
part of the URL, it will currently ask for 'INBOX' which just
causes the pop3 server to return an error.
The change makes libcurl treat en empty message ID as a request
for LIST (list of pop3 message IDs). User's code could then
parse this and download individual messages as desired.
|
|
|
|
|