diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-11-23 19:13:48 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-11-23 19:13:48 (GMT) |
commit | 8618d7457b1a648a8183966d930077e5754dc0ed (patch) | |
tree | c5fba1246a6af3cb2a700ac1cdbc970bc19f6940 /Doc/library/poplib.rst | |
parent | 25cee19beb3117f834100cf29cff625c98d0da29 (diff) | |
download | cpython-8618d7457b1a648a8183966d930077e5754dc0ed.zip cpython-8618d7457b1a648a8183966d930077e5754dc0ed.tar.gz cpython-8618d7457b1a648a8183966d930077e5754dc0ed.tar.bz2 |
Issue #4473: Add a POP3.stls() to switch a clear-text POP3 session into an encrypted POP3 session, on supported servers.
Patch by Lorenzo Catucci.
Diffstat (limited to 'Doc/library/poplib.rst')
-rw-r--r-- | Doc/library/poplib.rst | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Doc/library/poplib.rst b/Doc/library/poplib.rst index 2eb3b72..1ac93c9 100644 --- a/Doc/library/poplib.rst +++ b/Doc/library/poplib.rst @@ -13,8 +13,11 @@ -------------- This module defines a class, :class:`POP3`, which encapsulates a connection to a -POP3 server and implements the protocol as defined in :rfc:`1725`. The -:class:`POP3` class supports both the minimal and optional command sets. +POP3 server and implements the protocol as defined in :rfc:`1939`. The +:class:`POP3` class supports both the minimal and optional command sets from +:rfc:`1939`. The :class:`POP3` class also supports the `STLS` command introduced +in :rfc:`2595` to enable encrypted communication on an already established connection. + Additionally, this module provides a class :class:`POP3_SSL`, which provides support for connecting to POP3 servers that use SSL as an underlying protocol layer. @@ -184,6 +187,18 @@ An :class:`POP3` instance has the following methods: the unique id for that message in the form ``'response mesgnum uid``, otherwise result is list ``(response, ['mesgnum uid', ...], octets)``. +.. method:: POP3.stls(context=None) + + Start a TLS session on the active connection as specified in :rfc:`2595`. + This is only allowed before user authentication + + *context* parameter is a :class:`ssl.SSLContext` object which allows + bundling SSL configuration options, certificates and private keys into + a single (potentially long-lived) structure. + + .. versionadded:: 3.4 + + Instances of :class:`POP3_SSL` have no additional methods. The interface of this subclass is identical to its parent. |