X509Name.get_components
diff --git a/ChangeLog b/ChangeLog
index 1a9a634..9457e57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-26 Jean-Paul Calderone <exarkun@twistedmatrix.com>
+
+ * src/crypto/x509name.c: Add X509Name.get_components
+
2008-03-25 Jean-Paul Calderone <exarkun@twistedmatrix.com>
* src/crypto/x509name.c: Add hash and der methods to X509Name.
diff --git a/doc/html/callbacks.html b/doc/html/callbacks.html
index b891258..d6df95e 100644
--- a/doc/html/callbacks.html
+++ b/doc/html/callbacks.html
@@ -56,7 +56,7 @@
Python threads to be able to do other things. The real trouble is if you've
released the thread lock to do a potentially blocking operation, and the
operation calls a callback. Then we must take the thread lock back<A NAME="tex2html6"
- HREF="#foot970"><SUP>5</SUP></A>.
+ HREF="#foot974"><SUP>5</SUP></A>.
<P>
There are two solutions to the first problem, both of which are necessary. The
@@ -84,7 +84,7 @@
<P>
<BR><HR><H4>Footnotes</H4>
<DL>
-<DT><A NAME="foot970">... back</A><A
+<DT><A NAME="foot974">... back</A><A
href="callbacks.html#tex2html6"><SUP>5</SUP></A></DT>
<DD>I'm
not sure why this is necessary, but otherwise I get a segmentation violation on
diff --git a/doc/html/intro.html b/doc/html/intro.html
index 724ccc7..c5b74a0 100644
--- a/doc/html/intro.html
+++ b/doc/html/intro.html
@@ -60,9 +60,9 @@
unfortunately its error handling system does not seem to be finished,
especially for non-blocking I/O. I think that much of the reason for this
is that M2Crypto<A NAME="tex2html1"
- HREF="#foot930"><SUP>1</SUP></A> is
+ HREF="#foot934"><SUP>1</SUP></A> is
developed using SWIG<A NAME="tex2html2"
- HREF="#foot931"><SUP>2</SUP></A>. This
+ HREF="#foot935"><SUP>2</SUP></A>. This
makes it awkward to create functions that e.g. can return both an integer and
NULL since (as far as I know) you basically write C functions and SWIG makes
wrapper functions that parses the Python argument list and calls your C
@@ -71,12 +71,12 @@
<P>
<BR><HR><H4>Footnotes</H4>
<DL>
-<DT><A NAME="foot930">... M2Crypto</A><A
+<DT><A NAME="foot934">... M2Crypto</A><A
href="intro.html#tex2html1"><SUP>1</SUP></A></DT>
<DD>See <a class="url" href="http://www.post1.com/home/ngps/m2/">http://www.post1.com/home/ngps/m2/</a>
</DD>
-<DT><A NAME="foot931">... SWIG</A><A
+<DT><A NAME="foot935">... SWIG</A><A
href="intro.html#tex2html2"><SUP>2</SUP></A></DT>
<DD>See <a class="url" href="http://swig.sourceforge.net/">http://swig.sourceforge.net/</a>
diff --git a/doc/html/openssl-509ext.html b/doc/html/openssl-509ext.html
index f1a8476..5afb6e0 100644
--- a/doc/html/openssl-509ext.html
+++ b/doc/html/openssl-509ext.html
@@ -52,7 +52,7 @@
X509Extension objects currently only have one method:
<P>
-<dl><dt><b><a name='l2h-81'><tt class='method'>get_critical</tt></a></b>()
+<dl><dt><b><a name='l2h-82'><tt class='method'>get_critical</tt></a></b>()
<dd>
Return the critical field of the extension object.
</dl>
diff --git a/doc/html/openssl-connection.html b/doc/html/openssl-connection.html
index 8d2b8da..93b72bc 100644
--- a/doc/html/openssl-connection.html
+++ b/doc/html/openssl-connection.html
@@ -51,7 +51,7 @@
Connection objects have the following methods:
<P>
-<dl><dt><b><a name='l2h-144'><tt class='method'>accept</tt></a></b>()
+<dl><dt><b><a name='l2h-145'><tt class='method'>accept</tt></a></b>()
<dd>
Call the <tt class="method">accept</tt> method of the underlying socket and set up SSL on the
returned socket, using the Context object supplied to this Connection object at
@@ -61,20 +61,20 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-145'><tt class='method'>bind</tt></a></b>(<var>address</var>)
+<dl><dt><b><a name='l2h-146'><tt class='method'>bind</tt></a></b>(<var>address</var>)
<dd>
Call the <tt class="method">bind</tt> method of the underlying socket.
</dl>
<P>
-<dl><dt><b><a name='l2h-146'><tt class='method'>close</tt></a></b>()
+<dl><dt><b><a name='l2h-147'><tt class='method'>close</tt></a></b>()
<dd>
Call the <tt class="method">close</tt> method of the underlying socket. Note: If you want
correct SSL closure, you need to call the <tt class="method">shutdown</tt> method first.
</dl>
<P>
-<dl><dt><b><a name='l2h-147'><tt class='method'>connect</tt></a></b>(<var>address</var>)
+<dl><dt><b><a name='l2h-148'><tt class='method'>connect</tt></a></b>(<var>address</var>)
<dd>
Call the <tt class="method">connect</tt> method of the underlying socket and set up SSL on the
socket, using the Context object supplied to this Connection object at
@@ -82,7 +82,7 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-148'><tt class='method'>connect_ex</tt></a></b>(<var>address</var>)
+<dl><dt><b><a name='l2h-149'><tt class='method'>connect_ex</tt></a></b>(<var>address</var>)
<dd>
Call the <tt class="method">connect_ex</tt> method of the underlying socket and set up SSL on
the socket, using the Context object supplied to this Connection object at
@@ -91,7 +91,7 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-149'><tt class='method'>do_handshake</tt></a></b>()
+<dl><dt><b><a name='l2h-150'><tt class='method'>do_handshake</tt></a></b>()
<dd>
Perform an SSL handshake (usually called after <tt class="method">renegotiate</tt> or one of
<tt class="method">set_accept_state</tt> or <tt class="method">set_accept_state</tt>). This can raise the
@@ -99,25 +99,25 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-150'><tt class='method'>fileno</tt></a></b>()
+<dl><dt><b><a name='l2h-151'><tt class='method'>fileno</tt></a></b>()
<dd>
Retrieve the file descriptor number for the underlying socket.
</dl>
<P>
-<dl><dt><b><a name='l2h-151'><tt class='method'>listen</tt></a></b>(<var>backlog</var>)
+<dl><dt><b><a name='l2h-152'><tt class='method'>listen</tt></a></b>(<var>backlog</var>)
<dd>
Call the <tt class="method">listen</tt> method of the underlying socket.
</dl>
<P>
-<dl><dt><b><a name='l2h-152'><tt class='method'>get_app_data</tt></a></b>()
+<dl><dt><b><a name='l2h-153'><tt class='method'>get_app_data</tt></a></b>()
<dd>
Retrieve application data as set by <tt class="method">set_app_data</tt>.
</dl>
<P>
-<dl><dt><b><a name='l2h-153'><tt class='method'>get_cipher_list</tt></a></b>()
+<dl><dt><b><a name='l2h-154'><tt class='method'>get_cipher_list</tt></a></b>()
<dd>
Retrieve the list of ciphers used by the Connection object. WARNING: This API
has changed. It used to take an optional parameter and just return a string,
@@ -125,44 +125,44 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-154'><tt class='method'>get_context</tt></a></b>()
+<dl><dt><b><a name='l2h-155'><tt class='method'>get_context</tt></a></b>()
<dd>
Retrieve the Context object associated with this Connection.
</dl>
<P>
-<dl><dt><b><a name='l2h-155'><tt class='method'>get_peer_certificate</tt></a></b>()
+<dl><dt><b><a name='l2h-156'><tt class='method'>get_peer_certificate</tt></a></b>()
<dd>
Retrieve the other side's certificate (if any)
</dl>
<P>
-<dl><dt><b><a name='l2h-156'><tt class='method'>getpeername</tt></a></b>()
+<dl><dt><b><a name='l2h-157'><tt class='method'>getpeername</tt></a></b>()
<dd>
Call the <tt class="method">getpeername</tt> method of the underlying socket.
</dl>
<P>
-<dl><dt><b><a name='l2h-157'><tt class='method'>getsockname</tt></a></b>()
+<dl><dt><b><a name='l2h-158'><tt class='method'>getsockname</tt></a></b>()
<dd>
Call the <tt class="method">getsockname</tt> method of the underlying socket.
</dl>
<P>
-<dl><dt><b><a name='l2h-158'><tt class='method'>getsockopt</tt></a></b>(<var>level, optname</var><big>[</big><var>, buflen</var><big>]</big>)
+<dl><dt><b><a name='l2h-159'><tt class='method'>getsockopt</tt></a></b>(<var>level, optname</var><big>[</big><var>, buflen</var><big>]</big>)
<dd>
Call the <tt class="method">getsockopt</tt> method of the underlying socket.
</dl>
<P>
-<dl><dt><b><a name='l2h-159'><tt class='method'>pending</tt></a></b>()
+<dl><dt><b><a name='l2h-160'><tt class='method'>pending</tt></a></b>()
<dd>
Retrieve the number of bytes that can be safely read from the SSL buffer
(<i>not</i> the underlying transport buffer).
</dl>
<P>
-<dl><dt><b><a name='l2h-160'><tt class='method'>recv</tt></a></b>(<var>bufsize</var>)
+<dl><dt><b><a name='l2h-161'><tt class='method'>recv</tt></a></b>(<var>bufsize</var>)
<dd>
Receive data from the Connection. The return value is a string representing the
data received. The maximum amount of data to be received at once, is specified
@@ -170,20 +170,20 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-161'><tt class='method'>renegotiate</tt></a></b>()
+<dl><dt><b><a name='l2h-162'><tt class='method'>renegotiate</tt></a></b>()
<dd>
Renegotiate the SSL session. Call this if you wish to change cipher suites or
anything like that.
</dl>
<P>
-<dl><dt><b><a name='l2h-162'><tt class='method'>send</tt></a></b>(<var>string</var>)
+<dl><dt><b><a name='l2h-163'><tt class='method'>send</tt></a></b>(<var>string</var>)
<dd>
Send the <var>string</var> data to the Connection.
</dl>
<P>
-<dl><dt><b><a name='l2h-163'><tt class='method'>sendall</tt></a></b>(<var>string</var>)
+<dl><dt><b><a name='l2h-164'><tt class='method'>sendall</tt></a></b>(<var>string</var>)
<dd>
Send all of the <var>string</var> data to the Connection. This calls <tt class="method">send</tt>
repeatedly until all data is sent. If an error occurs, it's impossible to tell
@@ -191,40 +191,40 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-164'><tt class='method'>set_accept_state</tt></a></b>()
+<dl><dt><b><a name='l2h-165'><tt class='method'>set_accept_state</tt></a></b>()
<dd>
Set the connection to work in server mode. The handshake will be handled
automatically by read/write.
</dl>
<P>
-<dl><dt><b><a name='l2h-165'><tt class='method'>set_app_data</tt></a></b>(<var>data</var>)
+<dl><dt><b><a name='l2h-166'><tt class='method'>set_app_data</tt></a></b>(<var>data</var>)
<dd>
Associate <var>data</var> with this Connection object. <var>data</var> can be retrieved
later using the <tt class="method">get_app_data</tt> method.
</dl>
<P>
-<dl><dt><b><a name='l2h-166'><tt class='method'>set_connect_state</tt></a></b>()
+<dl><dt><b><a name='l2h-167'><tt class='method'>set_connect_state</tt></a></b>()
<dd>
Set the connection to work in client mode. The handshake will be handled
automatically by read/write.
</dl>
<P>
-<dl><dt><b><a name='l2h-167'><tt class='method'>setblocking</tt></a></b>(<var>flag</var>)
+<dl><dt><b><a name='l2h-168'><tt class='method'>setblocking</tt></a></b>(<var>flag</var>)
<dd>
Call the <tt class="method">setblocking</tt> method of the underlying socket.
</dl>
<P>
-<dl><dt><b><a name='l2h-168'><tt class='method'>setsockopt</tt></a></b>(<var>level, optname, value</var>)
+<dl><dt><b><a name='l2h-169'><tt class='method'>setsockopt</tt></a></b>(<var>level, optname, value</var>)
<dd>
Call the <tt class="method">setsockopt</tt> method of the underlying socket.
</dl>
<P>
-<dl><dt><b><a name='l2h-169'><tt class='method'>shutdown</tt></a></b>()
+<dl><dt><b><a name='l2h-170'><tt class='method'>shutdown</tt></a></b>()
<dd>
Send the shutdown message to the Connection. Returns true if the shutdown
message exchange is completed and false otherwise (in which case you call
@@ -233,40 +233,40 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-170'><tt class='method'>get_shutdown</tt></a></b>()
+<dl><dt><b><a name='l2h-171'><tt class='method'>get_shutdown</tt></a></b>()
<dd>
Get the shutdown state of the Connection. Returns a bitvector of either or
both of <var>SENT_SHUTDOWN</var> and <var>RECEIVED_SHUTDOWN</var>.
</dl>
<P>
-<dl><dt><b><a name='l2h-171'><tt class='method'>set_shutdown</tt></a></b>(<var>state</var>)
+<dl><dt><b><a name='l2h-172'><tt class='method'>set_shutdown</tt></a></b>(<var>state</var>)
<dd>
Set the shutdown state of the Connection. <var>state</var> is a bitvector of
either or both of <var>SENT_SHUTDOWN</var> and <var>RECEIVED_SHUTDOWN</var>.
</dl>
<P>
-<dl><dt><b><a name='l2h-172'><tt class='method'>sock_shutdown</tt></a></b>(<var>how</var>)
+<dl><dt><b><a name='l2h-173'><tt class='method'>sock_shutdown</tt></a></b>(<var>how</var>)
<dd>
Call the <tt class="method">shutdown</tt> method of the underlying socket.
</dl>
<P>
-<dl><dt><b><a name='l2h-173'><tt class='method'>state_string</tt></a></b>()
+<dl><dt><b><a name='l2h-174'><tt class='method'>state_string</tt></a></b>()
<dd>
Retrieve a verbose string detailing the state of the Connection.
</dl>
<P>
-<dl><dt><b><a name='l2h-174'><tt class='method'>want_read</tt></a></b>()
+<dl><dt><b><a name='l2h-175'><tt class='method'>want_read</tt></a></b>()
<dd>
Checks if more data has to be read from the transport layer to complete an
operation.
</dl>
<P>
-<dl><dt><b><a name='l2h-175'><tt class='method'>want_write</tt></a></b>()
+<dl><dt><b><a name='l2h-176'><tt class='method'>want_write</tt></a></b>()
<dd>
Checks if there is data to write to the transport layer to complete an
operation.
diff --git a/doc/html/openssl-context.html b/doc/html/openssl-context.html
index 17f04f1..42d74ee 100644
--- a/doc/html/openssl-context.html
+++ b/doc/html/openssl-context.html
@@ -52,7 +52,7 @@
Context objects have the following methods:
<P>
-<dl><dt><b><a name='l2h-120'><tt class='method'>check_privatekey</tt></a></b>()
+<dl><dt><b><a name='l2h-121'><tt class='method'>check_privatekey</tt></a></b>()
<dd>
Check if the private key (loaded with <tt class="method">use_privatekey<big>[</big>_file<big>]</big></tt>)
matches the certificate (loaded with <tt class="method">use_certificate<big>[</big>_file<big>]</big></tt>).
@@ -60,13 +60,13 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-121'><tt class='method'>get_app_data</tt></a></b>()
+<dl><dt><b><a name='l2h-122'><tt class='method'>get_app_data</tt></a></b>()
<dd>
Retrieve application data as set by <tt class="method">set_app_data</tt>.
</dl>
<P>
-<dl><dt><b><a name='l2h-122'><tt class='method'>get_cert_store</tt></a></b>()
+<dl><dt><b><a name='l2h-123'><tt class='method'>get_cert_store</tt></a></b>()
<dd>
Retrieve the certificate store (a X509Store object) that the context uses.
This can be used to add "trusted" certificates without using the.
@@ -74,61 +74,61 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-123'><tt class='method'>get_timeout</tt></a></b>()
+<dl><dt><b><a name='l2h-124'><tt class='method'>get_timeout</tt></a></b>()
<dd>
Retrieve session timeout, as set by <tt class="method">set_timeout</tt>. The default is 300
seconds.
</dl>
<P>
-<dl><dt><b><a name='l2h-124'><tt class='method'>get_verify_depth</tt></a></b>()
+<dl><dt><b><a name='l2h-125'><tt class='method'>get_verify_depth</tt></a></b>()
<dd>
Retrieve the Context object's verify depth, as set by
<tt class="method">set_verify_depth</tt>.
</dl>
<P>
-<dl><dt><b><a name='l2h-125'><tt class='method'>get_verify_mode</tt></a></b>()
+<dl><dt><b><a name='l2h-126'><tt class='method'>get_verify_mode</tt></a></b>()
<dd>
Retrieve the Context object's verify mode, as set by <tt class="method">set_verify_mode</tt>.
</dl>
<P>
-<dl><dt><b><a name='l2h-126'><tt class='method'>load_client_ca</tt></a></b>(<var>pemfile</var>)
+<dl><dt><b><a name='l2h-127'><tt class='method'>load_client_ca</tt></a></b>(<var>pemfile</var>)
<dd>
Read a file with PEM-formatted certificates that will be sent to the client
when requesting a client certificate.
</dl>
<P>
-<dl><dt><b><a name='l2h-127'><tt class='method'>load_verify_locations</tt></a></b>(<var>pemfile</var>)
+<dl><dt><b><a name='l2h-128'><tt class='method'>load_verify_locations</tt></a></b>(<var>pemfile</var>)
<dd>
Specify where CA certificates for verification purposes are located. These are
trusted certificates. Note that the certificates have to be in PEM format.
</dl>
<P>
-<dl><dt><b><a name='l2h-128'><tt class='method'>load_tmp_dh</tt></a></b>(<var>dhfile</var>)
+<dl><dt><b><a name='l2h-129'><tt class='method'>load_tmp_dh</tt></a></b>(<var>dhfile</var>)
<dd>
Load parameters for Ephemeral Diffie-Hellman from <var>dhfile</var>.
</dl>
<P>
-<dl><dt><b><a name='l2h-129'><tt class='method'>set_app_data</tt></a></b>(<var>data</var>)
+<dl><dt><b><a name='l2h-130'><tt class='method'>set_app_data</tt></a></b>(<var>data</var>)
<dd>
Associate <var>data</var> with this Context object. <var>data</var> can be retrieved
later using the <tt class="method">get_app_data</tt> method.
</dl>
<P>
-<dl><dt><b><a name='l2h-130'><tt class='method'>set_cipher_list</tt></a></b>(<var>ciphers</var>)
+<dl><dt><b><a name='l2h-131'><tt class='method'>set_cipher_list</tt></a></b>(<var>ciphers</var>)
<dd>
Set the list of ciphers to be used in this context. See the OpenSSL manual for
more information (e.g. ciphers(1))
</dl>
<P>
-<dl><dt><b><a name='l2h-131'><tt class='method'>set_info_callback</tt></a></b>(<var>callback</var>)
+<dl><dt><b><a name='l2h-132'><tt class='method'>set_info_callback</tt></a></b>(<var>callback</var>)
<dd>
Set the information callback to <var>callback</var>. This function will be called
from time to time during SSL handshakes.
@@ -139,14 +139,14 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-132'><tt class='method'>set_options</tt></a></b>(<var>options</var>)
+<dl><dt><b><a name='l2h-133'><tt class='method'>set_options</tt></a></b>(<var>options</var>)
<dd>
Add SSL options. Options you have set before are not cleared!
This method should be used with the <tt class="constant">OP_*</tt> constants.
</dl>
<P>
-<dl><dt><b><a name='l2h-133'><tt class='method'>set_passwd_cb</tt></a></b>(<var>callback</var><big>[</big><var>, userdata</var><big>]</big>)
+<dl><dt><b><a name='l2h-134'><tt class='method'>set_passwd_cb</tt></a></b>(<var>callback</var><big>[</big><var>, userdata</var><big>]</big>)
<dd>
Set the passphrase callback to <var>callback</var>. This function will be called
when a private key with a passphrase is loaded.
@@ -160,7 +160,7 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-134'><tt class='method'>set_session_id</tt></a></b>(<var>name</var>)
+<dl><dt><b><a name='l2h-135'><tt class='method'>set_session_id</tt></a></b>(<var>name</var>)
<dd>
Set the context <var>name</var> within which a session can be reused for this
Context object. This is needed when doing session resumption, because there is
@@ -169,7 +169,7 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-135'><tt class='method'>set_timeout</tt></a></b>(<var>timeout</var>)
+<dl><dt><b><a name='l2h-136'><tt class='method'>set_timeout</tt></a></b>(<var>timeout</var>)
<dd>
Set the timeout for newly created sessions for this Context object to
<var>timeout</var>. <var>timeout</var> must be given in (whole) seconds. The default
@@ -178,7 +178,7 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-136'><tt class='method'>set_verify</tt></a></b>(<var>mode, callback</var>)
+<dl><dt><b><a name='l2h-137'><tt class='method'>set_verify</tt></a></b>(<var>mode, callback</var>)
<dd>
Set the verification flags for this Context object to <var>mode</var> and specify
that <var>callback</var> should be used for verification callbacks. <var>mode</var>
@@ -193,39 +193,39 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-137'><tt class='method'>set_verify_depth</tt></a></b>(<var>depth</var>)
+<dl><dt><b><a name='l2h-138'><tt class='method'>set_verify_depth</tt></a></b>(<var>depth</var>)
<dd>
Set the maximum depth for the certificate chain verification that shall be
allowed for this Context object.
</dl>
<P>
-<dl><dt><b><a name='l2h-138'><tt class='method'>use_certificate</tt></a></b>(<var>cert</var>)
+<dl><dt><b><a name='l2h-139'><tt class='method'>use_certificate</tt></a></b>(<var>cert</var>)
<dd>
Use the certificate <var>cert</var> which has to be a X509 object.
</dl>
<P>
-<dl><dt><b><a name='l2h-139'><tt class='method'>add_extra_chain_cert</tt></a></b>(<var>cert</var>)
+<dl><dt><b><a name='l2h-140'><tt class='method'>add_extra_chain_cert</tt></a></b>(<var>cert</var>)
<dd>
Adds the certificate <var>cert</var>, which has to be a X509 object, to the
certificate chain presented together with the certificate.
</dl>
<P>
-<dl><dt><b><a name='l2h-140'><tt class='method'>use_certificate_chain_file</tt></a></b>(<var>file</var>)
+<dl><dt><b><a name='l2h-141'><tt class='method'>use_certificate_chain_file</tt></a></b>(<var>file</var>)
<dd>
Load a certificate chain from <var>file</var> which must be PEM encoded.
</dl>
<P>
-<dl><dt><b><a name='l2h-141'><tt class='method'>use_privatekey</tt></a></b>(<var>pkey</var>)
+<dl><dt><b><a name='l2h-142'><tt class='method'>use_privatekey</tt></a></b>(<var>pkey</var>)
<dd>
Use the private key <var>pkey</var> which has to be a PKey object.
</dl>
<P>
-<dl><dt><b><a name='l2h-142'><tt class='method'>use_certificate_file</tt></a></b>(<var>file</var><big>[</big><var>, format</var><big>]</big>)
+<dl><dt><b><a name='l2h-143'><tt class='method'>use_certificate_file</tt></a></b>(<var>file</var><big>[</big><var>, format</var><big>]</big>)
<dd>
Load the first certificate found in <var>file</var>. The certificate must be in the
format specified by <var>format</var>, which is either <tt class="constant">FILETYPE_PEM</tt> or
@@ -233,7 +233,7 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-143'><tt class='method'>use_privatekey_file</tt></a></b>(<var>file</var><big>[</big><var>, format</var><big>]</big>)
+<dl><dt><b><a name='l2h-144'><tt class='method'>use_privatekey_file</tt></a></b>(<var>file</var><big>[</big><var>, format</var><big>]</big>)
<dd>
Load the first private key found in <var>file</var>. The private key must be in the
format specified by <var>format</var>, which is either <tt class="constant">FILETYPE_PEM</tt> or
diff --git a/doc/html/openssl-netscape-spki.html b/doc/html/openssl-netscape-spki.html
index 2015387..ed8431f 100644
--- a/doc/html/openssl-netscape-spki.html
+++ b/doc/html/openssl-netscape-spki.html
@@ -51,31 +51,31 @@
NetscapeSPKI objects have the following methods:
<P>
-<dl><dt><b><a name='l2h-82'><tt class='method'>b64_encode</tt></a></b>()
+<dl><dt><b><a name='l2h-83'><tt class='method'>b64_encode</tt></a></b>()
<dd>
Return a base64-encoded string representation of the object.
</dl>
<P>
-<dl><dt><b><a name='l2h-83'><tt class='method'>get_pubkey</tt></a></b>()
+<dl><dt><b><a name='l2h-84'><tt class='method'>get_pubkey</tt></a></b>()
<dd>
Return the public key of object.
</dl>
<P>
-<dl><dt><b><a name='l2h-84'><tt class='method'>set_pubkey</tt></a></b>(<var>key</var>)
+<dl><dt><b><a name='l2h-85'><tt class='method'>set_pubkey</tt></a></b>(<var>key</var>)
<dd>
Set the public key of the object to <var>key</var>.
</dl>
<P>
-<dl><dt><b><a name='l2h-85'><tt class='method'>sign</tt></a></b>(<var>key, digest_name</var>)
+<dl><dt><b><a name='l2h-86'><tt class='method'>sign</tt></a></b>(<var>key, digest_name</var>)
<dd>
Sign the NetscapeSPKI object using the given <var>key</var> and <var>digest_name</var>.
</dl>
<P>
-<dl><dt><b><a name='l2h-86'><tt class='method'>verify</tt></a></b>(<var>key</var>)
+<dl><dt><b><a name='l2h-87'><tt class='method'>verify</tt></a></b>(<var>key</var>)
<dd>
Verify the NetscapeSPKI object using the given <var>key</var>.
</dl>
diff --git a/doc/html/openssl-pkcs12.html b/doc/html/openssl-pkcs12.html
index 1439b61..26f1dd7 100644
--- a/doc/html/openssl-pkcs12.html
+++ b/doc/html/openssl-pkcs12.html
@@ -52,19 +52,19 @@
PKCS12 objects have the following methods:
<P>
-<dl><dt><b><a name='l2h-78'><tt class='method'>get_certificate</tt></a></b>()
+<dl><dt><b><a name='l2h-79'><tt class='method'>get_certificate</tt></a></b>()
<dd>
Return certificate portion of the PKCS12 structure.
</dl>
<P>
-<dl><dt><b><a name='l2h-79'><tt class='method'>get_privatekey</tt></a></b>()
+<dl><dt><b><a name='l2h-80'><tt class='method'>get_privatekey</tt></a></b>()
<dd>
Return private key portion of the PKCS12 structure
</dl>
<P>
-<dl><dt><b><a name='l2h-80'><tt class='method'>get_ca_certificates</tt></a></b>()
+<dl><dt><b><a name='l2h-81'><tt class='method'>get_ca_certificates</tt></a></b>()
<dd>
Return CA certificates within the PKCS12 object as a tuple. Returns
None if no CA certificates are present.
diff --git a/doc/html/openssl-pkcs7.html b/doc/html/openssl-pkcs7.html
index 865e12c..3e46109 100644
--- a/doc/html/openssl-pkcs7.html
+++ b/doc/html/openssl-pkcs7.html
@@ -52,31 +52,31 @@
PKCS7 objects have the following methods:
<P>
-<dl><dt><b><a name='l2h-73'><tt class='method'>type_is_signed</tt></a></b>()
+<dl><dt><b><a name='l2h-74'><tt class='method'>type_is_signed</tt></a></b>()
<dd>
FIXME
</dl>
<P>
-<dl><dt><b><a name='l2h-74'><tt class='method'>type_is_enveloped</tt></a></b>()
+<dl><dt><b><a name='l2h-75'><tt class='method'>type_is_enveloped</tt></a></b>()
<dd>
FIXME
</dl>
<P>
-<dl><dt><b><a name='l2h-75'><tt class='method'>type_is_signedAndEnveloped</tt></a></b>()
+<dl><dt><b><a name='l2h-76'><tt class='method'>type_is_signedAndEnveloped</tt></a></b>()
<dd>
FIXME
</dl>
<P>
-<dl><dt><b><a name='l2h-76'><tt class='method'>type_is_data</tt></a></b>()
+<dl><dt><b><a name='l2h-77'><tt class='method'>type_is_data</tt></a></b>()
<dd>
FIXME
</dl>
<P>
-<dl><dt><b><a name='l2h-77'><tt class='method'>get_type_name</tt></a></b>()
+<dl><dt><b><a name='l2h-78'><tt class='method'>get_type_name</tt></a></b>()
<dd>
Get the type name of the PKCS7.
</dl>
diff --git a/doc/html/openssl-pkey.html b/doc/html/openssl-pkey.html
index 686ab32..e23e111 100644
--- a/doc/html/openssl-pkey.html
+++ b/doc/html/openssl-pkey.html
@@ -52,20 +52,20 @@
The PKey object has the following methods:
<P>
-<dl><dt><b><a name='l2h-70'><tt class='method'>bits</tt></a></b>()
+<dl><dt><b><a name='l2h-71'><tt class='method'>bits</tt></a></b>()
<dd>
Return the number of bits of the key.
</dl>
<P>
-<dl><dt><b><a name='l2h-71'><tt class='method'>generate_key</tt></a></b>(<var>type, bits</var>)
+<dl><dt><b><a name='l2h-72'><tt class='method'>generate_key</tt></a></b>(<var>type, bits</var>)
<dd>
Generate a public/private key pair of the type <var>type</var> (one of
<tt class="constant">TYPE_RSA</tt> and <tt class="constant">TYPE_DSA</tt>) with the size <var>bits</var>.
</dl>
<P>
-<dl><dt><b><a name='l2h-72'><tt class='method'>type</tt></a></b>()
+<dl><dt><b><a name='l2h-73'><tt class='method'>type</tt></a></b>()
<dd>
Return the type of the key.
</dl>
diff --git a/doc/html/openssl-rand.html b/doc/html/openssl-rand.html
index ff8a4b1..9781141 100644
--- a/doc/html/openssl-rand.html
+++ b/doc/html/openssl-rand.html
@@ -56,52 +56,52 @@
declares the following:
<P>
-<dl><dt><b><a name='l2h-88'><tt class='function'>add</tt></a></b>(<var>string, entropy</var>)
+<dl><dt><b><a name='l2h-89'><tt class='function'>add</tt></a></b>(<var>string, entropy</var>)
<dd>
Mix bytes from <var>string</var> into the PRNG state. The <var>entropy</var> argument is
(the lower bound of) an estimate of how much randomness is contained in
-<var>string</var>, measured in bytes. For more information, see e.g. <a class="rfc" name="rfcref-1851"
+<var>string</var>, measured in bytes. For more information, see e.g. <a class="rfc" name="rfcref-1858"
href="http://www.ietf.org/rfc/rfc1750.txt">RFC 1750</a>.
</dl>
<P>
-<dl><dt><b><a name='l2h-89'><tt class='function'>egd</tt></a></b>(<var>path</var><big>[</big><var>, bytes</var><big>]</big>)
+<dl><dt><b><a name='l2h-90'><tt class='function'>egd</tt></a></b>(<var>path</var><big>[</big><var>, bytes</var><big>]</big>)
<dd>
Query the Entropy Gathering Daemon<A NAME="tex2html3"
- HREF="#foot952"><SUP>3</SUP></A> on socket <var>path</var> for <var>bytes</var>
+ HREF="#foot956"><SUP>3</SUP></A> on socket <var>path</var> for <var>bytes</var>
bytes of random data and and uses <tt class="function">add</tt> to seed the PRNG. The default
value of <var>bytes</var> is 255.
</dl>
<P>
-<dl><dt><b><a name='l2h-90'><tt class='function'>load_file</tt></a></b>(<var>path</var><big>[</big><var>, bytes</var><big>]</big>)
+<dl><dt><b><a name='l2h-91'><tt class='function'>load_file</tt></a></b>(<var>path</var><big>[</big><var>, bytes</var><big>]</big>)
<dd>
Read <var>bytes</var> bytes (or all of it, if <var>bytes</var> is negative) of data from
the file <var>path</var> to seed the PRNG. The default value of <var>bytes</var> is -1.
</dl>
<P>
-<dl><dt><b><a name='l2h-91'><tt class='function'>screen</tt></a></b>()
+<dl><dt><b><a name='l2h-92'><tt class='function'>screen</tt></a></b>()
<dd>
Add the current contents of the screen to the PRNG state.
Availability: Windows.
</dl>
<P>
-<dl><dt><b><a name='l2h-92'><tt class='function'>seed</tt></a></b>(<var>string</var>)
+<dl><dt><b><a name='l2h-93'><tt class='function'>seed</tt></a></b>(<var>string</var>)
<dd>
This is equivalent to calling <tt class="function">add</tt> with <var>entropy</var> as the length
of the string.
</dl>
<P>
-<dl><dt><b><a name='l2h-93'><tt class='function'>status</tt></a></b>()
+<dl><dt><b><a name='l2h-94'><tt class='function'>status</tt></a></b>()
<dd>
Returns true if the PRNG has been seeded with enough data, and false otherwise.
</dl>
<P>
-<dl><dt><b><a name='l2h-94'><tt class='function'>write_file</tt></a></b>(<var>path</var>)
+<dl><dt><b><a name='l2h-95'><tt class='function'>write_file</tt></a></b>(<var>path</var>)
<dd>
Write a number of random bytes (currently 1024) to the file <var>path</var>. This
file can then be used with <tt class="function">load_file</tt> to seed the PRNG again.
@@ -110,7 +110,7 @@
<P>
<BR><HR><H4>Footnotes</H4>
<DL>
-<DT><A NAME="foot952">... Daemon</A><A
+<DT><A NAME="foot956">... Daemon</A><A
href="openssl-rand.html#tex2html3"><SUP>3</SUP></A></DT>
<DD>See
<a class="url" href="http://www.lothar.com/tech/crypto/">http://www.lothar.com/tech/crypto/</a>
diff --git a/doc/html/openssl-ssl.html b/doc/html/openssl-ssl.html
index e3ac0bb..4db6320 100644
--- a/doc/html/openssl-ssl.html
+++ b/doc/html/openssl-ssl.html
@@ -54,39 +54,39 @@
Context, Connection.
<P>
-<dl><dt><b><a name='l2h-96'><tt>SSLv2_METHOD</tt></a></b>
+<dl><dt><b><a name='l2h-97'><tt>SSLv2_METHOD</tt></a></b>
<dd>
-<dt><b><a name='l2h-110'><tt>SSLv3_METHOD</tt></a></b><dd>
-<dt><b><a name='l2h-111'><tt>SSLv23_METHOD</tt></a></b><dd>
-<dt><b><a name='l2h-112'><tt>TLSv1_METHOD</tt></a></b><dd>
+<dt><b><a name='l2h-111'><tt>SSLv3_METHOD</tt></a></b><dd>
+<dt><b><a name='l2h-112'><tt>SSLv23_METHOD</tt></a></b><dd>
+<dt><b><a name='l2h-113'><tt>TLSv1_METHOD</tt></a></b><dd>
These constants represent the different SSL methods to use when creating a
context object.
</dl>
<P>
-<dl><dt><b><a name='l2h-97'><tt>VERIFY_NONE</tt></a></b>
+<dl><dt><b><a name='l2h-98'><tt>VERIFY_NONE</tt></a></b>
<dd>
-<dt><b><a name='l2h-113'><tt>VERIFY_PEER</tt></a></b><dd>
-<dt><b><a name='l2h-114'><tt>VERIFY_FAIL_IF_NO_PEER_CERT</tt></a></b><dd>
+<dt><b><a name='l2h-114'><tt>VERIFY_PEER</tt></a></b><dd>
+<dt><b><a name='l2h-115'><tt>VERIFY_FAIL_IF_NO_PEER_CERT</tt></a></b><dd>
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-98'><tt>FILETYPE_PEM</tt></a></b>
+<dl><dt><b><a name='l2h-99'><tt>FILETYPE_PEM</tt></a></b>
<dd>
-<dt><b><a name='l2h-115'><tt>FILETYPE_ASN1</tt></a></b><dd>
+<dt><b><a name='l2h-116'><tt>FILETYPE_ASN1</tt></a></b><dd>
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-99'><tt>OP_SINGLE_DH_USE</tt></a></b>
+<dl><dt><b><a name='l2h-100'><tt>OP_SINGLE_DH_USE</tt></a></b>
<dd>
-<dt><b><a name='l2h-116'><tt>OP_EPHEMERAL_RSA</tt></a></b><dd>
-<dt><b><a name='l2h-117'><tt>OP_NO_SSLv2</tt></a></b><dd>
-<dt><b><a name='l2h-118'><tt>OP_NO_SSLv3</tt></a></b><dd>
-<dt><b><a name='l2h-119'><tt>OP_NO_TLSv1</tt></a></b><dd>
+<dt><b><a name='l2h-117'><tt>OP_EPHEMERAL_RSA</tt></a></b><dd>
+<dt><b><a name='l2h-118'><tt>OP_NO_SSLv2</tt></a></b><dd>
+<dt><b><a name='l2h-119'><tt>OP_NO_SSLv3</tt></a></b><dd>
+<dt><b><a name='l2h-120'><tt>OP_NO_TLSv1</tt></a></b><dd>
Constants used with <tt class="method">set_options</tt> of Context objects.
<tt class="constant">OP_SINGLE_DH_USE</tt> means to always create a new key when using ephemeral
Diffie-Hellman. <tt class="constant">OP_EPHEMERAL_RSA</tt> means to always use ephemeral RSA keys
@@ -97,13 +97,13 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-100'><tt>ContextType</tt></a></b>
+<dl><dt><b><a name='l2h-101'><tt>ContextType</tt></a></b>
<dd>
A Python type object representing the Context object type.
</dl>
<P>
-<dl><dt><b><a name='l2h-101'><tt class='function'>Context</tt></a></b>(<var>method</var>)
+<dl><dt><b><a name='l2h-102'><tt class='function'>Context</tt></a></b>(<var>method</var>)
<dd>
Factory function that creates a new Context object given an SSL method. The
method should be <tt class="constant">SSLv2_METHOD</tt>, <tt class="constant">SSLv3_METHOD</tt>,
@@ -111,21 +111,21 @@
</dl>
<P>
-<dl><dt><b><a name='l2h-102'><tt>ConnectionType</tt></a></b>
+<dl><dt><b><a name='l2h-103'><tt>ConnectionType</tt></a></b>
<dd>
A Python type object representing the Connection object type.
</dl>
<P>
-<dl><dt><b><a name='l2h-103'><tt class='function'>Connection</tt></a></b>(<var>context, socket</var>)
+<dl><dt><b><a name='l2h-104'><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="#foot955"><SUP>4</SUP></A> object.
+ HREF="#foot959"><SUP>4</SUP></A> object.
</dl>
<P>
-<dl><dt><b>exception <a name='l2h-104'><tt class='exception'>Error</tt></a></b>
+<dl><dt><b>exception <a name='l2h-105'><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.
@@ -139,7 +139,7 @@
</dl>
<P>
-<dl><dt><b>exception <a name='l2h-105'><tt class='exception'>ZeroReturnError</tt></a></b>
+<dl><dt><b>exception <a name='l2h-106'><tt class='exception'>ZeroReturnError</tt></a></b>
<dd>
This exception matches the error return code <code>SSL_ERROR_ZERO_RETURN</code>, and
is raised when the SSL Connection has been closed. In SSL 3.0 and TLS 1.0, this
@@ -153,7 +153,7 @@
</dl>
<P>
-<dl><dt><b>exception <a name='l2h-106'><tt class='exception'>WantReadError</tt></a></b>
+<dl><dt><b>exception <a name='l2h-107'><tt class='exception'>WantReadError</tt></a></b>
<dd>
The operation did not complete; the same I/O method should be called again
later, with the same arguments. Any I/O method can lead to this since new
@@ -161,13 +161,13 @@
</dl>
<P>
-<dl><dt><b>exception <a name='l2h-107'><tt class='exception'>WantWriteError</tt></a></b>
+<dl><dt><b>exception <a name='l2h-108'><tt class='exception'>WantWriteError</tt></a></b>
<dd>
See <tt class="exception">WantReadError</tt>.
</dl>
<P>
-<dl><dt><b>exception <a name='l2h-108'><tt class='exception'>WantX509LookupError</tt></a></b>
+<dl><dt><b>exception <a name='l2h-109'><tt class='exception'>WantX509LookupError</tt></a></b>
<dd>
The operation did not complete because an application callback has asked to be
called again. The I/O method should be called again later, with the same
@@ -176,7 +176,7 @@
</dl>
<P>
-<dl><dt><b>exception <a name='l2h-109'><tt class='exception'>SysCallError</tt></a></b>
+<dl><dt><b>exception <a name='l2h-110'><tt class='exception'>SysCallError</tt></a></b>
<dd>
The <tt class="exception">SysCallError</tt> occurs when there's an I/O error and OpenSSL's
error queue does not contain any information. This can mean two things: An
@@ -188,7 +188,7 @@
<P>
<BR><HR><H4>Footnotes</H4>
<DL>
-<DT><A NAME="foot955">... socket</A><A
+<DT><A NAME="foot959">... 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
diff --git a/doc/html/openssl-x509name.html b/doc/html/openssl-x509name.html
index 2cf0351..6708f17 100644
--- a/doc/html/openssl-x509name.html
+++ b/doc/html/openssl-x509name.html
@@ -65,52 +65,58 @@
</dl>
<P>
+<dl><dt><b><a name='l2h-57'><tt class='method'>get_components</tt></a></b>()
+<dd>
+Return a list of two-tuples of strings giving the components of the name.
+</dl>
+
+<P>
X509Name objects have the following members:
<P>
-<dl><dt><b><a name='l2h-57'><tt class='member'>countryName</tt></a></b>
+<dl><dt><b><a name='l2h-58'><tt class='member'>countryName</tt></a></b>
<dd>
The country of the entity. <code>C</code> may be used as an alias for
<code>countryName</code>.
</dl>
<P>
-<dl><dt><b><a name='l2h-58'><tt class='member'>stateOrProvinceName</tt></a></b>
+<dl><dt><b><a name='l2h-59'><tt class='member'>stateOrProvinceName</tt></a></b>
<dd>
The state or province of the entity. <code>ST</code> may be used as an alias for
<code>stateOrProvinceName</code>·
</dl>
<P>
-<dl><dt><b><a name='l2h-59'><tt class='member'>localityName</tt></a></b>
+<dl><dt><b><a name='l2h-60'><tt class='member'>localityName</tt></a></b>
<dd>
The locality of the entity. <code>L</code> may be used as an alias for
<code>localityName</code>.
</dl>
<P>
-<dl><dt><b><a name='l2h-60'><tt class='member'>organizationName</tt></a></b>
+<dl><dt><b><a name='l2h-61'><tt class='member'>organizationName</tt></a></b>
<dd>
The organization name of the entity. <code>O</code> may be used as an alias for
<code>organizationName</code>.
</dl>
<P>
-<dl><dt><b><a name='l2h-61'><tt class='member'>organizationalUnitName</tt></a></b>
+<dl><dt><b><a name='l2h-62'><tt class='member'>organizationalUnitName</tt></a></b>
<dd>
The organizational unit of the entity. <code>OU</code> may be used as an alias for
<code>organizationalUnitName</code>.
</dl>
<P>
-<dl><dt><b><a name='l2h-62'><tt class='member'>commonName</tt></a></b>
+<dl><dt><b><a name='l2h-63'><tt class='member'>commonName</tt></a></b>
<dd>
The common name of the entity. <code>CN</code> may be used as an alias for
<code>commonName</code>.
</dl>
<P>
-<dl><dt><b><a name='l2h-63'><tt class='member'>emailAddress</tt></a></b>
+<dl><dt><b><a name='l2h-64'><tt class='member'>emailAddress</tt></a></b>
<dd>
The e-mail address of the entity.
</dl>
diff --git a/doc/html/openssl-x509req.html b/doc/html/openssl-x509req.html
index 6e69444..d8a66fb 100644
--- a/doc/html/openssl-x509req.html
+++ b/doc/html/openssl-x509req.html
@@ -52,32 +52,32 @@
X509Req objects have the following methods:
<P>
-<dl><dt><b><a name='l2h-64'><tt class='method'>get_pubkey</tt></a></b>()
+<dl><dt><b><a name='l2h-65'><tt class='method'>get_pubkey</tt></a></b>()
<dd>
Return a PKey object representing the public key of the certificate request.
</dl>
<P>
-<dl><dt><b><a name='l2h-65'><tt class='method'>get_subject</tt></a></b>()
+<dl><dt><b><a name='l2h-66'><tt class='method'>get_subject</tt></a></b>()
<dd>
Return an X509Name object representing the subject of the certificate.
</dl>
<P>
-<dl><dt><b><a name='l2h-66'><tt class='method'>set_pubkey</tt></a></b>(<var>pkey</var>)
+<dl><dt><b><a name='l2h-67'><tt class='method'>set_pubkey</tt></a></b>(<var>pkey</var>)
<dd>
Set the public key of the certificate request to <var>pkey</var>.
</dl>
<P>
-<dl><dt><b><a name='l2h-67'><tt class='method'>sign</tt></a></b>(<var>pkey, digest</var>)
+<dl><dt><b><a name='l2h-68'><tt class='method'>sign</tt></a></b>(<var>pkey, digest</var>)
<dd>
Sign the certificate request, using the key <var>pkey</var> and the message digest
algorithm identified by the string <var>digest</var>.
</dl>
<P>
-<dl><dt><b><a name='l2h-68'><tt class='method'>verify</tt></a></b>(<var>pkey</var>)
+<dl><dt><b><a name='l2h-69'><tt class='method'>verify</tt></a></b>(<var>pkey</var>)
<dd>
Verify a certificate request using the public key <var>pkey</var>.
</dl>
diff --git a/doc/html/openssl-x509store.html b/doc/html/openssl-x509store.html
index 2e55e95..2e8ed6a 100644
--- a/doc/html/openssl-x509store.html
+++ b/doc/html/openssl-x509store.html
@@ -52,7 +52,7 @@
The X509Store object has currently just one method:
<P>
-<dl><dt><b><a name='l2h-69'><tt class='method'>add_cert</tt></a></b>(<var>cert</var>)
+<dl><dt><b><a name='l2h-70'><tt class='method'>add_cert</tt></a></b>(<var>cert</var>)
<dd>
Add the certificate <var>cert</var> to the certificate store.
</dl>
diff --git a/doc/pyOpenSSL.ps b/doc/pyOpenSSL.ps
index 5dfabb9..2f09de7 100644
--- a/doc/pyOpenSSL.ps
+++ b/doc/pyOpenSSL.ps
@@ -1,7 +1,7 @@
%!PS-Adobe-2.0
%%Creator: dvips(k) 5.96.1 Copyright 2007 Radical Eye Software
%%Title: pyOpenSSL.dvi
-%%CreationDate: Tue Mar 25 15:20:01 2008
+%%CreationDate: Wed Mar 26 21:06:18 2008
%%Pages: 15
%%PageOrder: Ascend
%%BoundingBox: 0 0 595 842
@@ -10,7 +10,7 @@
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -N0 -o pyOpenSSL.ps pyOpenSSL
%DVIPSParameters: dpi=600
-%DVIPSSource: TeX output 2008.03.25:1520
+%DVIPSSource: TeX output 2008.03.26:2106
%%BeginProcSet: tex.pro 0 0
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -4571,7 +4571,7 @@
TeXDict begin 1 0 bop 0 83 3901 9 v 1890 451 a Fu(Python)64
b(Op)5 b(enSSL)64 b(Manual)3348 619 y Ft(Release)33 b(0.7a2)3189
974 y Fs(Ma)m(rtin)k(Sj\366gren)3342 1328 y Fr(Marc)n(h)26
-b(25,)h(2008)3301 1475 y Fq(ma)n(rtin@strakt.com)1781
+b(26,)h(2008)3301 1475 y Fq(ma)n(rtin@strakt.com)1781
1697 y Fp(Abstract)208 1841 y Fo(This)32 b(mo)r(dule)f(is)h(a)g(rather)
g(thin)f(wrapp)r(er)h(around)g(\(a)g(subset)f(of)6 b(\))32
b(the)g(Op)r(enSSL)e(library)-6 b(.)52 b(With)32 b(thin)f(wrapp)r(er)
@@ -4907,649 +4907,651 @@
(teger)f(giving)g(the)i(\034rst)f(four)g(b)n(ytes)f(of)h(the)h(MD5)f
(digest)g(of)g(the)h(DER)g(represen)n(tation)e(of)h(the)g(name.)0
4329 y Fm(der\(\))208 4429 y Fr(Return)j(a)g(string)g(giving)g(the)h
-(DER)h(represen)n(tation)c(of)j(the)g(name.)0 4576 y(X509Name)e(ob)5
-b(jects)27 b(ha)n(v)n(e)g(the)h(follo)n(wing)e(mem)n(b)r(ers:)0
-4722 y Fm(countryName)208 4822 y Fr(The)h(coun)n(try)g(of)g(the)h(en)n
-(tit)n(y)-7 b(.)37 b Fm(C)27 b Fr(ma)n(y)g(b)r(e)h(used)g(as)f(an)g
-(alias)f(for)h Fm(countryName)p Fr(.)0 4969 y Fm(stateOrProvinceN)o(am)
-o(e)208 5069 y Fr(The)g(state)h(or)e(pro)n(vince)g(of)i(the)g(en)n(tit)
-n(y)-7 b(.)37 b Fm(ST)27 b Fr(ma)n(y)f(b)r(e)i(used)g(as)f(an)g(alias)g
-(for)g Fm(stateOrProvince)o(Na)o(me)p Fr(\267)0 5215
-y Fm(localityName)208 5315 y Fr(The)g(lo)r(calit)n(y)g(of)h(the)f(en)n
-(tit)n(y)-7 b(.)37 b Fm(L)28 b Fr(ma)n(y)e(b)r(e)i(used)g(as)f(an)g
-(alias)g(for)g Fm(localityName)p Fr(.)p 0 5549 3901 4
-v 0 5649 a Fg(6)2239 b(3)83 b Fm(OpenSSL)24 b Fg(\026)k(Python)f
+(DER)h(represen)n(tation)c(of)j(the)g(name.)0 4576 y
+Fm(get_components\(\))208 4675 y Fr(Return)f(a)g(list)h(of)g(t)n(w)n
+(o-tuples)e(of)i(strings)e(giving)h(the)h(comp)r(onen)n(ts)f(of)h(the)g
+(name.)0 4822 y(X509Name)e(ob)5 b(jects)27 b(ha)n(v)n(e)g(the)h(follo)n
+(wing)e(mem)n(b)r(ers:)0 4969 y Fm(countryName)208 5069
+y Fr(The)h(coun)n(try)g(of)g(the)h(en)n(tit)n(y)-7 b(.)37
+b Fm(C)27 b Fr(ma)n(y)g(b)r(e)h(used)g(as)f(an)g(alias)f(for)h
+Fm(countryName)p Fr(.)0 5215 y Fm(stateOrProvinceN)o(am)o(e)208
+5315 y Fr(The)g(state)h(or)e(pro)n(vince)g(of)i(the)g(en)n(tit)n(y)-7
+b(.)37 b Fm(ST)27 b Fr(ma)n(y)f(b)r(e)i(used)g(as)f(an)g(alias)g(for)g
+Fm(stateOrProvince)o(Na)o(me)p Fr(\267)p 0 5549 3901
+4 v 0 5649 a Fg(6)2239 b(3)83 b Fm(OpenSSL)24 b Fg(\026)k(Python)f
(interface)h(to)f(Op)r(enSSL)p eop end
%%Page: 7 7
-TeXDict begin 7 6 bop 0 83 a Fm(organizationName)208
-183 y Fr(The)27 b(organization)e(name)j(of)f(the)h(en)n(tit)n(y)-7
+TeXDict begin 7 6 bop 0 83 a Fm(localityName)208 183
+y Fr(The)27 b(lo)r(calit)n(y)g(of)h(the)f(en)n(tit)n(y)-7
+b(.)37 b Fm(L)28 b Fr(ma)n(y)e(b)r(e)i(used)g(as)f(an)g(alias)g(for)g
+Fm(localityName)p Fr(.)0 330 y Fm(organizationName)208
+429 y Fr(The)g(organization)e(name)j(of)f(the)h(en)n(tit)n(y)-7
b(.)37 b Fm(O)27 b Fr(ma)n(y)g(b)r(e)h(used)g(as)e(an)i(alias)e(for)h
-Fm(organizationName)p Fr(.)0 330 y Fm(organizationalUn)o(it)o(Nam)o(e)
-208 429 y Fr(The)g(organizational)e(unit)j(of)g(the)g(en)n(tit)n(y)-7
+Fm(organizationName)p Fr(.)0 576 y Fm(organizationalUn)o(it)o(Nam)o(e)
+208 676 y Fr(The)g(organizational)e(unit)j(of)g(the)g(en)n(tit)n(y)-7
b(.)36 b Fm(OU)27 b Fr(ma)n(y)g(b)r(e)h(used)g(as)f(an)g(alias)f(for)h
-Fm(organizationalUni)o(tN)o(am)o(e)p Fr(.)0 576 y Fm(commonName)208
-676 y Fr(The)g(common)g(name)h(of)f(the)h(en)n(tit)n(y)-7
+Fm(organizationalUni)o(tN)o(am)o(e)p Fr(.)0 823 y Fm(commonName)208
+922 y Fr(The)g(common)g(name)h(of)f(the)h(en)n(tit)n(y)-7
b(.)37 b Fm(CN)27 b Fr(ma)n(y)f(b)r(e)i(used)g(as)f(an)g(alias)g(for)g
-Fm(commonName)p Fr(.)0 823 y Fm(emailAddress)208 922
+Fm(commonName)p Fr(.)0 1069 y Fm(emailAddress)208 1169
y Fr(The)g(e-mail)g(address)f(of)i(the)g(en)n(tit)n(y)-7
-b(.)0 1185 y Fg(X509Req)26 b(objects)0 1386 y Fr(X509Req)g(ob)5
+b(.)0 1432 y Fg(X509Req)26 b(objects)0 1632 y Fr(X509Req)g(ob)5
b(jects)27 b(ha)n(v)n(e)g(the)h(follo)n(wing)e(metho)r(ds:)0
-1532 y Fm(get_pubkey\(\))208 1632 y Fr(Return)h(a)g(PKey)h(ob)5
+1779 y Fm(get_pubkey\(\))208 1879 y Fr(Return)h(a)g(PKey)h(ob)5
b(ject)27 b(represen)n(ting)f(the)i(public)g(k)n(ey)f(of)g(the)h
-(certi\034cate)f(request.)0 1779 y Fm(get_subject\(\))208
-1879 y Fr(Return)g(an)h(X509Name)e(ob)5 b(ject)27 b(represen)n(ting)f
+(certi\034cate)f(request.)0 2025 y Fm(get_subject\(\))208
+2125 y Fr(Return)g(an)h(X509Name)e(ob)5 b(ject)27 b(represen)n(ting)f
(the)i(sub)5 b(ject)28 b(of)f(the)h(certi\034cate.)0
-2025 y Fm(set_pubkey\()p Fd(pkey)7 b Fm(\))208 2125 y
+2272 y Fm(set_pubkey\()p Fd(pkey)7 b Fm(\))208 2372 y
Fr(Set)28 b(the)f(public)h(k)n(ey)f(of)h(the)g(certi\034cate)f(request)
-g(to)g Fd(pkey)7 b Fr(.)0 2272 y Fm(sign\()p Fd(pkey,)29
-b(digest)8 b Fm(\))208 2372 y Fr(Sign)36 b(the)g(certi\034cate)g
+g(to)g Fd(pkey)7 b Fr(.)0 2518 y Fm(sign\()p Fd(pkey,)29
+b(digest)8 b Fm(\))208 2618 y Fr(Sign)36 b(the)g(certi\034cate)g
(request,)h(using)f(the)g(k)n(ey)h Fd(pkey)45 b Fr(and)36
b(the)g(message)f(digest)g(algorithm)g(iden)n(ti\034ed)i(b)n(y)f(the)
-208 2471 y(string)28 b Fd(digest)8 b Fr(.)0 2618 y Fm(verify\()p
-Fd(pkey)f Fm(\))208 2718 y Fr(V)-7 b(erify)27 b(a)g(certi\034cate)g
+208 2718 y(string)28 b Fd(digest)8 b Fr(.)0 2865 y Fm(verify\()p
+Fd(pkey)f Fm(\))208 2964 y Fr(V)-7 b(erify)27 b(a)g(certi\034cate)g
(request)g(using)g(the)h(public)g(k)n(ey)g Fd(pkey)7
-b Fr(.)0 2981 y Fg(X509Sto)n(re)26 b(objects)0 3181 y
+b Fr(.)0 3227 y Fg(X509Sto)n(re)26 b(objects)0 3428 y
Fr(The)i(X509Store)d(ob)5 b(ject)28 b(has)f(curren)n(tly)f(just)i(one)g
-(metho)r(d:)0 3328 y Fm(add_cert\()p Fd(c)l(ert)8 b Fm(\))208
-3428 y Fr(A)n(dd)27 b(the)h(certi\034cate)f Fd(c)l(ert)36
-b Fr(to)27 b(the)h(certi\034cate)f(store.)0 3691 y Fg(PKey)g(objects)0
-3891 y Fr(The)h(PKey)f(ob)5 b(ject)27 b(has)g(the)h(follo)n(wing)f
-(metho)r(ds:)0 4038 y Fm(bits\(\))208 4138 y Fr(Return)g(the)h(n)n(um)n
-(b)r(er)f(of)h(bits)g(of)f(the)h(k)n(ey)-7 b(.)0 4285
+(metho)r(d:)0 3575 y Fm(add_cert\()p Fd(c)l(ert)8 b Fm(\))208
+3674 y Fr(A)n(dd)27 b(the)h(certi\034cate)f Fd(c)l(ert)36
+b Fr(to)27 b(the)h(certi\034cate)f(store.)0 3937 y Fg(PKey)g(objects)0
+4138 y Fr(The)h(PKey)f(ob)5 b(ject)27 b(has)g(the)h(follo)n(wing)f
+(metho)r(ds:)0 4285 y Fm(bits\(\))208 4384 y Fr(Return)g(the)h(n)n(um)n
+(b)r(er)f(of)h(bits)g(of)f(the)h(k)n(ey)-7 b(.)0 4531
y Fm(generate_key\()p Fd(typ)l(e,)25 b(bits)7 b Fm(\))208
-4384 y Fr(Generate)22 b(a)h(public/priv)-5 b(ate)23 b(k)n(ey)f(pair)h
+4631 y Fr(Generate)22 b(a)h(public/priv)-5 b(ate)23 b(k)n(ey)f(pair)h
(of)g(the)h(t)n(yp)r(e)f Fd(typ)l(e)30 b Fr(\(one)23
b(of)30 b Fm(TYPE_RSA)19 b Fr(and)24 b Fm(TYPE_DSA)p
-Fr(\))c(with)j(the)h(size)f Fd(bits)7 b Fr(.)0 4531 y
-Fm(type\(\))208 4631 y Fr(Return)27 b(the)h(t)n(yp)r(e)g(of)f(the)h(k)n
-(ey)-7 b(.)0 4894 y Fg(PK)n(CS7)27 b(objects)0 5094 y
+Fr(\))c(with)j(the)h(size)f Fd(bits)7 b Fr(.)0 4778 y
+Fm(type\(\))208 4877 y Fr(Return)27 b(the)h(t)n(yp)r(e)g(of)f(the)h(k)n
+(ey)-7 b(.)0 5140 y Fg(PK)n(CS7)27 b(objects)0 5341 y
Fr(PK)n(CS7)g(ob)5 b(jects)27 b(ha)n(v)n(e)f(the)i(follo)n(wing)f
-(metho)r(ds:)0 5241 y Fm(type_is_signed\(\))208 5341
-y Fr(FIXME)p 0 5549 3901 4 v 0 5649 a Fg(3.1)82 b Fm(crypto)25
+(metho)r(ds:)p 0 5549 3901 4 v 0 5649 a Fg(3.1)82 b Fm(crypto)25
b Fg(\026)j(Generic)g(cryptographic)e(mo)r(dule)2234
b(7)p eop end
%%Page: 8 8
-TeXDict begin 8 7 bop 0 83 a Fm(type_is_envelope)o(d\()o(\))208
-183 y Fr(FIXME)0 330 y Fm(type_is_signedAn)o(dE)o(nve)o(lo)o(pe)o
-(d\(\))208 429 y Fr(FIXME)0 576 y Fm(type_is_data\(\))208
-676 y Fr(FIXME)0 823 y Fm(get_type_name\(\))208 922 y
-Fr(Get)28 b(the)f(t)n(yp)r(e)h(name)g(of)f(the)h(PK)n(CS7.)0
-1185 y Fg(PK)n(CS12)e(objects)0 1386 y Fr(PK)n(CS12)g(ob)5
+TeXDict begin 8 7 bop 0 83 a Fm(type_is_signed\(\))208
+183 y Fr(FIXME)0 330 y Fm(type_is_envelope)o(d\()o(\))208
+429 y Fr(FIXME)0 576 y Fm(type_is_signedAn)o(dE)o(nve)o(lo)o(pe)o
+(d\(\))208 676 y Fr(FIXME)0 823 y Fm(type_is_data\(\))208
+922 y Fr(FIXME)0 1069 y Fm(get_type_name\(\))208 1169
+y Fr(Get)28 b(the)f(t)n(yp)r(e)h(name)g(of)f(the)h(PK)n(CS7.)0
+1432 y Fg(PK)n(CS12)e(objects)0 1632 y Fr(PK)n(CS12)g(ob)5
b(jects)28 b(ha)n(v)n(e)e(the)i(follo)n(wing)e(metho)r(ds:)0
-1532 y Fm(get_certificate\()o(\))208 1632 y Fr(Return)h(certi\034cate)g
-(p)r(ortion)g(of)h(the)g(PK)n(CS12)e(structure.)0 1779
-y Fm(get_privatekey\(\))208 1879 y Fr(Return)h(priv)-5
+1779 y Fm(get_certificate\()o(\))208 1879 y Fr(Return)h(certi\034cate)g
+(p)r(ortion)g(of)h(the)g(PK)n(CS12)e(structure.)0 2025
+y Fm(get_privatekey\(\))208 2125 y Fr(Return)h(priv)-5
b(ate)27 b(k)n(ey)g(p)r(ortion)g(of)h(the)g(PK)n(CS12)e(structure)0
-2025 y Fm(get_ca_certifica)o(te)o(s\(\))208 2125 y Fr(Return)k(CA)g
+2272 y Fm(get_ca_certifica)o(te)o(s\(\))208 2372 y Fr(Return)k(CA)g
(certi\034cates)f(within)i(the)f(PK)n(CS12)f(ob)5 b(ject)30
b(as)f(a)g(tuple.)45 b(Returns)30 b(None)g(if)g(no)g(CA)g
-(certi\034cates)f(are)208 2225 y(presen)n(t.)0 2488 y
-Fg(X509Extension)c(objects)0 2688 y Fr(X509Extension)h(ob)5
+(certi\034cates)f(are)208 2471 y(presen)n(t.)0 2734 y
+Fg(X509Extension)c(objects)0 2935 y Fr(X509Extension)h(ob)5
b(jects)27 b(curren)n(tly)g(only)g(ha)n(v)n(e)f(one)i(metho)r(d:)0
-2835 y Fm(get_critical\(\))208 2935 y Fr(Return)f(the)h(critical)f
-(\034eld)h(of)f(the)h(extension)f(ob)5 b(ject.)0 3198
-y Fg(Netscap)r(eSPKI)27 b(objects)0 3398 y Fr(Netscap)r(eSPKI)h(ob)5
+3082 y Fm(get_critical\(\))208 3181 y Fr(Return)f(the)h(critical)f
+(\034eld)h(of)f(the)h(extension)f(ob)5 b(ject.)0 3444
+y Fg(Netscap)r(eSPKI)27 b(objects)0 3645 y Fr(Netscap)r(eSPKI)h(ob)5
b(jects)27 b(ha)n(v)n(e)f(the)i(follo)n(wing)e(metho)r(ds:)0
-3545 y Fm(b64_encode\(\))208 3645 y Fr(Return)h(a)g(base64-enco)r(ded)f
+3792 y Fm(b64_encode\(\))208 3891 y Fr(Return)h(a)g(base64-enco)r(ded)f
(string)h(represen)n(tation)e(of)j(the)g(ob)5 b(ject.)0
-3792 y Fm(get_pubkey\(\))208 3891 y Fr(Return)27 b(the)h(public)g(k)n
-(ey)f(of)h(ob)5 b(ject.)0 4038 y Fm(set_pubkey\()p Fd(key)i
-Fm(\))208 4138 y Fr(Set)28 b(the)f(public)h(k)n(ey)f(of)h(the)g(ob)5
-b(ject)27 b(to)h Fd(key)7 b Fr(.)0 4285 y Fm(sign\()p
-Fd(key,)29 b(digest_name)6 b Fm(\))208 4384 y Fr(Sign)27
+4038 y Fm(get_pubkey\(\))208 4138 y Fr(Return)27 b(the)h(public)g(k)n
+(ey)f(of)h(ob)5 b(ject.)0 4285 y Fm(set_pubkey\()p Fd(key)i
+Fm(\))208 4384 y Fr(Set)28 b(the)f(public)h(k)n(ey)f(of)h(the)g(ob)5
+b(ject)27 b(to)h Fd(key)7 b Fr(.)0 4531 y Fm(sign\()p
+Fd(key,)29 b(digest_name)6 b Fm(\))208 4631 y Fr(Sign)27
b(the)h(Netscap)r(eSPKI)g(ob)5 b(ject)27 b(using)g(the)h(giv)n(en)f
-Fd(key)35 b Fr(and)28 b Fd(digest_name)6 b Fr(.)0 4531
-y Fm(verify\()p Fd(key)h Fm(\))208 4631 y Fr(V)-7 b(erify)27
+Fd(key)35 b Fr(and)28 b Fd(digest_name)6 b Fr(.)0 4778
+y Fm(verify\()p Fd(key)h Fm(\))208 4877 y Fr(V)-7 b(erify)27
b(the)h(Netscap)r(eSPKI)g(ob)5 b(ject)27 b(using)g(the)h(giv)n(en)f
-Fd(key)7 b Fr(.)0 4910 y Fk(3.2)97 b Fe(rand)34 b Fk(\026)e(An)h
+Fd(key)7 b Fr(.)0 5157 y Fk(3.2)97 b Fe(rand)34 b Fk(\026)e(An)h
(interface)g(to)g(the)g(Op)s(enSSL)f(pseudo)h(random)g(numb)s(er)g
-(generato)m(r)0 5111 y Fr(This)28 b(mo)r(dule)f(handles)h(the)f(Op)r
+(generato)m(r)0 5357 y Fr(This)28 b(mo)r(dule)f(handles)h(the)f(Op)r
(enSSL)h(pseudo)f(random)g(n)n(um)n(b)r(er)g(generator)f(\(PRNG\))j
-(and)e(declares)f(the)i(follo)n(wing:)0 5258 y Fm(add\()p
-Fd(string,)g(entr)l(opy)7 b Fm(\))208 5357 y Fr(Mix)22
-b(b)n(ytes)g(from)g Fd(string)30 b Fr(in)n(to)22 b(the)h(PRNG)h(state.)
-35 b(The)22 b Fd(entr)l(opy)30 b Fr(argumen)n(t)22 b(is)g(\(the)h(lo)n
-(w)n(er)e(b)r(ound)i(of)6 b(\))23 b(an)f(estimate)p 0
-5549 3901 4 v 0 5649 a Fg(8)2239 b(3)83 b Fm(OpenSSL)24
-b Fg(\026)k(Python)f(interface)h(to)f(Op)r(enSSL)p eop
-end
+(and)e(declares)f(the)i(follo)n(wing:)p 0 5549 3901 4
+v 0 5649 a Fg(8)2239 b(3)83 b Fm(OpenSSL)24 b Fg(\026)k(Python)f
+(interface)h(to)f(Op)r(enSSL)p eop end
%%Page: 9 9
-TeXDict begin 9 8 bop 208 83 a Fr(of)21 b(ho)n(w)g(m)n(uc)n(h)h
-(randomness)e(is)h(con)n(tained)g(in)h Fd(string)7 b
-Fr(,)23 b(measured)e(in)h(b)n(ytes.)34 b(F)-7 b(or)21
-b(more)g(information,)h(see)g(e.g.)34 b(RF)n(C)208 183
-y(1750.)0 330 y Fm(egd\()p Fd(p)l(ath)6 b Fc([)p Fd(,)29
-b(bytes)19 b Fc(])p Fm(\))208 429 y Fr(Query)29 b(the)j(En)n(trop)n(y)e
-(Gathering)g(Daemon)1629 399 y Fl(3)1697 429 y Fr(on)h(so)r(c)n(k)n(et)
-f Fd(p)l(ath)38 b Fr(for)30 b Fd(bytes)38 b Fr(b)n(ytes)31
-b(of)g(random)f(data)g(and)h(and)g(uses)208 529 y Fm(add)26
-b Fr(to)h(seed)h(the)g(PRNG.)g(The)g(default)g(v)-5 b(alue)27
-b(of)34 b Fd(bytes)h Fr(is)27 b(255.)0 690 y Fm(load_file\()p
-Fd(p)l(ath)6 b Fc([)p Fd(,)26 b(bytes)19 b Fc(])p Fm(\))208
-790 y Fr(Read)29 b Fd(bytes)38 b Fr(b)n(ytes)30 b(\(or)f(all)h(of)g
-(it,)i(if)37 b Fd(bytes)g Fr(is)31 b(negativ)n(e\))e(of)h(data)g(from)g
-(the)g(\034le)h Fd(p)l(ath)37 b Fr(to)30 b(seed)g(the)h(PRNG.)g(The)208
-889 y(default)d(v)-5 b(alue)27 b(of)34 b Fd(bytes)h Fr(is)27
-b(-1.)0 1036 y Fm(screen\(\))208 1136 y Fr(A)n(dd)g(the)h(curren)n(t)f
-(con)n(ten)n(ts)g(of)g(the)h(screen)f(to)g(the)h(PRNG)h(state.)37
-b(A)-9 b(v)k(ailabilit)n(y:)36 b(Windo)n(ws.)0 1283 y
-Fm(seed\()p Fd(string)7 b Fm(\))208 1382 y Fr(This)27
+TeXDict begin 9 8 bop 0 83 a Fm(add\()p Fd(string,)28
+b(entr)l(opy)7 b Fm(\))208 183 y Fr(Mix)22 b(b)n(ytes)g(from)g
+Fd(string)30 b Fr(in)n(to)22 b(the)h(PRNG)h(state.)35
+b(The)22 b Fd(entr)l(opy)30 b Fr(argumen)n(t)22 b(is)g(\(the)h(lo)n(w)n
+(er)e(b)r(ound)i(of)6 b(\))23 b(an)f(estimate)208 282
+y(of)f(ho)n(w)g(m)n(uc)n(h)h(randomness)e(is)h(con)n(tained)g(in)h
+Fd(string)7 b Fr(,)23 b(measured)e(in)h(b)n(ytes.)34
+b(F)-7 b(or)21 b(more)g(information,)h(see)g(e.g.)34
+b(RF)n(C)208 382 y(1750.)0 529 y Fm(egd\()p Fd(p)l(ath)6
+b Fc([)p Fd(,)29 b(bytes)19 b Fc(])p Fm(\))208 628 y
+Fr(Query)29 b(the)j(En)n(trop)n(y)e(Gathering)g(Daemon)1629
+598 y Fl(3)1697 628 y Fr(on)h(so)r(c)n(k)n(et)f Fd(p)l(ath)38
+b Fr(for)30 b Fd(bytes)38 b Fr(b)n(ytes)31 b(of)g(random)f(data)g(and)h
+(and)g(uses)208 728 y Fm(add)26 b Fr(to)h(seed)h(the)g(PRNG.)g(The)g
+(default)g(v)-5 b(alue)27 b(of)34 b Fd(bytes)h Fr(is)27
+b(255.)0 889 y Fm(load_file\()p Fd(p)l(ath)6 b Fc([)p
+Fd(,)26 b(bytes)19 b Fc(])p Fm(\))208 989 y Fr(Read)29
+b Fd(bytes)38 b Fr(b)n(ytes)30 b(\(or)f(all)h(of)g(it,)i(if)37
+b Fd(bytes)g Fr(is)31 b(negativ)n(e\))e(of)h(data)g(from)g(the)g
+(\034le)h Fd(p)l(ath)37 b Fr(to)30 b(seed)g(the)h(PRNG.)g(The)208
+1089 y(default)d(v)-5 b(alue)27 b(of)34 b Fd(bytes)h
+Fr(is)27 b(-1.)0 1235 y Fm(screen\(\))208 1335 y Fr(A)n(dd)g(the)h
+(curren)n(t)f(con)n(ten)n(ts)g(of)g(the)h(screen)f(to)g(the)h(PRNG)h
+(state.)37 b(A)-9 b(v)k(ailabilit)n(y:)36 b(Windo)n(ws.)0
+1482 y Fm(seed\()p Fd(string)7 b Fm(\))208 1582 y Fr(This)27
b(is)h(equiv)-5 b(alen)n(t)27 b(to)g(calling)h Fm(add)f
Fr(with)h Fd(entr)l(opy)35 b Fr(as)27 b(the)h(length)f(of)h(the)g
-(string.)0 1529 y Fm(status\(\))208 1629 y Fr(Returns)f(true)g(if)i
+(string.)0 1728 y Fm(status\(\))208 1828 y Fr(Returns)f(true)g(if)i
(the)e(PRNG)i(has)e(b)r(een)h(seeded)f(with)h(enough)f(data,)g(and)h
-(false)f(otherwise.)0 1776 y Fm(write_file\()p Fd(p)l(ath)6
-b Fm(\))208 1875 y Fr(W)-7 b(rite)34 b(a)g(n)n(um)n(b)r(er)g(of)h
+(false)f(otherwise.)0 1975 y Fm(write_file\()p Fd(p)l(ath)6
+b Fm(\))208 2075 y Fr(W)-7 b(rite)34 b(a)g(n)n(um)n(b)r(er)g(of)h
(random)e(b)n(ytes)h(\(curren)n(tly)g(1024\))f(to)h(the)h(\034le)f
Fd(p)l(ath)6 b Fr(.)59 b(This)34 b(\034le)h(can)f(then)g(b)r(e)h(used)g
-(with)208 1975 y Fm(load_file)23 b Fr(to)28 b(seed)f(the)h(PRNG)h
-(again.)0 2255 y Fk(3.3)97 b Fe(SSL)33 b Fk(\026)f(An)h(interface)h(to)
+(with)208 2174 y Fm(load_file)23 b Fr(to)28 b(seed)f(the)h(PRNG)h
+(again.)0 2454 y Fk(3.3)97 b Fe(SSL)33 b Fk(\026)f(An)h(interface)h(to)
e(the)h(SSL-sp)s(eci\034c)h(pa)m(rts)f(of)f(Op)s(enSSL)0
-2455 y Fr(This)c(mo)r(dule)f(handles)h(things)f(sp)r(eci\034c)h(to)f
+2654 y Fr(This)c(mo)r(dule)f(handles)h(things)f(sp)r(eci\034c)h(to)f
(SSL.)h(There)f(are)f(t)n(w)n(o)h(ob)5 b(jects)27 b(de\034ned:)38
-b(Con)n(text,)27 b(Connection.)0 2602 y Fm(SSLv2_METHOD)0
-2701 y(SSLv3_METHOD)0 2801 y(SSLv23_METHOD)0 2901 y(TLSv1_METHOD)208
-3000 y Fr(These)g(constan)n(ts)f(represen)n(t)h(the)h(di\033eren)n(t)f
+b(Con)n(text,)27 b(Connection.)0 2801 y Fm(SSLv2_METHOD)0
+2901 y(SSLv3_METHOD)0 3000 y(SSLv23_METHOD)0 3100 y(TLSv1_METHOD)208
+3200 y Fr(These)g(constan)n(ts)f(represen)n(t)h(the)h(di\033eren)n(t)f
(SSL)h(metho)r(ds)g(to)f(use)h(when)f(creating)g(a)g(con)n(text)g(ob)5
-b(ject.)0 3147 y Fm(VERIFY_NONE)0 3247 y(VERIFY_PEER)0
-3346 y(VERIFY_FAIL_IF_N)o(O_)o(PEE)o(R_)o(CE)o(RT)208
-3446 y Fr(These)27 b(constan)n(ts)f(represen)n(t)h(the)h(v)n
+b(ject.)0 3346 y Fm(VERIFY_NONE)0 3446 y(VERIFY_PEER)0
+3546 y(VERIFY_FAIL_IF_N)o(O_)o(PEE)o(R_)o(CE)o(RT)208
+3645 y Fr(These)27 b(constan)n(ts)f(represen)n(t)h(the)h(v)n
(eri\034cation)e(mo)r(de)h(used)h(b)n(y)f(the)h(Con)n(text)f(ob)5
-b(ject's)27 b Fm(set_verify)d Fr(metho)r(d.)0 3593 y
-Fm(FILETYPE_PEM)0 3693 y(FILETYPE_ASN1)208 3792 y Fr(File)41
+b(ject's)27 b Fm(set_verify)d Fr(metho)r(d.)0 3792 y
+Fm(FILETYPE_PEM)0 3892 y(FILETYPE_ASN1)208 3991 y Fr(File)41
b(t)n(yp)r(e)g(constan)n(ts)f(used)h(with)g(the)h Fm(use_certificate)o
(_f)o(ile)34 b Fr(and)41 b Fm(use_privatekey_f)o(il)o(e)35
-b Fr(metho)r(ds)41 b(of)208 3892 y(Con)n(text)27 b(ob)5
-b(jects.)0 4039 y Fm(OP_SINGLE_DH_USE)0 4138 y(OP_EPHEMERAL_RSA)0
-4238 y(OP_NO_SSLv2)0 4338 y(OP_NO_SSLv3)0 4437 y(OP_NO_TLSv1)208
-4537 y Fr(Constan)n(ts)30 b(used)i(with)g Fm(set_options)26
+b Fr(metho)r(ds)41 b(of)208 4091 y(Con)n(text)27 b(ob)5
+b(jects.)0 4238 y Fm(OP_SINGLE_DH_USE)0 4338 y(OP_EPHEMERAL_RSA)0
+4437 y(OP_NO_SSLv2)0 4537 y(OP_NO_SSLv3)0 4636 y(OP_NO_TLSv1)208
+4736 y Fr(Constan)n(ts)30 b(used)i(with)g Fm(set_options)26
b Fr(of)32 b(Con)n(text)f(ob)5 b(jects.)48 b Fm(OP_SINGLE_DH_USE)25
-b Fr(means)31 b(to)g(alw)n(a)n(ys)f(create)g(a)208 4636
+b Fr(means)31 b(to)g(alw)n(a)n(ys)f(create)g(a)208 4836
y(new)19 b(k)n(ey)f(when)h(using)g(ephemeral)f(Di\036e-Hellman.)34
b Fm(OP_EPHEMERAL_RSA)13 b Fr(means)18 b(to)h(alw)n(a)n(ys)e(use)i
-(ephemeral)g(RSA)208 4736 y(k)n(eys)f(when)h(doing)f(RSA)i(op)r
+(ephemeral)g(RSA)208 4935 y(k)n(eys)f(when)h(doing)f(RSA)i(op)r
(erations.)33 b Fm(OP_NO_SSLv2)p Fr(,)16 b Fm(OP_NO_SSLv3)f
Fr(and)k Fm(OP_NO_TLSv1)14 b Fr(means)19 b(to)g(disable)f(those)208
-4836 y(sp)r(eci\034c)29 b(proto)r(cols.)39 b(This)29
+5035 y(sp)r(eci\034c)29 b(proto)r(cols.)39 b(This)29
b(is)g(in)n(teresting)g(if)g(y)n(ou're)f(using)g(e.g.)41
b Fm(SSLv23_METHOD)24 b Fr(to)29 b(get)g(an)f(SSLv2-compatible)208
-4935 y(handshak)n(e,)e(but)i(don't)g(w)n(an)n(t)f(to)g(use)h(SSLv2.)0
-5082 y Fm(ContextType)208 5182 y Fr(A)f(Python)h(t)n(yp)r(e)g(ob)5
-b(ject)28 b(represen)n(ting)d(the)j(Con)n(text)g(ob)5
-b(ject)27 b(t)n(yp)r(e.)p 0 5251 1560 4 v 92 5305 a Fi(3)127
-5328 y Fh(See)d Fq(http://www.lotha)n(r.com/tech/crypto/)p
-0 5549 3901 4 v 0 5649 a Fg(3.3)82 b Fm(SSL)26 b Fg(\026)i(An)g
-(interface)g(to)f(the)g(SSL-sp)r(eci\034c)h(pa)n(rts)f(of)h(Op)r(enSSL)
-1652 b(9)p eop end
+5135 y(handshak)n(e,)e(but)i(don't)g(w)n(an)n(t)f(to)g(use)h(SSLv2.)p
+0 5204 1560 4 v 92 5258 a Fi(3)127 5281 y Fh(See)c Fq(http://www.lotha)
+n(r.com/tech/crypto/)p 0 5549 3901 4 v 0 5649 a Fg(3.3)82
+b Fm(SSL)26 b Fg(\026)i(An)g(interface)g(to)f(the)g(SSL-sp)r(eci\034c)h
+(pa)n(rts)f(of)h(Op)r(enSSL)1652 b(9)p eop end
%%Page: 10 10
-TeXDict begin 10 9 bop 0 83 a Fm(Context\()p Fd(metho)l(d)9
-b Fm(\))208 183 y Fr(F)-7 b(actory)34 b(function)i(that)g(creates)f(a)g
-(new)h(Con)n(text)f(ob)5 b(ject)36 b(giv)n(en)e(an)i(SSL)g(metho)r(d.)
-61 b(The)36 b(metho)r(d)g(should)g(b)r(e)208 282 y Fm(SSLv2_METHOD)p
+TeXDict begin 10 9 bop 0 83 a Fm(ContextType)208 183
+y Fr(A)27 b(Python)h(t)n(yp)r(e)g(ob)5 b(ject)28 b(represen)n(ting)d
+(the)j(Con)n(text)g(ob)5 b(ject)27 b(t)n(yp)r(e.)0 330
+y Fm(Context\()p Fd(metho)l(d)9 b Fm(\))208 429 y Fr(F)-7
+b(actory)34 b(function)i(that)g(creates)f(a)g(new)h(Con)n(text)f(ob)5
+b(ject)36 b(giv)n(en)e(an)i(SSL)g(metho)r(d.)61 b(The)36
+b(metho)r(d)g(should)g(b)r(e)208 529 y Fm(SSLv2_METHOD)p
Fr(,)22 b Fm(SSLv3_METHOD)p Fr(,)h Fm(SSLv23_METHOD)f
-Fr(or)27 b Fm(TLSv1_METHOD)p Fr(.)0 429 y Fm(ConnectionType)208
-529 y Fr(A)g(Python)h(t)n(yp)r(e)g(ob)5 b(ject)28 b(represen)n(ting)d
-(the)j(Connection)f(ob)5 b(ject)28 b(t)n(yp)r(e.)0 676
+Fr(or)27 b Fm(TLSv1_METHOD)p Fr(.)0 676 y Fm(ConnectionType)208
+775 y Fr(A)g(Python)h(t)n(yp)r(e)g(ob)5 b(ject)28 b(represen)n(ting)d
+(the)j(Connection)f(ob)5 b(ject)28 b(t)n(yp)r(e.)0 922
y Fm(Connection\()p Fd(c)l(ontext,)c(so)l(cket)8 b Fm(\))208
-775 y Fr(F)-7 b(actory)26 b(fucnction)i(that)g(creates)e(a)h(new)h
+1022 y Fr(F)-7 b(actory)26 b(fucnction)i(that)g(creates)e(a)h(new)h
(Connection)f(ob)5 b(ject)27 b(giv)n(en)g(an)g(SSL)h(con)n(text)f(and)h
-(a)f(so)r(c)n(k)n(et)3538 745 y Fl(4)3603 775 y Fr(ob)5
-b(ject.)0 922 y Fn(exception)32 b Fm(Error)208 1022 y
-Fr(This)i(exception)g(is)h(used)f(as)g(a)h(base)e(class)h(for)g(the)h
+(a)f(so)r(c)n(k)n(et)3538 992 y Fl(4)3603 1022 y Fr(ob)5
+b(ject.)0 1169 y Fn(exception)32 b Fm(Error)208 1268
+y Fr(This)i(exception)g(is)h(used)f(as)g(a)h(base)e(class)h(for)g(the)h
(other)f(SSL-related)g(exceptions,)i(but)f(ma)n(y)f(also)f(b)r(e)i
-(raised)208 1121 y(directly)-7 b(.)208 1254 y(Whenev)n(er)36
+(raised)208 1368 y(directly)-7 b(.)208 1501 y(Whenev)n(er)36
b(this)h(exception)g(is)g(raised)f(directly)-7 b(,)40
b(it)d(has)g(a)f(list)i(of)f(error)e(messages)g(from)i(the)h(Op)r
-(enSSL)f(error)208 1354 y(queue,)k(where)d(eac)n(h)f(item)i(is)g(a)f
+(enSSL)f(error)208 1600 y(queue,)k(where)d(eac)n(h)f(item)i(is)g(a)f
(tuple)h Fm(\()p Fd(lib)5 b Fm(,)44 b Fd(function)6 b
Fm(,)43 b Fd(r)l(e)l(ason)6 b Fm(\))p Fr(.)70 b(Here)38
b Fd(lib)5 b Fr(,)43 b Fd(function)h Fr(and)39 b Fd(r)l(e)l(ason)45
-b Fr(are)37 b(all)208 1453 y(strings,)26 b(describing)h(where)g(and)g
+b Fr(are)37 b(all)208 1700 y(strings,)26 b(describing)h(where)g(and)g
(what)h(the)g(problem)f(is.)36 b(See)28 b Fd(err)p Fr(\(3\))g(for)f
-(more)g(information.)0 1600 y Fn(exception)32 b Fm(ZeroReturnError)208
-1700 y Fr(This)g(exception)g(matc)n(hes)g(the)h(error)d(return)i(co)r
+(more)g(information.)0 1847 y Fn(exception)32 b Fm(ZeroReturnError)208
+1946 y Fr(This)g(exception)g(matc)n(hes)g(the)h(error)d(return)i(co)r
(de)h Fm(SSL_ERROR_ZERO_)o(RE)o(TUR)o(N)p Fr(,)26 b(and)33
-b(is)f(raised)f(when)i(the)g(SSL)208 1800 y(Connection)c(has)g(b)r(een)
+b(is)f(raised)f(when)i(the)g(SSL)208 2046 y(Connection)c(has)g(b)r(een)
h(closed.)43 b(In)29 b(SSL)h(3.0)f(and)h(TLS)g(1.0,)f(this)h(only)f(o)r
(ccurs)g(if)h(a)g(closure)e(alert)h(has)g(o)r(ccurred)208
-1899 y(in)g(the)g(proto)r(col,)f(i.e.)41 b(the)29 b(connection)f(has)g
+2146 y(in)g(the)g(proto)r(col,)f(i.e.)41 b(the)29 b(connection)f(has)g
(b)r(een)i(closed)e(cleanly)-7 b(.)40 b(Note)29 b(that)g(this)g(do)r
-(es)f(not)h(necessarily)e(mean)208 1999 y(that)g(the)h(transp)r(ort)f
+(es)f(not)h(necessarily)e(mean)208 2245 y(that)g(the)h(transp)r(ort)f
(la)n(y)n(er)f(\(e.g.)36 b(a)28 b(so)r(c)n(k)n(et\))e(has)h(b)r(een)h
-(closed.)208 2132 y(It)k(ma)n(y)f(seem)h(a)f(little)i(strange)e(that)h
+(closed.)208 2378 y(It)k(ma)n(y)f(seem)h(a)f(little)i(strange)e(that)h
(this)g(is)g(an)g(exception,)g(but)h(it)f(do)r(es)g(matc)n(h)g(an)f
-Fm(SSL_ERROR)e Fr(co)r(de,)j(and)g(is)208 2231 y(v)n(ery)26
-b(con)n(v)n(enien)n(t.)0 2378 y Fn(exception)32 b Fm(WantReadError)208
-2478 y Fr(The)i(op)r(eration)e(did)j(not)f(complete;)j(the)d(same)g
+Fm(SSL_ERROR)e Fr(co)r(de,)j(and)g(is)208 2478 y(v)n(ery)26
+b(con)n(v)n(enien)n(t.)0 2625 y Fn(exception)32 b Fm(WantReadError)208
+2724 y Fr(The)i(op)r(eration)e(did)j(not)f(complete;)j(the)d(same)g
(I/O)f(metho)r(d)h(should)g(b)r(e)g(called)g(again)f(later,)i(with)f
-(the)h(same)208 2577 y(argumen)n(ts.)g(An)n(y)28 b(I/O)e(metho)r(d)i
+(the)h(same)208 2824 y(argumen)n(ts.)g(An)n(y)28 b(I/O)e(metho)r(d)i
(can)f(lead)h(to)f(this)h(since)f(new)h(handshak)n(es)e(can)h(o)r(ccur)
-g(at)g(an)n(y)g(time.)0 2724 y Fn(exception)32 b Fm(WantWriteError)208
-2824 y Fr(See)27 b Fm(WantReadError)p Fr(.)0 2971 y Fn(exception)32
-b Fm(WantX509LookupE)o(rr)o(or)208 3070 y Fr(The)24 b(op)r(eration)g
+g(at)g(an)n(y)g(time.)0 2971 y Fn(exception)32 b Fm(WantWriteError)208
+3070 y Fr(See)27 b Fm(WantReadError)p Fr(.)0 3217 y Fn(exception)32
+b Fm(WantX509LookupE)o(rr)o(or)208 3317 y Fr(The)24 b(op)r(eration)g
(did)h(not)g(complete)f(b)r(ecause)g(an)h(application)f(callbac)n(k)f
(has)h(ask)n(ed)g(to)g(b)r(e)h(called)g(again.)34 b(The)25
-b(I/O)208 3170 y(metho)r(d)f(should)h(b)r(e)f(called)g(again)g(later,)g
+b(I/O)208 3417 y(metho)r(d)f(should)h(b)r(e)f(called)g(again)g(later,)g
(with)h(the)g(same)e(argumen)n(ts.)35 b(Note:)g(This)24
-b(w)n(on't)h(o)r(ccur)e(in)i(this)g(v)n(ersion,)208 3270
+b(w)n(on't)h(o)r(ccur)e(in)i(this)g(v)n(ersion,)208 3516
y(as)h(there)i(are)e(no)i(suc)n(h)f(callbac)n(ks)f(in)i(this)f(v)n
-(ersion.)0 3417 y Fn(exception)32 b Fm(SysCallError)208
-3516 y Fr(The)25 b Fm(SysCallError)20 b Fr(o)r(ccurs)k(when)i(there's)e
+(ersion.)0 3663 y Fn(exception)32 b Fm(SysCallError)208
+3763 y Fr(The)25 b Fm(SysCallError)20 b Fr(o)r(ccurs)k(when)i(there's)e
(an)h(I/O)g(error)e(and)i(Op)r(enSSL's)g(error)e(queue)i(do)r(es)g(not)
-g(con)n(tain)g(an)n(y)208 3616 y(information.)59 b(This)36
+g(con)n(tain)g(an)n(y)208 3862 y(information.)59 b(This)36
b(can)f(mean)g(t)n(w)n(o)g(things:)52 b(An)36 b(error)d(in)j(the)g
(transp)r(ort)e(proto)r(col,)i(or)f(an)g(end)h(of)f(\034le)h(that)208
-3715 y(violates)26 b(the)i(proto)r(col.)36 b(The)27 b(parameter)f(to)i
+3962 y(violates)26 b(the)i(proto)r(col.)36 b(The)27 b(parameter)f(to)i
(the)g(exception)f(is)g(alw)n(a)n(ys)f(a)h(pair)g Fm(\()p
Fd(errnum)6 b Fm(,)42 b Fd(errstr)9 b Fm(\))p Fr(.)0
-3978 y Fg(Context)27 b(objects)0 4179 y Fr(Con)n(text)g(ob)5
+4225 y Fg(Context)27 b(objects)0 4425 y Fr(Con)n(text)g(ob)5
b(jects)27 b(ha)n(v)n(e)g(the)h(follo)n(wing)e(metho)r(ds:)0
-4326 y Fm(check_privatekey)o(\(\))208 4442 y Fr(Chec)n(k)k(if)i(the)g
+4572 y Fm(check_privatekey)o(\(\))208 4689 y Fr(Chec)n(k)k(if)i(the)g
(priv)-5 b(ate)31 b(k)n(ey)f(\(loaded)h(with)h Fm(use_privatekey)p
Fc([)p Fm(_)o(fi)o(le)11 b Fc(])p Fr(\))26 b(matc)n(hes)k(the)i
-(certi\034cate)f(\(loaded)g(with)208 4570 y Fm(use_certificate)o
+(certi\034cate)f(\(loaded)g(with)208 4816 y Fm(use_certificate)o
Fc([)p Fm(_)o(fil)o(e)11 b Fc(])p Fr(\).)31 b(Returns)d
Fm(None)e Fr(if)i(they)f(matc)n(h,)h(raises)e Fm(Error)g
-Fr(otherwise.)0 4717 y Fm(get_app_data\(\))208 4816 y
+Fr(otherwise.)0 4963 y Fm(get_app_data\(\))208 5063 y
Fr(Retriev)n(e)g(application)h(data)g(as)g(set)h(b)n(y)g
-Fm(set_app_data)p Fr(.)0 4963 y Fm(get_cert_store\(\))208
-5063 y Fr(Retriev)n(e)34 b(the)i(certi\034cate)f(store)f(\(a)h
-(X509Store)f(ob)5 b(ject\))35 b(that)h(the)f(con)n(text)g(uses.)60
-b(This)35 b(can)g(b)r(e)h(used)f(to)g(add)208 5162 y("trusted")26
-b(certi\034cates)h(without)h(using)f(the.)37 b Fm(load_verify_loca)o
-(tio)o(ns)o(\(\))21 b Fr(metho)r(d.)p 0 5234 1560 4 v
-92 5288 a Fi(4)127 5311 y Fh(A)n(ctually)-6 b(,)25 b(all)e(that)j(is)d
-(required)j(is)e(an)g(ob)t(ject)h(that)h Fb(b)l(ehaves)e
-Fh(lik)n(e)g(a)h(so)r(c)n(k)n(et,)g(y)n(ou)g(could)g(ev)n(en)g(use)f
-(\034les,)g(ev)n(en)i(though)f(it'd)f(b)r(e)h(tric)n(ky)g(to)0
-5390 y(get)g(the)f(handshak)n(es)h(righ)n(t!)p 0 5549
-3901 4 v 0 5649 a Fg(10)2197 b(3)83 b Fm(OpenSSL)24 b
-Fg(\026)k(Python)f(interface)h(to)f(Op)r(enSSL)p eop
+Fm(set_app_data)p Fr(.)p 0 5134 1560 4 v 92 5188 a Fi(4)127
+5211 y Fh(A)n(ctually)-6 b(,)25 b(all)e(that)j(is)d(required)j(is)e(an)
+g(ob)t(ject)h(that)h Fb(b)l(ehaves)e Fh(lik)n(e)g(a)h(so)r(c)n(k)n(et,)
+g(y)n(ou)g(could)g(ev)n(en)g(use)f(\034les,)g(ev)n(en)i(though)f(it'd)f
+(b)r(e)h(tric)n(ky)g(to)0 5290 y(get)g(the)f(handshak)n(es)h(righ)n(t!)
+p 0 5549 3901 4 v 0 5649 a Fg(10)2197 b(3)83 b Fm(OpenSSL)24
+b Fg(\026)k(Python)f(interface)h(to)f(Op)r(enSSL)p eop
end
%%Page: 11 11
-TeXDict begin 11 10 bop 0 83 a Fm(get_timeout\(\))208
-183 y Fr(Retriev)n(e)26 b(session)h(timeout,)h(as)f(set)g(b)n(y)i
+TeXDict begin 11 10 bop 0 83 a Fm(get_cert_store\(\))208
+183 y Fr(Retriev)n(e)34 b(the)i(certi\034cate)f(store)f(\(a)h
+(X509Store)f(ob)5 b(ject\))35 b(that)h(the)f(con)n(text)g(uses.)60
+b(This)35 b(can)g(b)r(e)h(used)f(to)g(add)208 282 y("trusted")26
+b(certi\034cates)h(without)h(using)f(the.)37 b Fm(load_verify_loca)o
+(tio)o(ns)o(\(\))21 b Fr(metho)r(d.)0 429 y Fm(get_timeout\(\))208
+529 y Fr(Retriev)n(e)26 b(session)h(timeout,)h(as)f(set)g(b)n(y)i
Fm(set_timeout)p Fr(.)j(The)c(default)g(is)f(300)f(seconds.)0
-330 y Fm(get_verify_depth)o(\(\))208 429 y Fr(Retriev)n(e)g(the)i(Con)n
+676 y Fm(get_verify_depth)o(\(\))208 775 y Fr(Retriev)n(e)g(the)i(Con)n
(text)f(ob)5 b(ject's)28 b(v)n(erify)e(depth,)j(as)d(set)i(b)n(y)g
-Fm(set_verify_depth)p Fr(.)0 576 y Fm(get_verify_mode\()o(\))208
-676 y Fr(Retriev)n(e)e(the)i(Con)n(text)f(ob)5 b(ject's)28
+Fm(set_verify_depth)p Fr(.)0 922 y Fm(get_verify_mode\()o(\))208
+1022 y Fr(Retriev)n(e)e(the)i(Con)n(text)f(ob)5 b(ject's)28
b(v)n(erify)e(mo)r(de,)i(as)f(set)h(b)n(y)g Fm(set_verify_mode)p
-Fr(.)0 823 y Fm(load_client_ca\()p Fd(p)l(em\034le)6
-b Fm(\))208 922 y Fr(Read)33 b(a)g(\034le)h(with)g(PEM-formatted)g
+Fr(.)0 1169 y Fm(load_client_ca\()p Fd(p)l(em\034le)6
+b Fm(\))208 1268 y Fr(Read)33 b(a)g(\034le)h(with)g(PEM-formatted)g
(certi\034cates)f(that)h(will)g(b)r(e)g(sen)n(t)f(to)h(the)g(clien)n(t)
-f(when)h(requesting)f(a)g(clien)n(t)208 1022 y(certi\034cate.)0
-1169 y Fm(load_verify_loca)o(ti)o(ons)o(\()p Fd(p)l(em\034le)6
-b Fm(\))208 1268 y Fr(Sp)r(ecify)24 b(where)f(CA)g(certi\034cates)g
+f(when)h(requesting)f(a)g(clien)n(t)208 1368 y(certi\034cate.)0
+1515 y Fm(load_verify_loca)o(ti)o(ons)o(\()p Fd(p)l(em\034le)6
+b Fm(\))208 1614 y Fr(Sp)r(ecify)24 b(where)f(CA)g(certi\034cates)g
(for)g(v)n(eri\034cation)f(purp)r(oses)h(are)f(lo)r(cated.)35
b(These)23 b(are)g(trusted)g(certi\034cates.)35 b(Note)208
-1368 y(that)27 b(the)h(certi\034cates)f(ha)n(v)n(e)f(to)i(b)r(e)g(in)g
-(PEM)g(format.)0 1515 y Fm(load_tmp_dh\()p Fd(dh\034le)6
-b Fm(\))208 1614 y Fr(Load)26 b(parameters)g(for)h(Ephemeral)g
-(Di\036e-Hellman)h(from)g Fd(dh\034le)6 b Fr(.)0 1761
-y Fm(set_app_data\()p Fd(data)g Fm(\))208 1861 y Fr(Asso)r(ciate)25
+1714 y(that)27 b(the)h(certi\034cates)f(ha)n(v)n(e)f(to)i(b)r(e)g(in)g
+(PEM)g(format.)0 1861 y Fm(load_tmp_dh\()p Fd(dh\034le)6
+b Fm(\))208 1961 y Fr(Load)26 b(parameters)g(for)h(Ephemeral)g
+(Di\036e-Hellman)h(from)g Fd(dh\034le)6 b Fr(.)0 2107
+y Fm(set_app_data\()p Fd(data)g Fm(\))208 2207 y Fr(Asso)r(ciate)25
b Fd(data)33 b Fr(with)27 b(this)f(Con)n(text)f(ob)5
b(ject.)36 b Fd(data)e Fr(can)25 b(b)r(e)i(retriev)n(ed)d(later)i
-(using)f(the)i Fm(get_app_data)21 b Fr(metho)r(d.)0 2008
-y Fm(set_cipher_list\()o Fd(ciphers)7 b Fm(\))208 2107
+(using)f(the)i Fm(get_app_data)21 b Fr(metho)r(d.)0 2354
+y Fm(set_cipher_list\()o Fd(ciphers)7 b Fm(\))208 2454
y Fr(Set)28 b(the)g(list)h(of)f(ciphers)f(to)h(b)r(e)g(used)g(in)g
(this)h(con)n(text.)37 b(See)28 b(the)h(Op)r(enSSL)f(man)n(ual)f(for)h
-(more)f(information)g(\(e.g.)208 2207 y(ciphers\(1\)\))0
-2354 y Fm(set_info_callbac)o(k\()o Fd(c)l(al)t(lb)l(ack)9
-b Fm(\))208 2454 y Fr(Set)33 b(the)f(information)g(callbac)n(k)f(to)i
+(more)f(information)g(\(e.g.)208 2553 y(ciphers\(1\)\))0
+2700 y Fm(set_info_callbac)o(k\()o Fd(c)l(al)t(lb)l(ack)9
+b Fm(\))208 2800 y Fr(Set)33 b(the)f(information)g(callbac)n(k)f(to)i
Fd(c)l(al)t(lb)l(ack)9 b Fr(.)54 b(This)32 b(function)h(will)g(b)r(e)g
(called)f(from)g(time)h(to)g(time)g(during)f(SSL)208
-2553 y(handshak)n(es.)49 b Fd(c)l(al)t(lb)l(ack)43 b
+2899 y(handshak)n(es.)49 b Fd(c)l(al)t(lb)l(ack)43 b
Fr(should)32 b(tak)n(e)g(three)g(argumen)n(ts:)45 b(a)32
b(Connection)g(ob)5 b(ject)32 b(and)g(t)n(w)n(o)g(in)n(tegers.)50
-b(The)32 b(\034rst)208 2653 y(in)n(teger)f(sp)r(eci\034es)g(where)h(in)
+b(The)32 b(\034rst)208 2999 y(in)n(teger)f(sp)r(eci\034es)g(where)h(in)
g(the)g(SSL)g(handshak)n(e)f(the)h(function)h(w)n(as)e(called,)h(and)g
-(the)g(other)g(the)g(return)f(co)r(de)208 2752 y(from)c(a)g(\(p)r
+(the)g(other)g(the)g(return)f(co)r(de)208 3099 y(from)c(a)g(\(p)r
(ossibly)g(failed\))h(in)n(ternal)f(function)h(call.)0
-2899 y Fm(set_options\()p Fd(options)7 b Fm(\))208 2999
+3245 y Fm(set_options\()p Fd(options)7 b Fm(\))208 3345
y Fr(A)n(dd)28 b(SSL)h(options.)38 b(Options)28 b(y)n(ou)f(ha)n(v)n(e)g
(set)i(b)r(efore)f(are)f(not)h(cleared!)38 b(This)28
b(metho)r(d)h(should)f(b)r(e)h(used)f(with)h(the)208
-3099 y Fm(OP_*)d Fr(constan)n(ts.)0 3245 y Fm(set_passwd_cb\()p
+3445 y Fm(OP_*)d Fr(constan)n(ts.)0 3591 y Fm(set_passwd_cb\()p
Fd(c)l(al)t(lb)l(ack)9 b Fc([)p Fd(,)25 b(user)l(data)19
-b Fc(])p Fm(\))208 3345 y Fr(Set)42 b(the)g(passphrase)f(callbac)n(k)f
+b Fc(])p Fm(\))208 3691 y Fr(Set)42 b(the)g(passphrase)f(callbac)n(k)f
(to)i Fd(c)l(al)t(lb)l(ack)9 b Fr(.)82 b(This)42 b(function)h(will)f(b)
r(e)g(called)g(when)g(a)g(priv)-5 b(ate)42 b(k)n(ey)f(with)h(a)208
-3445 y(passphrase)37 b(is)i(loaded.)70 b Fd(c)l(al)t(lb)l(ack)50
+3791 y(passphrase)37 b(is)i(loaded.)70 b Fd(c)l(al)t(lb)l(ack)50
b Fr(should)39 b(tak)n(e)f(a)g(b)r(o)r(olean)h(argumen)n(t)f
Fd(r)l(ep)l(e)l(at)47 b Fr(and)39 b(an)f(arbitrary)f(argumen)n(t)208
-3544 y Fd(data)f Fr(and)28 b(return)g(the)h(passphrase)e(en)n(tered)h
+3890 y Fd(data)f Fr(and)28 b(return)g(the)h(passphrase)e(en)n(tered)h
(b)n(y)g(the)h(user.)40 b(If)35 b Fd(r)l(ep)l(e)l(at)i
Fr(is)28 b(true)h(then)g Fd(c)l(al)t(lb)l(ack)39 b Fr(should)29
-b(ask)f(for)g(the)208 3644 y(passphrase)j(t)n(wice)j(and)g(mak)n(e)f
+b(ask)f(for)g(the)208 3990 y(passphrase)j(t)n(wice)j(and)g(mak)n(e)f
(sure)g(that)h(the)g(t)n(w)n(o)f(en)n(tries)g(are)g(equal.)55
b(The)34 b Fd(data)41 b Fr(argumen)n(t)33 b(is)h(the)g
-Fd(user)l(data)208 3744 y Fr(v)-5 b(ariable)25 b(passed)h(to)h(the)g
+Fd(user)l(data)208 4090 y Fr(v)-5 b(ariable)25 b(passed)h(to)h(the)g
Fm(set_passwd_cb)22 b Fr(metho)r(d.)37 b(If)27 b(an)g(error)e(o)r
(ccurs,)h Fd(c)l(al)t(lb)l(ack)37 b Fr(should)27 b(return)f(a)h(false)f
-(v)-5 b(alue)208 3843 y(\(e.g.)36 b(an)28 b(empt)n(y)f(string\).)0
-3990 y Fm(set_session_id\()p Fd(n)o(ame)6 b Fm(\))208
-4090 y Fr(Set)33 b(the)h(con)n(text)f Fd(name)39 b Fr(within)34
+(v)-5 b(alue)208 4189 y(\(e.g.)36 b(an)28 b(empt)n(y)f(string\).)0
+4336 y Fm(set_session_id\()p Fd(n)o(ame)6 b Fm(\))208
+4436 y Fr(Set)33 b(the)h(con)n(text)f Fd(name)39 b Fr(within)34
b(whic)n(h)f(a)g(session)f(can)h(b)r(e)h(reused)e(for)h(this)g(Con)n
-(text)g(ob)5 b(ject.)54 b(This)33 b(is)g(needed)208 4189
+(text)g(ob)5 b(ject.)54 b(This)33 b(is)g(needed)208 4535
y(when)e(doing)g(session)g(resumption,)h(b)r(ecause)g(there)f(is)h(no)f
(w)n(a)n(y)g(for)g(a)g(stored)g(session)f(to)i(kno)n(w)f(whic)n(h)g
-(Con)n(text)208 4289 y(ob)5 b(ject)27 b(it)h(is)f(asso)r(ciated)g
+(Con)n(text)208 4635 y(ob)5 b(ject)27 b(it)h(is)f(asso)r(ciated)g
(with.)37 b Fd(name)d Fr(ma)n(y)27 b(b)r(e)h(an)n(y)e(binary)h(data.)0
-4436 y Fm(set_timeout\()p Fd(time)l(out)8 b Fm(\))208
-4535 y Fr(Set)29 b(the)g(timeout)h(for)e(newly)h(created)f(sessions)g
+4782 y Fm(set_timeout\()p Fd(time)l(out)8 b Fm(\))208
+4882 y Fr(Set)29 b(the)g(timeout)h(for)e(newly)h(created)f(sessions)g
(for)h(this)g(Con)n(text)g(ob)5 b(ject)28 b(to)h Fd(time)l(out)8
b Fr(.)41 b Fd(time)l(out)36 b Fr(m)n(ust)29 b(b)r(e)h(giv)n(en)208
-4635 y(in)f(\(whole\))f(seconds.)40 b(The)29 b(default)g(v)-5
+4981 y(in)f(\(whole\))f(seconds.)40 b(The)29 b(default)g(v)-5
b(alue)28 b(is)h(300)e(seconds.)40 b(See)29 b(the)g(Op)r(enSSL)g(man)n
-(ual)f(for)g(more)g(information)208 4735 y(\(e.g.)36
-b(SSL_CTX_set_timeout\(3\)\).)0 4882 y Fm(set_verify\()p
-Fd(mo)l(de,)26 b(c)l(al)t(lb)l(ack)9 b Fm(\))208 4981
+(ual)f(for)g(more)g(information)208 5081 y(\(e.g.)36
+b(SSL_CTX_set_timeout\(3\)\).)0 5228 y Fm(set_verify\()p
+Fd(mo)l(de,)26 b(c)l(al)t(lb)l(ack)9 b Fm(\))208 5327
y Fr(Set)36 b(the)h(v)n(eri\034cation)e(\035ags)g(for)h(this)h(Con)n
(text)f(ob)5 b(ject)36 b(to)g Fd(mo)l(de)44 b Fr(and)36
b(sp)r(ecify)g(that)h Fd(c)l(al)t(lb)l(ack)47 b Fr(should)36
-b(b)r(e)h(used)208 5081 y(for)30 b(v)n(eri\034cation)g(callbac)n(ks.)45
-b Fd(mo)l(de)38 b Fr(should)31 b(b)r(e)h(one)e(of)38
-b Fm(VERIFY_NONE)26 b Fr(and)31 b Fm(VERIFY_PEER)p Fr(.)c(If)38
-b Fm(VERIFY_PEER)26 b Fr(is)208 5180 y(used,)j Fd(mo)l(de)36
-b Fr(can)29 b(b)r(e)g(OR:ed)g(with)g Fm(VERIFY_FAIL_IF_NO)o(_P)o(EE)o
-(R_C)o(ER)o(T)23 b Fr(and)29 b Fm(VERIFY_CLIENT_O)o(NCE)22
-b Fr(to)29 b(further)208 5280 y(con)n(trol)23 b(the)j(b)r(eha)n(viour.)
-34 b Fd(c)l(al)t(lb)l(ack)i Fr(should)25 b(tak)n(e)f(\034v)n(e)h
-(argumen)n(ts:)34 b(A)25 b(Connection)g(ob)5 b(ject,)25
-b(an)g(X509)f(ob)5 b(ject,)25 b(and)208 5380 y(three)e(in)n(teger)g(v)
--5 b(ariables,)23 b(whic)n(h)h(are)f(in)h(turn)g(p)r(oten)n(tial)g
-(error)d(n)n(um)n(b)r(er,)k(error)c(depth)k(and)f(return)f(co)r(de.)35
-b Fd(c)l(al)t(lb)l(ack)p 0 5549 3901 4 v 0 5649 a Fg(3.3)82
-b Fm(SSL)26 b Fg(\026)i(An)g(interface)g(to)f(the)g(SSL-sp)r(eci\034c)h
+b(b)r(e)h(used)p 0 5549 3901 4 v 0 5649 a Fg(3.3)82 b
+Fm(SSL)26 b Fg(\026)i(An)g(interface)g(to)f(the)g(SSL-sp)r(eci\034c)h
(pa)n(rts)f(of)h(Op)r(enSSL)1611 b(11)p eop end
%%Page: 12 12
-TeXDict begin 12 11 bop 208 83 a Fr(should)27 b(return)g(true)g(if)h(v)
+TeXDict begin 12 11 bop 208 83 a Fr(for)30 b(v)n(eri\034cation)g
+(callbac)n(ks.)45 b Fd(mo)l(de)38 b Fr(should)31 b(b)r(e)h(one)e(of)38
+b Fm(VERIFY_NONE)26 b Fr(and)31 b Fm(VERIFY_PEER)p Fr(.)c(If)38
+b Fm(VERIFY_PEER)26 b Fr(is)208 183 y(used,)j Fd(mo)l(de)36
+b Fr(can)29 b(b)r(e)g(OR:ed)g(with)g Fm(VERIFY_FAIL_IF_NO)o(_P)o(EE)o
+(R_C)o(ER)o(T)23 b Fr(and)29 b Fm(VERIFY_CLIENT_O)o(NCE)22
+b Fr(to)29 b(further)208 282 y(con)n(trol)23 b(the)j(b)r(eha)n(viour.)
+34 b Fd(c)l(al)t(lb)l(ack)i Fr(should)25 b(tak)n(e)f(\034v)n(e)h
+(argumen)n(ts:)34 b(A)25 b(Connection)g(ob)5 b(ject,)25
+b(an)g(X509)f(ob)5 b(ject,)25 b(and)208 382 y(three)e(in)n(teger)g(v)-5
+b(ariables,)23 b(whic)n(h)h(are)f(in)h(turn)g(p)r(oten)n(tial)g(error)d
+(n)n(um)n(b)r(er,)k(error)c(depth)k(and)f(return)f(co)r(de.)35
+b Fd(c)l(al)t(lb)l(ack)208 482 y Fr(should)27 b(return)g(true)g(if)h(v)
n(eri\034cation)f(passes)f(and)h(false)h(otherwise.)0
-230 y Fm(set_verify_depth)o(\()p Fd(depth)6 b Fm(\))208
-330 y Fr(Set)36 b(the)g(maxim)n(um)f(depth)h(for)g(the)g(certi\034cate)
+628 y Fm(set_verify_depth)o(\()p Fd(depth)6 b Fm(\))208
+728 y Fr(Set)36 b(the)g(maxim)n(um)f(depth)h(for)g(the)g(certi\034cate)
f(c)n(hain)g(v)n(eri\034cation)f(that)i(shall)f(b)r(e)h(allo)n(w)n(ed)e
-(for)i(this)f(Con)n(text)208 429 y(ob)5 b(ject.)0 576
-y Fm(use_certificate\()o Fd(c)l(ert)j Fm(\))208 676 y
-Fr(Use)27 b(the)h(certi\034cate)f Fd(c)l(ert)35 b Fr(whic)n(h)28
-b(has)f(to)g(b)r(e)h(a)f(X509)g(ob)5 b(ject.)0 823 y
+(for)i(this)f(Con)n(text)208 828 y(ob)5 b(ject.)0 975
+y Fm(use_certificate\()o Fd(c)l(ert)j Fm(\))208 1074
+y Fr(Use)27 b(the)h(certi\034cate)f Fd(c)l(ert)35 b Fr(whic)n(h)28
+b(has)f(to)g(b)r(e)h(a)f(X509)g(ob)5 b(ject.)0 1221 y
Fm(add_extra_chain_)o(ce)o(rt\()o Fd(c)l(ert)j Fm(\))208
-922 y Fr(A)n(dds)32 b(the)h(certi\034cate)f Fd(c)l(ert)8
+1321 y Fr(A)n(dds)32 b(the)h(certi\034cate)f Fd(c)l(ert)8
b Fr(,)34 b(whic)n(h)f(has)f(to)g(b)r(e)i(a)e(X509)f(ob)5
b(ject,)34 b(to)f(the)g(certi\034cate)f(c)n(hain)g(presen)n(ted)g
-(together)208 1022 y(with)c(the)g(certi\034cate.)0 1169
+(together)208 1420 y(with)c(the)g(certi\034cate.)0 1567
y Fm(use_certificate_)o(ch)o(ain)o(_f)o(il)o(e\()p Fd(\034)o(le)6
-b Fm(\))208 1268 y Fr(Load)26 b(a)h(certi\034cate)g(c)n(hain)g(from)h
+b Fm(\))208 1667 y Fr(Load)26 b(a)h(certi\034cate)g(c)n(hain)g(from)h
Fd(\034le)34 b Fr(whic)n(h)27 b(m)n(ust)h(b)r(e)g(PEM)g(enco)r(ded.)0
-1415 y Fm(use_privatekey\()p Fd(pkey)7 b Fm(\))208 1515
+1814 y Fm(use_privatekey\()p Fd(pkey)7 b Fm(\))208 1913
y Fr(Use)27 b(the)h(priv)-5 b(ate)27 b(k)n(ey)h Fd(pkey)36
b Fr(whic)n(h)28 b(has)f(to)g(b)r(e)h(a)f(PKey)h(ob)5
-b(ject.)0 1676 y Fm(use_certificate_)o(fi)o(le\()o Fd(\034le)h
-Fc([)p Fd(,)24 b(format)d Fc(])p Fm(\))208 1776 y Fr(Load)i(the)h
+b(ject.)0 2075 y Fm(use_certificate_)o(fi)o(le\()o Fd(\034le)h
+Fc([)p Fd(,)24 b(format)d Fc(])p Fm(\))208 2174 y Fr(Load)i(the)h
(\034rst)g(certi\034cate)f(found)h(in)h Fd(\034le)6 b
Fr(.)36 b(The)24 b(certi\034cate)f(m)n(ust)h(b)r(e)h(in)f(the)g(format)
g(sp)r(eci\034ed)g(b)n(y)h Fd(format)8 b Fr(,)25 b(whic)n(h)208
-1875 y(is)i(either)g Fm(FILETYPE_PEM)c Fr(or)k Fm(FILETYPE_ASN1)p
+2274 y(is)i(either)g Fm(FILETYPE_PEM)c Fr(or)k Fm(FILETYPE_ASN1)p
Fr(.)k(The)d(default)g(is)f Fm(FILETYPE_PEM)p Fr(.)0
-2022 y Fm(use_privatekey_f)o(il)o(e\()p Fd(\034)o(le)6
-b Fc([)p Fd(,)25 b(format)20 b Fc(])p Fm(\))208 2122
+2421 y Fm(use_privatekey_f)o(il)o(e\()p Fd(\034)o(le)6
+b Fc([)p Fd(,)25 b(format)20 b Fc(])p Fm(\))208 2520
y Fr(Load)31 b(the)h(\034rst)g(priv)-5 b(ate)31 b(k)n(ey)g(found)i(in)f
Fd(\034le)6 b Fr(.)50 b(The)32 b(priv)-5 b(ate)32 b(k)n(ey)f(m)n(ust)h
(b)r(e)g(in)h(the)f(format)f(sp)r(eci\034ed)i(b)n(y)f
-Fd(format)8 b Fr(,)208 2221 y(whic)n(h)27 b(is)g(either)h
+Fd(format)8 b Fr(,)208 2620 y(whic)n(h)27 b(is)g(either)h
Fm(FILETYPE_PEM)22 b Fr(or)27 b Fm(FILETYPE_ASN1)p Fr(.)32
-b(The)27 b(default)h(is)g Fm(FILETYPE_PEM)p Fr(.)0 2484
-y Fg(Connection)e(objects)0 2685 y Fr(Connection)h(ob)5
+b(The)27 b(default)h(is)g Fm(FILETYPE_PEM)p Fr(.)0 2876
+y Fg(Connection)e(objects)0 3077 y Fr(Connection)h(ob)5
b(jects)27 b(ha)n(v)n(e)f(the)i(follo)n(wing)f(metho)r(ds:)0
-2832 y Fm(accept\(\))208 2931 y Fr(Call)33 b(the)g Fm(accept)e
+3224 y Fm(accept\(\))208 3323 y Fr(Call)33 b(the)g Fm(accept)e
Fr(metho)r(d)j(of)f(the)h(underlying)f(so)r(c)n(k)n(et)f(and)h(set)h
(up)g(SSL)f(on)g(the)h(returned)f(so)r(c)n(k)n(et,)h(using)f(the)208
-3031 y(Con)n(text)22 b(ob)5 b(ject)22 b(supplied)h(to)f(this)h
+3423 y(Con)n(text)22 b(ob)5 b(ject)22 b(supplied)h(to)f(this)h
(Connection)f(ob)5 b(ject)22 b(at)h(creation.)34 b(Returns)22
b(a)g(pair)g Fm(\()p Fd(c)l(onn)6 b Fm(,)43 b Fd(addr)l(ess)7
-b Fm(\))p Fr(.)36 b(where)208 3131 y Fd(c)l(onn)d Fr(is)28
+b Fm(\))p Fr(.)36 b(where)208 3523 y Fd(c)l(onn)d Fr(is)28
b(the)g(new)f(Connection)g(ob)5 b(ject)28 b(created,)e(and)i
Fd(addr)l(ess)35 b Fr(is)28 b(as)f(returned)g(b)n(y)g(the)h(so)r(c)n(k)
-n(et's)e Fm(accept)p Fr(.)0 3277 y Fm(bind\()p Fd(addr)l(ess)7
-b Fm(\))208 3377 y Fr(Call)27 b(the)h Fm(bind)e Fr(metho)r(d)i(of)f
-(the)h(underlying)f(so)r(c)n(k)n(et.)0 3524 y Fm(close\(\))208
-3624 y Fr(Call)i(the)h Fm(close)e Fr(metho)r(d)i(of)g(the)g(underlying)
+n(et's)e Fm(accept)p Fr(.)0 3669 y Fm(bind\()p Fd(addr)l(ess)7
+b Fm(\))208 3769 y Fr(Call)27 b(the)h Fm(bind)e Fr(metho)r(d)i(of)f
+(the)h(underlying)f(so)r(c)n(k)n(et.)0 3916 y Fm(close\(\))208
+4016 y Fr(Call)i(the)h Fm(close)e Fr(metho)r(d)i(of)g(the)g(underlying)
f(so)r(c)n(k)n(et.)43 b(Note:)e(If)31 b(y)n(ou)e(w)n(an)n(t)g(correct)f
-(SSL)i(closure,)f(y)n(ou)g(need)h(to)208 3723 y(call)d(the)h
-Fm(shutdown)c Fr(metho)r(d)k(\034rst.)0 3870 y Fm(connect\()p
-Fd(addr)l(ess)7 b Fm(\))208 3970 y Fr(Call)31 b(the)h
+(SSL)i(closure,)f(y)n(ou)g(need)h(to)208 4115 y(call)d(the)h
+Fm(shutdown)c Fr(metho)r(d)k(\034rst.)0 4262 y Fm(connect\()p
+Fd(addr)l(ess)7 b Fm(\))208 4362 y Fr(Call)31 b(the)h
Fm(connect)e Fr(metho)r(d)i(of)g(the)g(underlying)g(so)r(c)n(k)n(et)e
(and)i(set)g(up)g(SSL)h(on)e(the)i(so)r(c)n(k)n(et,)f(using)f(the)h
-(Con)n(text)208 4069 y(ob)5 b(ject)27 b(supplied)h(to)f(this)h
-(Connection)f(ob)5 b(ject)27 b(at)h(creation.)0 4216
-y Fm(connect_ex\()p Fd(addr)l(ess)7 b Fm(\))208 4316
+(Con)n(text)208 4461 y(ob)5 b(ject)27 b(supplied)h(to)f(this)h
+(Connection)f(ob)5 b(ject)27 b(at)h(creation.)0 4608
+y Fm(connect_ex\()p Fd(addr)l(ess)7 b Fm(\))208 4708
y Fr(Call)24 b(the)g Fm(connect_ex)c Fr(metho)r(d)25
b(of)f(the)h(underlying)f(so)r(c)n(k)n(et)f(and)h(set)g(up)h(SSL)f(on)g
(the)h(so)r(c)n(k)n(et,)f(using)g(the)g(Con)n(text)208
-4415 y(ob)5 b(ject)35 b(supplied)g(to)h(this)f(Connection)g(ob)5
+4807 y(ob)5 b(ject)35 b(supplied)g(to)h(this)f(Connection)g(ob)5
b(ject)36 b(at)f(creation.)59 b(Note)36 b(that)f(if)h(the)g
-Fm(connect_ex)31 b Fr(metho)r(d)36 b(of)g(the)208 4515
+Fm(connect_ex)31 b Fr(metho)r(d)36 b(of)g(the)208 4907
y(so)r(c)n(k)n(et)26 b(do)r(esn't)i(return)f(0,)g(SSL)h(w)n(on't)f(b)r
-(e)h(initialized.)0 4662 y Fm(do_handshake\(\))208 4762
+(e)h(initialized.)0 5054 y Fm(do_handshake\(\))208 5154
y Fr(P)n(erform)49 b(an)h(SSL)g(handshak)n(e)f(\(usually)h(called)g
(after)f Fm(renegotiate)d Fr(or)j(one)h(of)57 b Fm(set_accept_stat)o(e)
-44 b Fr(or)208 4861 y Fm(set_accept_stat)o(e)p Fr(\).)31
+44 b Fr(or)208 5253 y Fm(set_accept_stat)o(e)p Fr(\).)31
b(This)d(can)f(raise)f(the)i(same)f(exceptions)g(as)g
-Fm(send)f Fr(and)h Fm(recv)p Fr(.)0 5008 y Fm(fileno\(\))208
-5108 y Fr(Retriev)n(e)f(the)i(\034le)g(descriptor)e(n)n(um)n(b)r(er)i
-(for)f(the)h(underlying)e(so)r(c)n(k)n(et.)0 5255 y Fm(listen\()p
-Fd(b)l(acklo)l(g)7 b Fm(\))208 5354 y Fr(Call)27 b(the)h
-Fm(listen)d Fr(metho)r(d)j(of)f(the)h(underlying)f(so)r(c)n(k)n(et.)p
+Fm(send)f Fr(and)h Fm(recv)p Fr(.)0 5400 y Fm(fileno\(\))p
0 5549 3901 4 v 0 5649 a Fg(12)2197 b(3)83 b Fm(OpenSSL)24
b Fg(\026)k(Python)f(interface)h(to)f(Op)r(enSSL)p eop
end
%%Page: 13 13
-TeXDict begin 13 12 bop 0 83 a Fm(get_app_data\(\))208
-183 y Fr(Retriev)n(e)26 b(application)h(data)g(as)g(set)h(b)n(y)g
-Fm(set_app_data)p Fr(.)0 330 y Fm(get_cipher_list\()o(\))208
-429 y Fr(Retriev)n(e)23 b(the)h(list)g(of)g(ciphers)g(used)g(b)n(y)f
+TeXDict begin 13 12 bop 208 83 a Fr(Retriev)n(e)26 b(the)i(\034le)g
+(descriptor)e(n)n(um)n(b)r(er)i(for)f(the)h(underlying)e(so)r(c)n(k)n
+(et.)0 230 y Fm(listen\()p Fd(b)l(acklo)l(g)7 b Fm(\))208
+330 y Fr(Call)27 b(the)h Fm(listen)d Fr(metho)r(d)j(of)f(the)h
+(underlying)f(so)r(c)n(k)n(et.)0 476 y Fm(get_app_data\(\))208
+576 y Fr(Retriev)n(e)f(application)h(data)g(as)g(set)h(b)n(y)g
+Fm(set_app_data)p Fr(.)0 723 y Fm(get_cipher_list\()o(\))208
+823 y Fr(Retriev)n(e)23 b(the)h(list)g(of)g(ciphers)g(used)g(b)n(y)f
(the)i(Connection)e(ob)5 b(ject.)36 b(W)-9 b(ARNING:)25
b(This)f(API)h(has)e(c)n(hanged.)35 b(It)24 b(used)208
-529 y(to)j(tak)n(e)g(an)g(optional)g(parameter)f(and)h(just)h(return)g
+922 y(to)j(tak)n(e)g(an)g(optional)g(parameter)f(and)h(just)h(return)g
(a)f(string,)g(but)h(not)f(it)h(returns)f(the)h(en)n(tire)f(list)h(in)g
-(one)f(go.)0 676 y Fm(get_context\(\))208 775 y Fr(Retriev)n(e)f(the)i
-(Con)n(text)f(ob)5 b(ject)28 b(asso)r(ciated)e(with)i(this)g
-(Connection.)0 922 y Fm(get_peer_certifi)o(ca)o(te\()o(\))208
-1022 y Fr(Retriev)n(e)e(the)i(other)f(side's)g(certi\034cate)g(\(if)i
-(an)n(y\))0 1169 y Fm(getpeername\(\))208 1268 y Fr(Call)e(the)h
+(one)f(go.)0 1069 y Fm(get_context\(\))208 1169 y Fr(Retriev)n(e)f(the)
+i(Con)n(text)f(ob)5 b(ject)28 b(asso)r(ciated)e(with)i(this)g
+(Connection.)0 1316 y Fm(get_peer_certifi)o(ca)o(te\()o(\))208
+1415 y Fr(Retriev)n(e)e(the)i(other)f(side's)g(certi\034cate)g(\(if)i
+(an)n(y\))0 1562 y Fm(getpeername\(\))208 1662 y Fr(Call)e(the)h
Fm(getpeername)23 b Fr(metho)r(d)28 b(of)f(the)h(underlying)f(so)r(c)n
-(k)n(et.)0 1415 y Fm(getsockname\(\))208 1515 y Fr(Call)g(the)h
+(k)n(et.)0 1808 y Fm(getsockname\(\))208 1908 y Fr(Call)g(the)h
Fm(getsockname)23 b Fr(metho)r(d)28 b(of)f(the)h(underlying)f(so)r(c)n
-(k)n(et.)0 1678 y Fm(getsockopt\()p Fd(level,)f(optname)6
-b Fc([)p Fd(,)31 b(bu\035en)18 b Fc(])p Fm(\))208 1778
+(k)n(et.)0 2072 y Fm(getsockopt\()p Fd(level,)f(optname)6
+b Fc([)p Fd(,)31 b(bu\035en)18 b Fc(])p Fm(\))208 2171
y Fr(Call)27 b(the)h Fm(getsockopt)23 b Fr(metho)r(d)28
-b(of)g(the)g(underlying)f(so)r(c)n(k)n(et.)0 1925 y Fm(pending\(\))208
-2024 y Fr(Retriev)n(e)22 b(the)h(n)n(um)n(b)r(er)g(of)g(b)n(ytes)g
+b(of)g(the)g(underlying)f(so)r(c)n(k)n(et.)0 2318 y Fm(pending\(\))208
+2418 y Fr(Retriev)n(e)22 b(the)h(n)n(um)n(b)r(er)g(of)g(b)n(ytes)g
(that)h(can)e(b)r(e)i(safely)f(read)f(from)h(the)g(SSL)h(bu\033er)f(\()
-p Fd(not)g Fr(the)h(underlying)e(transp)r(ort)208 2124
-y(bu\033er\).)0 2271 y Fm(recv\()p Fd(bufsize)6 b Fm(\))208
-2371 y Fr(Receiv)n(e)30 b(data)h(from)g(the)h(Connection.)47
+p Fd(not)g Fr(the)h(underlying)e(transp)r(ort)208 2517
+y(bu\033er\).)0 2664 y Fm(recv\()p Fd(bufsize)6 b Fm(\))208
+2764 y Fr(Receiv)n(e)30 b(data)h(from)g(the)h(Connection.)47
b(The)31 b(return)g(v)-5 b(alue)31 b(is)h(a)e(string)h(represen)n(ting)
-f(the)h(data)g(receiv)n(ed.)47 b(The)208 2470 y(maxim)n(um)27
+f(the)h(data)g(receiv)n(ed.)47 b(The)208 2864 y(maxim)n(um)27
b(amoun)n(t)g(of)g(data)h(to)f(b)r(e)h(receiv)n(ed)e(at)i(once,)f(is)g
-(sp)r(eci\034ed)h(b)n(y)h Fd(bufsize)6 b Fr(.)0 2617
-y Fm(renegotiate\(\))208 2717 y Fr(Renegotiate)26 b(the)i(SSL)g
+(sp)r(eci\034ed)h(b)n(y)h Fd(bufsize)6 b Fr(.)0 3010
+y Fm(renegotiate\(\))208 3110 y Fr(Renegotiate)26 b(the)i(SSL)g
(session.)36 b(Call)27 b(this)h(if)g(y)n(ou)f(wish)g(to)h(c)n(hange)e
(cipher)h(suites)h(or)e(an)n(ything)h(lik)n(e)g(that.)0
-2864 y Fm(send\()p Fd(string)7 b Fm(\))208 2963 y Fr(Send)27
+3257 y Fm(send\()p Fd(string)7 b Fm(\))208 3357 y Fr(Send)27
b(the)h Fd(string)35 b Fr(data)27 b(to)h(the)g(Connection.)0
-3110 y Fm(sendall\()p Fd(string)7 b Fm(\))208 3210 y
+3503 y Fm(sendall\()p Fd(string)7 b Fm(\))208 3603 y
Fr(Send)30 b(all)f(of)h(the)g Fd(string)37 b Fr(data)29
b(to)g(the)h(Connection.)43 b(This)30 b(calls)f Fm(send)f
Fr(rep)r(eatedly)h(un)n(til)h(all)f(data)h(is)f(sen)n(t.)43
-b(If)30 b(an)208 3309 y(error)25 b(o)r(ccurs,)i(it's)h(imp)r(ossible)f
+b(If)30 b(an)208 3703 y(error)25 b(o)r(ccurs,)i(it's)h(imp)r(ossible)f
(to)g(tell)h(ho)n(w)f(m)n(uc)n(h)h(data)f(has)g(b)r(een)h(sen)n(t.)0
-3456 y Fm(set_accept_state)o(\(\))208 3556 y Fr(Set)20
+3850 y Fm(set_accept_state)o(\(\))208 3949 y Fr(Set)20
b(the)g(connection)f(to)h(w)n(ork)e(in)i(serv)n(er)e(mo)r(de.)34
b(The)20 b(handshak)n(e)f(will)h(b)r(e)g(handled)g(automatically)e(b)n
-(y)i(read/write.)0 3703 y Fm(set_app_data\()p Fd(data)6
-b Fm(\))208 3802 y Fr(Asso)r(ciate)39 b Fd(data)47 b
+(y)i(read/write.)0 4096 y Fm(set_app_data\()p Fd(data)6
+b Fm(\))208 4196 y Fr(Asso)r(ciate)39 b Fd(data)47 b
Fr(with)40 b(this)g(Connection)g(ob)5 b(ject.)73 b Fd(data)47
b Fr(can)39 b(b)r(e)i(retriev)n(ed)d(later)h(using)h(the)g
-Fm(get_app_data)208 3902 y Fr(metho)r(d.)0 4049 y Fm(set_connect_stat)o
-(e\()o(\))208 4148 y Fr(Set)21 b(the)g(connection)g(to)g(w)n(ork)e(in)i
+Fm(get_app_data)208 4295 y Fr(metho)r(d.)0 4442 y Fm(set_connect_stat)o
+(e\()o(\))208 4542 y Fr(Set)21 b(the)g(connection)g(to)g(w)n(ork)e(in)i
(clien)n(t)g(mo)r(de.)35 b(The)21 b(handshak)n(e)f(will)h(b)r(e)g
-(handled)g(automatically)f(b)n(y)h(read/write.)0 4295
-y Fm(setblocking\()p Fd(\035ag)7 b Fm(\))208 4395 y Fr(Call)27
+(handled)g(automatically)f(b)n(y)h(read/write.)0 4689
+y Fm(setblocking\()p Fd(\035ag)7 b Fm(\))208 4788 y Fr(Call)27
b(the)h Fm(setblocking)23 b Fr(metho)r(d)28 b(of)f(the)h(underlying)f
-(so)r(c)n(k)n(et.)0 4542 y Fm(setsockopt\()p Fd(level,)f(optname,)31
-b(value)6 b Fm(\))208 4641 y Fr(Call)27 b(the)h Fm(setsockopt)23
+(so)r(c)n(k)n(et.)0 4935 y Fm(setsockopt\()p Fd(level,)f(optname,)31
+b(value)6 b Fm(\))208 5035 y Fr(Call)27 b(the)h Fm(setsockopt)23
b Fr(metho)r(d)28 b(of)g(the)g(underlying)f(so)r(c)n(k)n(et.)0
-4788 y Fm(shutdown\(\))208 4888 y Fr(Send)35 b(the)h(sh)n(utdo)n(wn)f
+5182 y Fm(shutdown\(\))208 5281 y Fr(Send)35 b(the)h(sh)n(utdo)n(wn)f
(message)f(to)h(the)h(Connection.)60 b(Returns)35 b(true)g(if)h(the)g
-(sh)n(utdo)n(wn)e(message)g(exc)n(hange)g(is)208 4988
+(sh)n(utdo)n(wn)e(message)g(exc)n(hange)g(is)208 5381
y(completed)25 b(and)g(false)h(otherwise)e(\(in)i(whic)n(h)g(case)e(y)n
(ou)h(call)g Fm(recv\(\))e Fr(or)i Fm(send\(\))e Fr(when)j(the)g
-(connection)f(b)r(ecomes)208 5087 y(readable/writeable.)0
-5234 y Fm(get_shutdown\(\))208 5334 y Fr(Get)70 b(the)g(sh)n(utdo)n(wn)
-f(state)g(of)h(the)g(Connection.)162 b(Returns)69 b(a)h(bitv)n(ector)e
-(of)i(either)f(or)g(b)r(oth)h(of)p 0 5549 3901 4 v 0
-5649 a Fg(3.3)82 b Fm(SSL)26 b Fg(\026)i(An)g(interface)g(to)f(the)g
-(SSL-sp)r(eci\034c)h(pa)n(rts)f(of)h(Op)r(enSSL)1611
-b(13)p eop end
+(connection)f(b)r(ecomes)p 0 5549 3901 4 v 0 5649 a Fg(3.3)82
+b Fm(SSL)26 b Fg(\026)i(An)g(interface)g(to)f(the)g(SSL-sp)r(eci\034c)h
+(pa)n(rts)f(of)h(Op)r(enSSL)1611 b(13)p eop end
%%Page: 14 14
-TeXDict begin 14 13 bop 208 83 a Fd(SENT_SHUTDO)n(WN)39
-b Fr(and)27 b Fd(RECEIVED_SHUTDO)n(WN)14 b Fr(.)0 230
-y Fm(set_shutdown\()p Fd(state)6 b Fm(\))208 330 y Fr(Set)21
+TeXDict begin 14 13 bop 208 83 a Fr(readable/writeable.)0
+230 y Fm(get_shutdown\(\))208 330 y Fr(Get)70 b(the)g(sh)n(utdo)n(wn)f
+(state)g(of)h(the)g(Connection.)162 b(Returns)69 b(a)h(bitv)n(ector)e
+(of)i(either)f(or)g(b)r(oth)h(of)208 429 y Fd(SENT_SHUTDO)n(WN)39
+b Fr(and)27 b Fd(RECEIVED_SHUTDO)n(WN)14 b Fr(.)0 576
+y Fm(set_shutdown\()p Fd(state)6 b Fm(\))208 676 y Fr(Set)21
b(the)g(sh)n(utdo)n(wn)g(state)g(of)g(the)g(Connection.)34
b Fd(state)27 b Fr(is)21 b(a)g(bitv)n(ector)f(of)h(either)g(or)f(b)r
-(oth)i(of)27 b Fd(SENT_SHUTDO)n(WN)208 429 y Fr(and)g
-Fd(RECEIVED_SHUTDO)n(WN)14 b Fr(.)0 576 y Fm(sock_shutdown\()p
-Fd(how)9 b Fm(\))208 676 y Fr(Call)27 b(the)h Fm(shutdown)c
+(oth)i(of)27 b Fd(SENT_SHUTDO)n(WN)208 775 y Fr(and)g
+Fd(RECEIVED_SHUTDO)n(WN)14 b Fr(.)0 922 y Fm(sock_shutdown\()p
+Fd(how)9 b Fm(\))208 1022 y Fr(Call)27 b(the)h Fm(shutdown)c
Fr(metho)r(d)k(of)g(the)g(underlying)e(so)r(c)n(k)n(et.)0
-823 y Fm(state_string\(\))208 922 y Fr(Retriev)n(e)g(a)i(v)n(erb)r(ose)
-e(string)g(detailing)i(the)g(state)f(of)h(the)f(Connection.)0
-1069 y Fm(want_read\(\))208 1169 y Fr(Chec)n(ks)f(if)i(more)f(data)g
+1169 y Fm(state_string\(\))208 1268 y Fr(Retriev)n(e)g(a)i(v)n(erb)r
+(ose)e(string)g(detailing)i(the)g(state)f(of)h(the)f(Connection.)0
+1415 y Fm(want_read\(\))208 1515 y Fr(Chec)n(ks)f(if)i(more)f(data)g
(has)g(to)h(b)r(e)g(read)e(from)i(the)f(transp)r(ort)g(la)n(y)n(er)f
-(to)h(complete)h(an)f(op)r(eration.)0 1316 y Fm(want_write\(\))208
-1415 y Fr(Chec)n(ks)f(if)i(there)g(is)f(data)g(to)h(write)f(to)g(the)h
+(to)h(complete)h(an)f(op)r(eration.)0 1662 y Fm(want_write\(\))208
+1761 y Fr(Chec)n(ks)f(if)i(there)g(is)f(data)g(to)h(write)f(to)g(the)h
(transp)r(ort)f(la)n(y)n(er)f(to)h(complete)h(an)f(op)r(eration.)0
-1736 y Fs(4)114 b(Internals)0 1965 y Fr(W)-7 b(e)25 b(ran)g(in)n(to)f
+2083 y Fs(4)114 b(Internals)0 2312 y Fr(W)-7 b(e)25 b(ran)g(in)n(to)f
(three)h(main)g(problems)f(dev)n(eloping)g(this:)36 b(Exceptions,)25
b(callbac)n(ks)f(and)h(accessing)e(so)r(c)n(k)n(et)h(metho)r(ds.)36
-b(This)0 2064 y(is)27 b(what)h(this)g(c)n(hapter)e(is)i(ab)r(out.)0
-2343 y Fk(4.1)97 b(Exceptions)0 2543 y Fr(W)-7 b(e)52
+b(This)0 2412 y(is)27 b(what)h(this)g(c)n(hapter)e(is)i(ab)r(out.)0
+2691 y Fk(4.1)97 b(Exceptions)0 2892 y Fr(W)-7 b(e)52
b(realized)f(early)g(that)h(most)g(of)g(the)g(exceptions)f(w)n(ould)h
(b)r(e)g(raised)f(b)n(y)h(the)g(I/O)f(functions)h(of)g(Op)r(enSSL,)0
-2643 y(so)d(it)i(felt)f(natural)f(to)h(mimic)g(Op)r(enSSL's)g(error)e
+2991 y(so)d(it)i(felt)f(natural)f(to)h(mimic)g(Op)r(enSSL's)g(error)e
(co)r(de)i(system,)55 b(translating)48 b(them)j(in)n(to)e(Python)i
-(exceptions.)0 2743 y(This)30 b(naturally)e(giv)n(es)h(us)h(the)g
+(exceptions.)0 3091 y(This)30 b(naturally)e(giv)n(es)h(us)h(the)g
(exceptions)f Fm(SSL.ZeroReturnEr)o(ro)o(r)p Fr(,)24
b Fm(SSL.WantReadError)o Fr(,)h Fm(SSL.WantWriteEr)o(ro)o(r)p
-Fr(,)0 2842 y Fm(SSL.WantX509Look)o(up)o(Err)o(or)c Fr(and)27
-b Fm(SSL.SysCallError)p Fr(.)0 2989 y(F)-7 b(or)27 b(more)g
+Fr(,)0 3191 y Fm(SSL.WantX509Look)o(up)o(Err)o(or)c Fr(and)27
+b Fm(SSL.SysCallError)p Fr(.)0 3338 y(F)-7 b(or)27 b(more)g
(information)g(ab)r(out)g(this,)h(see)f(section)g(3.3.)0
-3268 y Fk(4.2)97 b(Callbacks)0 3468 y Fr(There)34 b(are)f(a)h(n)n(um)n
+3617 y Fk(4.2)97 b(Callbacks)0 3818 y Fr(There)34 b(are)f(a)h(n)n(um)n
(b)r(er)g(of)h(problems)e(with)i(callbac)n(ks.)56 b(First)34
b(of)g(all,)i(Op)r(enSSL)f(is)f(written)h(as)e(a)h(C)h(library)-7
-b(,)34 b(it's)h(not)0 3568 y(mean)n(t)26 b(to)g(ha)n(v)n(e)e(Python)j
+b(,)34 b(it's)h(not)0 3917 y(mean)n(t)26 b(to)g(ha)n(v)n(e)e(Python)j
(callbac)n(ks,)d(so)i(a)f(w)n(a)n(y)g(around)g(that)h(is)g(needed.)36
b(Another)26 b(problem)f(is)h(thread)g(supp)r(ort.)36
-b(A)26 b(lot)0 3667 y(of)h(the)g(Op)r(enSSL)g(I/O)e(functions)i(can)g
+b(A)26 b(lot)0 4017 y(of)h(the)g(Op)r(enSSL)g(I/O)e(functions)i(can)g
(blo)r(c)n(k)f(if)h(the)g(so)r(c)n(k)n(et)f(is)g(in)h(blo)r(c)n(king)f
(mo)r(de,)h(and)g(then)g(y)n(ou)f(w)n(an)n(t)g(other)g(Python)0
-3767 y(threads)c(to)g(b)r(e)h(able)f(to)g(do)g(other)g(things.)35
+4117 y(threads)c(to)g(b)r(e)h(able)f(to)g(do)g(other)g(things.)35
b(The)22 b(real)g(trouble)g(is)g(if)h(y)n(ou'v)n(e)e(released)g(the)h
(thread)g(lo)r(c)n(k)g(to)g(do)g(a)g(p)r(oten)n(tially)0
-3867 y(blo)r(c)n(king)27 b(op)r(eration,)f(and)i(the)g(op)r(eration)e
+4216 y(blo)r(c)n(king)27 b(op)r(eration,)f(and)i(the)g(op)r(eration)e
(calls)h(a)g(callbac)n(k.)35 b(Then)28 b(w)n(e)f(m)n(ust)h(tak)n(e)f
-(the)h(thread)f(lo)r(c)n(k)g(bac)n(k)3475 3837 y Fl(5)3511
-3867 y Fr(.)0 4014 y(There)d(are)f(t)n(w)n(o)g(solutions)h(to)g(the)h
+(the)h(thread)f(lo)r(c)n(k)g(bac)n(k)3475 4186 y Fl(5)3511
+4216 y Fr(.)0 4363 y(There)d(are)f(t)n(w)n(o)g(solutions)h(to)g(the)h
(\034rst)f(problem,)g(b)r(oth)h(of)f(whic)n(h)g(are)f(necessary)-7
b(.)34 b(The)25 b(\034rst)f(solution)f(to)h(use)h(is)f(if)g(the)h(C)0
-4113 y(callbac)n(k)i(allo)n(ws)f(\021userdata\021)33
+4463 y(callbac)n(k)i(allo)n(ws)f(\021userdata\021)33
b(to)28 b(b)r(e)h(passed)e(to)h(it)g(\(an)g(arbitrary)e(p)r(oin)n(ter)i
(normally\).)37 b(This)28 b(is)g(great!)37 b(W)-7 b(e)28
-b(can)g(set)g(our)0 4213 y(Python)i(function)g(ob)5 b(ject)29
+b(can)g(set)g(our)0 4562 y(Python)i(function)g(ob)5 b(ject)29
b(as)f(the)i(real)f(userdata)f(and)h(em)n(ulate)g(userdata)f(for)h(the)
h(Python)f(function)h(in)g(another)e(w)n(a)n(y)-7 b(.)0
-4312 y(The)24 b(other)g(solution)g(can)g(b)r(e)h(used)g(if)g(an)f(ob)5
+4662 y(The)24 b(other)g(solution)g(can)g(b)r(e)h(used)g(if)g(an)f(ob)5
b(ject)24 b(with)h(an)f(\021app_data\021)29 b(system)c(alw)n(a)n(ys)d
(is)j(passed)e(to)h(the)h(callbac)n(k.)35 b(F)-7 b(or)0
-4412 y(example,)26 b(the)h(SSL)f(ob)5 b(ject)26 b(in)h(Op)r(enSSL)f
+4762 y(example,)26 b(the)h(SSL)f(ob)5 b(ject)26 b(in)h(Op)r(enSSL)f
(has)g(app_data)f(functions)i(and)f(in)h(e.g.)36 b(the)26
b(v)n(eri\034cation)f(callbac)n(ks,)g(y)n(ou)g(can)0
-4512 y(retriev)n(e)i(the)i(related)f(SSL)h(ob)5 b(ject.)39
+4861 y(retriev)n(e)i(the)i(related)f(SSL)h(ob)5 b(ject.)39
b(What)29 b(w)n(e)g(do)f(is)g(to)h(set)f(our)g(wrapp)r(er)g
Fm(Connection)c Fr(ob)5 b(ject)28 b(as)g(app_data)g(for)g(the)0
-4611 y(SSL)g(ob)5 b(ject,)27 b(and)h(w)n(e)f(can)g(easily)g(\034nd)h
-(the)g(Python)g(callbac)n(k.)0 4758 y(The)42 b(other)g(problem)g(is)g
+4961 y(SSL)g(ob)5 b(ject,)27 b(and)h(w)n(e)f(can)g(easily)g(\034nd)h
+(the)g(Python)g(callbac)n(k.)0 5108 y(The)42 b(other)g(problem)g(is)g
(also)f(partially)h(solv)n(ed)f(b)n(y)h(app_data.)80
b(Since)43 b(w)n(e're)e(asso)r(ciating)g(our)g(wrapp)r(er)h(ob)5
-b(jects)0 4858 y(with)44 b(the)f(\021real\021)49 b(ob)5
+b(jects)0 5207 y(with)44 b(the)f(\021real\021)49 b(ob)5
b(jects,)46 b(w)n(e)d(can)g(easily)f(access)g(data)g(from)h(the)h
-Fm(Connection)39 b Fr(ob)5 b(ject.)83 b(The)43 b(solution)g(then)g(is)0
-4957 y(to)35 b(simply)h(include)g(a)f Fm(PyThreadState)c
-Fr(v)-5 b(ariable)34 b(in)i(the)g Fm(Connection)31 b
-Fr(declaration,)37 b(and)e(write)g(macros)f(similar)h(to)0
-5057 y Fm(Py_BEGIN_ALLOW_T)o(HR)o(EAD)o(S)26 b Fr(and)33
-b Fm(Py_END_ALLOW_TH)o(REA)o(DS)26 b Fr(that)33 b(allo)n(ws)e(sp)r
-(ecifying)h(of)h(the)g Fm(PyThreadState)27 b Fr(v)-5
-b(ari-)0 5157 y(able)23 b(to)g(use.)35 b(No)n(w)23 b(w)n(e)g(can)g
-(simply)g(\021b)r(egin)g(allo)n(w)f(threads\021)29 b(b)r(efore)23
-b(a)g(p)r(oten)n(tially)g(blo)r(c)n(king)f(op)r(eration,)h(and)g
-(\021end)g(allo)n(w)0 5256 y(threads\021)33 b(b)r(efore)28
-b(calling)e(a)i(callbac)n(k.)p 0 5323 1560 4 v 92 5377
-a Fi(5)127 5400 y Fh(I'm)22 b(not)j(sure)f(wh)n(y)g(this)g(is)f
-(necessary)-6 b(,)25 b(but)f(otherwise)h(I)f(get)h(a)e(segmen)n(tation)
-i(violation)f(on)g Fa(PyEval_CallObject)p 0 5549 3901
-4 v 0 5649 a Fg(14)3368 b(4)83 b(Internals)p eop end
+Fm(Connection)39 b Fr(ob)5 b(ject.)83 b(The)43 b(solution)g(then)g(is)p
+0 5277 1560 4 v 92 5330 a Fi(5)127 5354 y Fh(I'm)22 b(not)j(sure)f(wh)n
+(y)g(this)g(is)f(necessary)-6 b(,)25 b(but)f(otherwise)h(I)f(get)h(a)e
+(segmen)n(tation)i(violation)f(on)g Fa(PyEval_CallObject)p
+0 5549 3901 4 v 0 5649 a Fg(14)3368 b(4)83 b(Internals)p
+eop end
%%Page: 15 15
-TeXDict begin 15 14 bop 0 83 a Fk(4.3)97 b(A)m(cessing)35
-b(So)s(ck)m(et)e(Metho)s(ds)0 283 y Fr(W)-7 b(e)27 b(quic)n(kly)e(sa)n
-(w)h(the)g(b)r(ene\034t)h(of)g(wrapping)e(so)r(c)n(k)n(et)g(metho)r(ds)
-h(in)h(the)g Fm(SSL.Connection)20 b Fr(class,)26 b(for)g(an)g(easy)f
-(transition)0 383 y(in)n(to)e(using)f(SSL.)h(The)g(problem)f(here)h(is)
-f(that)h(the)h Fm(socket)c Fr(mo)r(dule)j(lac)n(ks)f(a)g(C)h(API,)h
-(and)e(all)h(the)g(metho)r(ds)g(are)f(declared)0 483
-y(static.)36 b(One)27 b(approac)n(h)d(w)n(ould)i(b)r(e)h(to)f(ha)n(v)n
-(e)g Fm(OpenSSL)d Fr(as)j(a)g(submo)r(dule)h(to)f(the)h
-Fm(socket)d Fr(mo)r(dule,)j(placing)f(all)g(the)h(co)r(de)0
-582 y(in)j(`)p Fq(so)r(ck)n(etmo)r(dule.c)p Fr(',)h(but)f(this)g(is)g
-(ob)n(viously)e(not)i(a)f(go)r(o)r(d)g(solution,)h(since)g(y)n(ou)f
-(migh)n(t)g(not)h(w)n(an)n(t)f(to)h(imp)r(ort)g(tonnes)f(of)0
-682 y(extra)f(stu\033)h(y)n(ou're)e(not)i(going)e(to)i(use)f(when)h
+TeXDict begin 15 14 bop 0 83 a Fr(to)35 b(simply)h(include)g(a)f
+Fm(PyThreadState)c Fr(v)-5 b(ariable)34 b(in)i(the)g
+Fm(Connection)31 b Fr(declaration,)37 b(and)e(write)g(macros)f(similar)
+h(to)0 183 y Fm(Py_BEGIN_ALLOW_T)o(HR)o(EAD)o(S)26 b
+Fr(and)33 b Fm(Py_END_ALLOW_TH)o(REA)o(DS)26 b Fr(that)33
+b(allo)n(ws)e(sp)r(ecifying)h(of)h(the)g Fm(PyThreadState)27
+b Fr(v)-5 b(ari-)0 282 y(able)23 b(to)g(use.)35 b(No)n(w)23
+b(w)n(e)g(can)g(simply)g(\021b)r(egin)g(allo)n(w)f(threads\021)29
+b(b)r(efore)23 b(a)g(p)r(oten)n(tially)g(blo)r(c)n(king)f(op)r
+(eration,)h(and)g(\021end)g(allo)n(w)0 382 y(threads\021)33
+b(b)r(efore)28 b(calling)e(a)i(callbac)n(k.)0 662 y Fk(4.3)97
+b(A)m(cessing)35 b(So)s(ck)m(et)e(Metho)s(ds)0 862 y
+Fr(W)-7 b(e)27 b(quic)n(kly)e(sa)n(w)h(the)g(b)r(ene\034t)h(of)g
+(wrapping)e(so)r(c)n(k)n(et)g(metho)r(ds)h(in)h(the)g
+Fm(SSL.Connection)20 b Fr(class,)26 b(for)g(an)g(easy)f(transition)0
+962 y(in)n(to)e(using)f(SSL.)h(The)g(problem)f(here)h(is)f(that)h(the)h
+Fm(socket)c Fr(mo)r(dule)j(lac)n(ks)f(a)g(C)h(API,)h(and)e(all)h(the)g
+(metho)r(ds)g(are)f(declared)0 1061 y(static.)36 b(One)27
+b(approac)n(h)d(w)n(ould)i(b)r(e)h(to)f(ha)n(v)n(e)g
+Fm(OpenSSL)d Fr(as)j(a)g(submo)r(dule)h(to)f(the)h Fm(socket)d
+Fr(mo)r(dule,)j(placing)f(all)g(the)h(co)r(de)0 1161
+y(in)j(`)p Fq(so)r(ck)n(etmo)r(dule.c)p Fr(',)h(but)f(this)g(is)g(ob)n
+(viously)e(not)i(a)f(go)r(o)r(d)g(solution,)h(since)g(y)n(ou)f(migh)n
+(t)g(not)h(w)n(an)n(t)f(to)h(imp)r(ort)g(tonnes)f(of)0
+1261 y(extra)f(stu\033)h(y)n(ou're)e(not)i(going)e(to)i(use)f(when)h
(imp)r(orting)f(the)i Fm(socket)c Fr(mo)r(dule.)40 b(The)29
-b(other)f(approac)n(h)e(is)j(to)f(someho)n(w)0 782 y(get)33
+b(other)f(approac)n(h)e(is)j(to)f(someho)n(w)0 1360 y(get)33
b(a)g(p)r(oin)n(ter)g(to)h(the)f(metho)r(d)h(to)g(b)r(e)f(called,)i
(either)e(the)h(C)g(function,)h(or)e(a)g(callable)f(Python)i(ob)5
-b(ject.)54 b(This)34 b(is)f(not)0 881 y(really)26 b(a)i(go)r(o)r(d)f
+b(ject.)54 b(This)34 b(is)f(not)0 1460 y(really)26 b(a)i(go)r(o)r(d)f
(solution)g(either,)g(since)g(there's)h(a)f(lot)g(of)h(lo)r(okups)f(in)
-n(v)n(olv)n(ed.)0 1028 y(The)h(w)n(a)n(y)f(it)h(w)n(orks)e(is)i(that)h
+n(v)n(olv)n(ed.)0 1607 y(The)h(w)n(a)n(y)f(it)h(w)n(orks)e(is)i(that)h
(y)n(ou)e(ha)n(v)n(e)g(to)g(supply)h(a)g(\020)7 b Fm(socket)p
Fr(-lik)n(e\021)31 b(transp)r(ort)c(ob)5 b(ject)28 b(to)f(the)i
-Fm(SSL.Connection)p Fr(.)j(The)0 1128 y(only)24 b(requiremen)n(t)f(of)i
+Fm(SSL.Connection)p Fr(.)j(The)0 1706 y(only)24 b(requiremen)n(t)f(of)i
(this)f(ob)5 b(ject)24 b(is)h(that)f(it)h(has)f(a)g Fm(fileno\(\))d
Fr(metho)r(d)k(that)f(returns)g(a)g(\034le)g(descriptor)f(that's)i(v)-5
-b(alid)24 b(at)0 1227 y(the)g(C)g(lev)n(el)f(\(i.e.)36
+b(alid)24 b(at)0 1806 y(the)g(C)g(lev)n(el)f(\(i.e.)36
b(y)n(ou)23 b(can)h(use)f(the)i(system)e(calls)g(read)g(and)h(write\).)
35 b(If)25 b(y)n(ou)e(w)n(an)n(t)g(to)h(use)f(the)h Fm(connect\(\))c
-Fr(or)j Fm(accept\(\))0 1327 y Fr(metho)r(ds)29 b(of)h(the)f
+Fr(or)j Fm(accept\(\))0 1906 y Fr(metho)r(ds)29 b(of)h(the)f
Fm(SSL.Connection)24 b Fr(ob)5 b(ject,)29 b(the)h(transp)r(ort)e(ob)5
b(ject)29 b(has)f(to)h(supply)h(suc)n(h)f(metho)r(ds)g(to)r(o.)41
-b(Apart)29 b(from)0 1427 y(them,)c(an)n(y)e(metho)r(d)h(lo)r(okups)f
+b(Apart)29 b(from)0 2005 y(them,)c(an)n(y)e(metho)r(d)h(lo)r(okups)f
(in)h(the)f Fm(SSL.Connection)18 b Fr(ob)5 b(ject)24
b(that)f(fail)h(are)f(passed)f(on)i(to)f(the)h(underlying)f(transp)r
-(ort)0 1526 y(ob)5 b(ject.)0 1673 y(F)-7 b(uture)25 b(c)n(hanges)f
+(ort)0 2105 y(ob)5 b(ject.)0 2252 y(F)-7 b(uture)25 b(c)n(hanges)f
(migh)n(t)h(b)r(e)g(to)g(allo)n(w)f(Python-lev)n(el)g(transp)r(ort)g
(ob)5 b(jects,)25 b(that)g(instead)g(of)g(ha)n(ving)g
-Fm(fileno\(\))d Fr(metho)r(ds,)0 1773 y(ha)n(v)n(e)h
+Fm(fileno\(\))d Fr(metho)r(ds,)0 2351 y(ha)n(v)n(e)h
Fm(read\(\))g Fr(and)h Fm(write\(\))e Fr(metho)r(ds,)k(so)e(more)f(adv)
-5 b(anced)24 b(features)h(of)f(Python)h(can)g(b)r(e)g(used.)35
-b(This)25 b(w)n(ould)f(probably)0 1872 y(en)n(tail)36
+b(This)25 b(w)n(ould)f(probably)0 2451 y(en)n(tail)36
b(some)g(sort)g(of)g(Op)r(enSSL)h(\020BIOs\021,)g(but)g(con)n(v)n
(erting)e(Python)i(strings)e(bac)n(k)h(and)g(forth)g(is)h(exp)r(ensiv)n
-(e,)h(so)e(this)0 1972 y(shouldn't)f(b)r(e)h(used)f(unless)g(necessary)
+(e,)h(so)e(this)0 2551 y(shouldn't)f(b)r(e)h(used)f(unless)g(necessary)
-7 b(.)57 b(Other)35 b(nice)g(things)g(w)n(ould)g(b)r(e)g(to)g(b)r(e)h
(able)e(to)h(pass)g(in)g(di\033eren)n(t)g(transp)r(ort)0
-2072 y(ob)5 b(jects)41 b(for)g(reading)f(and)h(writing,)j(but)e(then)g
+2650 y(ob)5 b(jects)41 b(for)g(reading)f(and)h(writing,)j(but)e(then)g
(the)g Fm(fileno\(\))c Fr(metho)r(d)k(of)47 b Fm(SSL.Connection)36
-b Fr(b)r(ecomes)41 b(virtually)0 2171 y(useless.)36 b(Also,)27
+b Fr(b)r(ecomes)41 b(virtually)0 2750 y(useless.)36 b(Also,)27
b(should)h(the)g(metho)r(d)g(resolution)e(b)r(e)i(used)g(on)f(the)h
(read-transp)r(ort)d(or)i(the)h(write-transp)r(ort?)p
0 5549 3901 4 v 0 5649 a Fg(4.3)82 b(A)n(cessing)26 b(So)r(ck)n(et)h
diff --git a/doc/pyOpenSSL.tex b/doc/pyOpenSSL.tex
index cd399a1..fb6906b 100644
--- a/doc/pyOpenSSL.tex
+++ b/doc/pyOpenSSL.tex
@@ -393,6 +393,10 @@
Return a string giving the DER representation of the name.
\end{methoddesc}
+\begin{methoddesc}[X509Name]{get_components}{}
+Return a list of two-tuples of strings giving the components of the name.
+\end{methoddesc}
+
X509Name objects have the following members:
\begin{memberdesc}[X509Name]{countryName}
diff --git a/doc/pyOpenSSL.txt b/doc/pyOpenSSL.txt
index a66774e..8a7a403 100644
--- a/doc/pyOpenSSL.txt
+++ b/doc/pyOpenSSL.txt
@@ -345,6 +345,10 @@
der()
Return a string giving the DER representation of the name.
+ get_components()
+ Return a list of two-tuples of strings giving the components of
+ the name.
+
X509Name objects have the following members:
countryName
diff --git a/src/crypto/x509name.c b/src/crypto/x509name.c
index 5827ccb..06c0153 100644
--- a/src/crypto/x509name.c
+++ b/src/crypto/x509name.c
@@ -274,6 +274,60 @@
}
+static char crypto_X509Name_get_components_doc[] = "\n\
+Returns the split-up components of this name.\n\
+\n\
+Arguments: self - The X509 object\n\
+ args - The Python argument tuple, should be empty\n\
+Returns: List of tuples (name, value).\n\
+";
+
+static PyObject *
+crypto_X509Name_get_components(crypto_X509NameObj *self, PyObject *args)
+{
+ int n, i;
+ X509_NAME *name = self->x509_name;
+ PyObject *list;
+
+ if (!PyArg_ParseTuple(args, ":get_components"))
+ return NULL;
+
+ n = X509_NAME_entry_count(name);
+ list = PyList_New(n);
+ for (i = 0; i < n; i++)
+ {
+ X509_NAME_ENTRY *ent;
+ ASN1_OBJECT *fname;
+ ASN1_STRING *fval;
+ int nid;
+ int l;
+ unsigned char buf[100];
+ unsigned char *str;
+ PyObject *tuple;
+
+ ent = X509_NAME_get_entry(name, i);
+
+ fname = X509_NAME_ENTRY_get_object(ent);
+ fval = X509_NAME_ENTRY_get_data(ent);
+
+ l = ASN1_STRING_length(fval);
+ str = ASN1_STRING_data(fval);
+
+ nid = OBJ_obj2nid(fname);
+
+ /* printf("fname is %s len=%d str=%s\n", OBJ_nid2sn(nid), l, str); */
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, PyString_FromString(OBJ_nid2sn(nid)));
+ PyTuple_SetItem(tuple, 1, PyString_FromStringAndSize(str, l));
+
+ PyList_SetItem(list, i, tuple);
+ }
+
+ return list;
+}
+
+
/*
* Call the visitproc on all contained objects.
*
@@ -337,6 +391,7 @@
{
ADD_METHOD(hash),
ADD_METHOD(der),
+ ADD_METHOD(get_components),
{ NULL, NULL }
};
#undef ADD_METHOD
diff --git a/test/test_crypto.py b/test/test_crypto.py
index 7649f44..b44f345 100644
--- a/test/test_crypto.py
+++ b/test/test_crypto.py
@@ -288,6 +288,20 @@
'1\x0c0\n\x06\x03U\x04\x03\x13\x03foo')
+ def test_get_components(self):
+ """
+ L{X509Name.get_components} returns a C{list} of two-tuples of C{str}
+ giving the NIDs and associated values which make up the name.
+ """
+ a = self._x509name()
+ self.assertEqual(a.get_components(), [])
+ a.CN = "foo"
+ self.assertEqual(a.get_components(), [("CN", "foo")])
+ a.organizationalUnitName = "bar"
+ self.assertEqual(
+ a.get_components(),
+ [("CN", "foo"), ("OU", "bar")])
+
class _PKeyInteractionTestsMixin:
"""