incref the X509Req when returning an X509Name from get_subject which refers to it; this prevents a segfault if the X509Name outlives the X509Req; update docs to reflect this and to reflect previous similar changes which were apparently made to X509.get_subject and X509.get_issuer
diff --git a/doc/html/openssl-ssl.html b/doc/html/openssl-ssl.html
index 4d1abcc..0feb9e4 100644
--- a/doc/html/openssl-ssl.html
+++ b/doc/html/openssl-ssl.html
@@ -45,13 +45,14 @@
<BR>
3.3 <tt class="module">SSL</tt> -- An interface to the SSL-specific parts of OpenSSL
</H2>
+
<P>
-<EM><EM><EM>
-</EM></EM></EM>
+
+
<P>
-<EM><EM><EM>This module handles things specific to SSL. There are two objects defined:
+This module handles things specific to SSL. There are two objects defined:
Context, Connection.
-</EM></EM></EM>
+
<P>
<dl><dt><b><a name='l2h-90'><tt>SSLv2_METHOD</tt></a></b>
<dd>
@@ -61,6 +62,7 @@
These constants represent the different SSL methods to use when creating a
context object.
</dl>
+
<P>
<dl><dt><b><a name='l2h-91'><tt>VERIFY_NONE</tt></a></b>
<dd>
@@ -69,6 +71,7 @@
These constants represent the verification mode used by the Context
object's <tt class="method">set_verify</tt> method.
</dl>
+
<P>
<dl><dt><b><a name='l2h-92'><tt>FILETYPE_PEM</tt></a></b>
<dd>
@@ -76,6 +79,7 @@
File type constants used with the <tt class="method">use_certificate_file</tt> and
<tt class="method">use_privatekey_file</tt> methods of Context objects.
</dl>
+
<P>
<dl><dt><b><a name='l2h-93'><tt>OP_SINGLE_DH_USE</tt></a></b>
<dd>
@@ -91,11 +95,13 @@
interesting if you're using e.g. <tt class="constant">SSLv23_METHOD</tt> to get an SSLv2-compatible
handshake, but don't want to use SSLv2.
</dl>
+
<P>
<dl><dt><b><a name='l2h-94'><tt>ContextType</tt></a></b>
<dd>
A Python type object representing the Context object type.
</dl>
+
<P>
<dl><dt><b><a name='l2h-95'><tt class='function'>Context</tt></a></b>(<var>method</var>)
<dd>
@@ -103,31 +109,35 @@
method should be <tt class="constant">SSLv2_METHOD</tt>, <tt class="constant">SSLv3_METHOD</tt>,
<tt class="constant">SSLv23_METHOD</tt> or <tt class="constant">TLSv1_METHOD</tt>.
</dl>
+
<P>
<dl><dt><b><a name='l2h-96'><tt>ConnectionType</tt></a></b>
<dd>
A Python type object representing the Connection object type.
</dl>
+
<P>
<dl><dt><b><a name='l2h-97'><tt class='function'>Connection</tt></a></b>(<var>context, socket</var>)
<dd>
Factory fucnction that creates a new Connection object given an SSL context and
a socket <A NAME="tex2html5"
- HREF="#foot920"><SUP>4</SUP></A> object.
+ HREF="#foot917"><SUP>4</SUP></A> object.
</dl>
+
<P>
<dl><dt><b>exception <a name='l2h-98'><tt class='exception'>Error</tt></a></b>
<dd>
This exception is used as a base class for the other SSL-related
exceptions, but may also be raised directly.
-</EM></EM></EM>
+
<P>
-<EM><EM><EM>Whenever this exception is raised directly, it has a list of error messages
+Whenever this exception is raised directly, it has a list of error messages
from the OpenSSL error queue, where each item is a tuple <code>(<var>lib</var>,
<var>function</var>, <var>reason</var>)</code>. Here <var>lib</var>, <var>function</var> and <var>reason</var>
are all strings, describing where and what the problem is. See <span class='manpage'><i>err</i>(3)</span>
for more information.
</dl>
+
<P>
<dl><dt><b>exception <a name='l2h-99'><tt class='exception'>ZeroReturnError</tt></a></b>
<dd>
@@ -136,11 +146,12 @@
only occurs if a closure alert has occurred in the protocol, i.e. the
connection has been closed cleanly. Note that this does not necessarily
mean that the transport layer (e.g. a socket) has been closed.
-</EM></EM></EM>
+
<P>
-<EM><EM><EM>It may seem a little strange that this is an exception, but it does match an
+It may seem a little strange that this is an exception, but it does match an
<code>SSL_ERROR</code> code, and is very convenient.
</dl>
+
<P>
<dl><dt><b>exception <a name='l2h-100'><tt class='exception'>WantReadError</tt></a></b>
<dd>
@@ -148,11 +159,13 @@
later, with the same arguments. Any I/O method can lead to this since new
handshakes can occur at any time.
</dl>
+
<P>
<dl><dt><b>exception <a name='l2h-101'><tt class='exception'>WantWriteError</tt></a></b>
<dd>
See <tt class="exception">WantReadError</tt>.
</dl>
+
<P>
<dl><dt><b>exception <a name='l2h-102'><tt class='exception'>WantX509LookupError</tt></a></b>
<dd>
@@ -161,6 +174,7 @@
arguments. Note: This won't occur in this version, as there are no such
callbacks in this version.
</dl>
+
<P>
<dl><dt><b>exception <a name='l2h-103'><tt class='exception'>SysCallError</tt></a></b>
<dd>
@@ -170,10 +184,11 @@
The parameter to the exception is always a pair <code>(<var>errnum</var>,
<var>errstr</var>)</code>.
</dl>
+
<P>
<BR><HR><H4>Footnotes</H4>
<DL>
-<DT><A NAME="foot920">... socket</A><A
+<DT><A NAME="foot917">... socket</A><A
href="openssl-ssl.html#tex2html5"><SUP>4</SUP></A></DT>
<DD>Actually, all that is required is an object that
<i>behaves</i> like a socket, you could even use files, even though it'd be