From 6c896fea58ce9f9193f6085bab4fe7d5cf4b1360 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Thu, 16 Feb 2012 08:10:04 -0500 Subject: Add more API documentation for Session objects --- doc/api/ssl.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/api/ssl.rst b/doc/api/ssl.rst index 5014889..872cd5a 100644 --- a/doc/api/ssl.rst +++ b/doc/api/ssl.rst @@ -112,6 +112,15 @@ Context, Connection. :py:const:`SSLv23_METHOD` or :py:const:`TLSv1_METHOD`. +.. py:class:: Session() + + A class representing an SSL session. A session defines certain connection + parameters which may be re-used to speed up the setup of subsequent + connections. + + .. versionadded:: 0.14 + + .. py:data:: ConnectionType See :py:class:`Connection`. @@ -427,6 +436,14 @@ Context objects have the following methods: .. versionadded:: 0.13 +.. _openssl-session: + +Session objects +--------------- + +Session objects have no methods. + + .. _openssl-connection: Connection objects @@ -700,6 +717,22 @@ Connection objects have the following methods: .. versionadded:: 0.13 +.. py:method:: Connection.get_session() + + Get a :py:class:`Session` instance representing the SSL session in use by + the connection, or :py:obj:`None` if there is no session. + + .. versionadded:: 0.14 + + +.. py:method:: Connection.set_session(session) + + Set a new SSL session (using a :py:class:`Session` instance) to be used by + the connection. + + .. versionadded:: 0.14 + + .. Rubric:: Footnotes .. [#connection-context-socket] Actually, all that is required is an object that -- cgit v1.2.1