From e7ce5b3e9e559a345800961d937ab3adad2e9f82 Mon Sep 17 00:00:00 2001 From: Piers Lauder Date: Fri, 8 Mar 2002 01:53:24 +0000 Subject: add SSL class submitted by Tino Lange --- Doc/lib/libimaplib.tex | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'Doc') diff --git a/Doc/lib/libimaplib.tex b/Doc/lib/libimaplib.tex index f4c3e19c0b..38323cfc2f 100644 --- a/Doc/lib/libimaplib.tex +++ b/Doc/lib/libimaplib.tex @@ -9,16 +9,18 @@ % Based on HTML documentation by Piers Lauder ; % converted by Fred L. Drake, Jr. . % Revised by ESR, January 2000. +% Changes for IMAP4_SSL by Tino Lange , March 2002 \indexii{IMAP4}{protocol} +\indexii{IMAP4_SSL}{protocol} -This module defines a class, \class{IMAP4}, which encapsulates a -connection to an IMAP4 server and implements a large subset of the +This module defines two classes, \class{IMAP4} and \class{IMAP4_SSL}, which encapsulate a +connection to an IMAP4 server and implement a large subset of the IMAP4rev1 client protocol as defined in \rfc{2060}. It is backward compatible with IMAP4 (\rfc{1730}) servers, but note that the \samp{STATUS} command is not supported in IMAP4. -A single class is provided by the \module{imaplib} module: +Two classes are provided by the \module{imaplib} module, \class{IMAP4} is the base class: \begin{classdesc}{IMAP4}{\optional{host\optional{, port}}} This class implements the actual IMAP4 protocol. The connection is @@ -48,6 +50,17 @@ sub-class of \exception{IMAP4.error}. Some other client now has write permissio and the mailbox will need to be re-opened to re-obtain write permission. \end{excdesc} +There's also a subclass for secure connections: + +\begin{classdesc}{IMAP4_SSL}{\optional{host\optional{, port\optional{, keyfile\optional{, certfile}}}}} +This is a subclass derived from \class{IMAP4} that connects over an SSL encrypted socket +(to use this class you need a socket module that was compiled with SSL support). +If \var{host} is not specified, \code{''} (the local host) is used. +If \var{port} is omitted, the standard IMAP4-over-SSL port (993) is used. +\var{keyfile} and \var{certfile} are also optional - they can contain a PEM formatted +private key and certificate chain file for the SSL connection. +\end{classdesc} + The following utility functions are defined: \begin{funcdesc}{Internaldate2tuple}{datestr} @@ -311,6 +324,13 @@ msgnums = M.search(None, '(FROM "LDJ")') \end{methoddesc} +Instances of \class{IMAP4_SSL} have just one additional method: + +\begin{methoddesc}{ssl}{} + Returns SSLObject instance used for the secure connection with the server. +\end{methoddesc} + + The following attributes are defined on instances of \class{IMAP4}: -- cgit v1.2.1