summaryrefslogtreecommitdiff
path: root/doc/html/openssl-connection.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/openssl-connection.html')
-rw-r--r--doc/html/openssl-connection.html110
1 files changed, 70 insertions, 40 deletions
diff --git a/doc/html/openssl-connection.html b/doc/html/openssl-connection.html
index 36441af..c4f7d88 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-179'><tt class='method'>accept</tt></a></b>()
+<dl><dt><b><a name='l2h-188'><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 @@ socket's <tt class="method">accept</tt>.
</dl>
<P>
-<dl><dt><b><a name='l2h-180'><tt class='method'>bind</tt></a></b>(<var>address</var>)
+<dl><dt><b><a name='l2h-189'><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-181'><tt class='method'>close</tt></a></b>()
+<dl><dt><b><a name='l2h-190'><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-182'><tt class='method'>connect</tt></a></b>(<var>address</var>)
+<dl><dt><b><a name='l2h-191'><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 @@ creation.
</dl>
<P>
-<dl><dt><b><a name='l2h-183'><tt class='method'>connect_ex</tt></a></b>(<var>address</var>)
+<dl><dt><b><a name='l2h-192'><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 @@ return 0, SSL won't be initialized.
</dl>
<P>
-<dl><dt><b><a name='l2h-184'><tt class='method'>do_handshake</tt></a></b>()
+<dl><dt><b><a name='l2h-193'><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 @@ same exceptions as <tt class="method">send</tt> and <tt class="method">recv</tt>
</dl>
<P>
-<dl><dt><b><a name='l2h-185'><tt class='method'>fileno</tt></a></b>()
+<dl><dt><b><a name='l2h-194'><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-186'><tt class='method'>listen</tt></a></b>(<var>backlog</var>)
+<dl><dt><b><a name='l2h-195'><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-187'><tt class='method'>get_app_data</tt></a></b>()
+<dl><dt><b><a name='l2h-196'><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-188'><tt class='method'>get_cipher_list</tt></a></b>()
+<dl><dt><b><a name='l2h-197'><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,7 +125,7 @@ but not it returns the entire list in one go.
</dl>
<P>
-<dl><dt><b><a name='l2h-189'><tt class='method'>get_client_ca_list</tt></a></b>()
+<dl><dt><b><a name='l2h-198'><tt class='method'>get_client_ca_list</tt></a></b>()
<dd>
Retrieve the list of preferred client certificate issuers sent by the server
as <tt class="class">OpenSSL.crypto.X509Name</tt> objects.
@@ -146,44 +146,56 @@ by this <tt class="class">Connection</tt>'s <tt class="class">Context</tt>.
</dl>
<P>
-<dl><dt><b><a name='l2h-190'><tt class='method'>get_context</tt></a></b>()
+<dl><dt><b><a name='l2h-199'><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-191'><tt class='method'>get_peer_certificate</tt></a></b>()
+<dl><dt><b><a name='l2h-200'><tt class='method'>set_context</tt></a></b>(<var>context</var>)
+<dd>
+Specify a replacement Context object for this Connection.
+</dl>
+
+<P>
+<dl><dt><b><a name='l2h-201'><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-192'><tt class='method'>getpeername</tt></a></b>()
+<dl><dt><b><a name='l2h-202'><tt class='method'>get_peer_cert_chain</tt></a></b>()
+<dd>
+Retrieve the tuple of the other side's certificate chain (if any)
+</dl>
+
+<P>
+<dl><dt><b><a name='l2h-203'><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-193'><tt class='method'>getsockname</tt></a></b>()
+<dl><dt><b><a name='l2h-204'><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-194'><tt class='method'>getsockopt</tt></a></b>(<var>level, optname</var><big>[</big><var>, buflen</var><big>]</big>)
+<dl><dt><b><a name='l2h-205'><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-195'><tt class='method'>pending</tt></a></b>()
+<dl><dt><b><a name='l2h-206'><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-196'><tt class='method'>recv</tt></a></b>(<var>bufsize</var>)
+<dl><dt><b><a name='l2h-207'><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
@@ -191,7 +203,7 @@ by <var>bufsize</var>.
</dl>
<P>
-<dl><dt><b><a name='l2h-197'><tt class='method'>bio_write</tt></a></b>(<var>bytes</var>)
+<dl><dt><b><a name='l2h-208'><tt class='method'>bio_write</tt></a></b>(<var>bytes</var>)
<dd>
If the Connection was created with a memory BIO, this method can be used to add
bytes to the read end of that memory BIO. The Connection can then read the
@@ -199,20 +211,20 @@ bytes (for example, in response to a call to <tt class="method">recv</tt>).
</dl>
<P>
-<dl><dt><b><a name='l2h-198'><tt class='method'>renegotiate</tt></a></b>()
+<dl><dt><b><a name='l2h-209'><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-199'><tt class='method'>send</tt></a></b>(<var>string</var>)
+<dl><dt><b><a name='l2h-210'><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-200'><tt class='method'>bio_read</tt></a></b>(<var>bufsize</var>)
+<dl><dt><b><a name='l2h-211'><tt class='method'>bio_read</tt></a></b>(<var>bufsize</var>)
<dd>
If the Connection was created with a memory BIO, this method can be used to
read bytes from the write end of that memory BIO. Many Connection methods will
@@ -221,7 +233,7 @@ up and the Connection will be able to take no further actions.
</dl>
<P>
-<dl><dt><b><a name='l2h-201'><tt class='method'>sendall</tt></a></b>(<var>string</var>)
+<dl><dt><b><a name='l2h-212'><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
@@ -229,40 +241,40 @@ how much data has been sent.
</dl>
<P>
-<dl><dt><b><a name='l2h-202'><tt class='method'>set_accept_state</tt></a></b>()
+<dl><dt><b><a name='l2h-213'><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-203'><tt class='method'>set_app_data</tt></a></b>(<var>data</var>)
+<dl><dt><b><a name='l2h-214'><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-204'><tt class='method'>set_connect_state</tt></a></b>()
+<dl><dt><b><a name='l2h-215'><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-205'><tt class='method'>setblocking</tt></a></b>(<var>flag</var>)
+<dl><dt><b><a name='l2h-216'><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-206'><tt class='method'>setsockopt</tt></a></b>(<var>level, optname, value</var>)
+<dl><dt><b><a name='l2h-217'><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-207'><tt class='method'>shutdown</tt></a></b>()
+<dl><dt><b><a name='l2h-218'><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
@@ -271,27 +283,27 @@ readable/writeable.
</dl>
<P>
-<dl><dt><b><a name='l2h-208'><tt class='method'>get_shutdown</tt></a></b>()
+<dl><dt><b><a name='l2h-219'><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-209'><tt class='method'>set_shutdown</tt></a></b>(<var>state</var>)
+<dl><dt><b><a name='l2h-220'><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-210'><tt class='method'>sock_shutdown</tt></a></b>(<var>how</var>)
+<dl><dt><b><a name='l2h-221'><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-211'><tt class='method'>bio_shutdown</tt></a></b>()
+<dl><dt><b><a name='l2h-222'><tt class='method'>bio_shutdown</tt></a></b>()
<dd>
If the Connection was created with a memory BIO, this method can be used to
indicate that ``end of file'' has been reached on the read end of that memory
@@ -299,44 +311,62 @@ BIO.
</dl>
<P>
-<dl><dt><b><a name='l2h-212'><tt class='method'>state_string</tt></a></b>()
+<dl><dt><b><a name='l2h-223'><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-213'><tt class='method'>client_random</tt></a></b>()
+<dl><dt><b><a name='l2h-224'><tt class='method'>client_random</tt></a></b>()
<dd>
Retrieve the random value used with the client hello message.
</dl>
<P>
-<dl><dt><b><a name='l2h-214'><tt class='method'>server_random</tt></a></b>()
+<dl><dt><b><a name='l2h-225'><tt class='method'>server_random</tt></a></b>()
<dd>
Retrieve the random value used with the server hello message.
</dl>
<P>
-<dl><dt><b><a name='l2h-215'><tt class='method'>master_key</tt></a></b>()
+<dl><dt><b><a name='l2h-226'><tt class='method'>master_key</tt></a></b>()
<dd>
Retrieve the value of the master key for this session.
</dl>
<P>
-<dl><dt><b><a name='l2h-216'><tt class='method'>want_read</tt></a></b>()
+<dl><dt><b><a name='l2h-227'><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-217'><tt class='method'>want_write</tt></a></b>()
+<dl><dt><b><a name='l2h-228'><tt class='method'>want_write</tt></a></b>()
<dd>
Checks if there is data to write to the transport layer to complete an
operation.
</dl>
<P>
+<dl><dt><b><a name='l2h-229'><tt class='method'>set_tlsext_host_name</tt></a></b>(<var>name</var>)
+<dd>
+Specify the byte string to send as the server name in the client hello message.
+
+<span class='versionnote'>New in version 0.13.</span>
+
+</dl>
+
+<P>
+<dl><dt><b><a name='l2h-230'><tt class='method'>get_servername</tt></a></b>()
+<dd>
+Get the value of the server name received in the client hello message.
+
+<span class='versionnote'>New in version 0.13.</span>
+
+</dl>
+
+<P>
<DIV CLASS="navigation">
<p><hr>
@@ -366,7 +396,7 @@ operation.
<b class="navlabel">Up:</b> <a class="sectref" href="openssl-ssl.html">3.3 SSL </A>
<b class="navlabel">Next:</b> <a class="sectref" href="internals.html">4 Internals</A>
<hr>
-<span class="release-info">Release 0.12.</span>
+<span class="release-info">Release 0.13.</span>
</DIV>
<!--End of Navigation Panel-->