55
55
Context, Connection.
58
<dl><dt><b><a name='l2h-124'><tt>SSLv2_METHOD</tt></a></b>
58
<dl><dt><b><a name='l2h-128'><tt>SSLv2_METHOD</tt></a></b>
60
<dt><b><a name='l2h-138'><tt>SSLv3_METHOD</tt></a></b><dd>
61
<dt><b><a name='l2h-139'><tt>SSLv23_METHOD</tt></a></b><dd>
62
<dt><b><a name='l2h-140'><tt>TLSv1_METHOD</tt></a></b><dd>
60
<dt><b><a name='l2h-142'><tt>SSLv3_METHOD</tt></a></b><dd>
61
<dt><b><a name='l2h-143'><tt>SSLv23_METHOD</tt></a></b><dd>
62
<dt><b><a name='l2h-144'><tt>TLSv1_METHOD</tt></a></b><dd>
63
63
These constants represent the different SSL methods to use when creating a
68
<dl><dt><b><a name='l2h-125'><tt>VERIFY_NONE</tt></a></b>
68
<dl><dt><b><a name='l2h-129'><tt>VERIFY_NONE</tt></a></b>
70
<dt><b><a name='l2h-141'><tt>VERIFY_PEER</tt></a></b><dd>
71
<dt><b><a name='l2h-142'><tt>VERIFY_FAIL_IF_NO_PEER_CERT</tt></a></b><dd>
70
<dt><b><a name='l2h-145'><tt>VERIFY_PEER</tt></a></b><dd>
71
<dt><b><a name='l2h-146'><tt>VERIFY_FAIL_IF_NO_PEER_CERT</tt></a></b><dd>
72
72
These constants represent the verification mode used by the Context
73
73
object's <tt class="method">set_verify</tt> method.
77
<dl><dt><b><a name='l2h-126'><tt>FILETYPE_PEM</tt></a></b>
77
<dl><dt><b><a name='l2h-130'><tt>FILETYPE_PEM</tt></a></b>
79
<dt><b><a name='l2h-143'><tt>FILETYPE_ASN1</tt></a></b><dd>
79
<dt><b><a name='l2h-147'><tt>FILETYPE_ASN1</tt></a></b><dd>
80
80
File type constants used with the <tt class="method">use_certificate_file</tt> and
81
81
<tt class="method">use_privatekey_file</tt> methods of Context objects.
85
<dl><dt><b><a name='l2h-127'><tt>OP_SINGLE_DH_USE</tt></a></b>
85
<dl><dt><b><a name='l2h-131'><tt>OP_SINGLE_DH_USE</tt></a></b>
87
<dt><b><a name='l2h-144'><tt>OP_EPHEMERAL_RSA</tt></a></b><dd>
88
<dt><b><a name='l2h-145'><tt>OP_NO_SSLv2</tt></a></b><dd>
89
<dt><b><a name='l2h-146'><tt>OP_NO_SSLv3</tt></a></b><dd>
90
<dt><b><a name='l2h-147'><tt>OP_NO_TLSv1</tt></a></b><dd>
87
<dt><b><a name='l2h-148'><tt>OP_EPHEMERAL_RSA</tt></a></b><dd>
88
<dt><b><a name='l2h-149'><tt>OP_NO_SSLv2</tt></a></b><dd>
89
<dt><b><a name='l2h-150'><tt>OP_NO_SSLv3</tt></a></b><dd>
90
<dt><b><a name='l2h-151'><tt>OP_NO_TLSv1</tt></a></b><dd>
91
91
Constants used with <tt class="method">set_options</tt> of Context objects.
92
92
<tt class="constant">OP_SINGLE_DH_USE</tt> means to always create a new key when using ephemeral
93
93
Diffie-Hellman. <tt class="constant">OP_EPHEMERAL_RSA</tt> means to always use ephemeral RSA keys
101
<dl><dt><b><a name='l2h-128'><tt>ContextType</tt></a></b>
101
<dl><dt><b><a name='l2h-132'><tt>ContextType</tt></a></b>
103
103
See <tt class="class">Context</tt>.
107
<dl><dt><b>class <a name='l2h-129'><tt class='class'>Context</tt></a></b>(<var>method</var>)
107
<dl><dt><b>class <a name='l2h-133'><tt class='class'>Context</tt></a></b>(<var>method</var>)
109
109
A class representing SSL contexts. Contexts define the parameters of one or
110
110
more SSL connections.
118
<dl><dt><b><a name='l2h-130'><tt>ConnectionType</tt></a></b>
118
<dl><dt><b><a name='l2h-134'><tt>ConnectionType</tt></a></b>
120
120
See <tt class="class">Connection</tt>.
124
<dl><dt><b>class <a name='l2h-131'><tt class='class'>Connection</tt></a></b>(<var>context, socket</var>)
124
<dl><dt><b>class <a name='l2h-135'><tt class='class'>Connection</tt></a></b>(<var>context, socket</var>)
126
126
A class representing SSL connections.
129
129
<var>context</var> should be an instance of <tt class="class">Context</tt> and <var>socket</var>
130
130
should be a socket <A NAME="tex2html4"
131
HREF="#foot1208"><SUP>3</SUP></A> object. <var>socket</var> may be
131
HREF="#foot1231"><SUP>3</SUP></A> object. <var>socket</var> may be
132
132
<var>None</var>; in this case, the Connection is created with a memory BIO: see
133
133
the <tt class="method">bio_read</tt>, <tt class="method">bio_write</tt>, and <tt class="method">bio_shutdown</tt>
138
<dl><dt><b>exception <a name='l2h-132'><tt class='exception'>Error</tt></a></b>
138
<dl><dt><b>exception <a name='l2h-136'><tt class='exception'>Error</tt></a></b>
140
140
This exception is used as a base class for the other SSL-related
141
141
exceptions, but may also be raised directly.
152
<dl><dt><b>exception <a name='l2h-133'><tt class='exception'>ZeroReturnError</tt></a></b>
152
<dl><dt><b>exception <a name='l2h-137'><tt class='exception'>ZeroReturnError</tt></a></b>
154
154
This exception matches the error return code <code>SSL_ERROR_ZERO_RETURN</code>, and
155
155
is raised when the SSL Connection has been closed. In SSL 3.0 and TLS 1.0, this
166
<dl><dt><b>exception <a name='l2h-134'><tt class='exception'>WantReadError</tt></a></b>
166
<dl><dt><b>exception <a name='l2h-138'><tt class='exception'>WantReadError</tt></a></b>
168
168
The operation did not complete; the same I/O method should be called again
169
169
later, with the same arguments. Any I/O method can lead to this since new
183
<dl><dt><b>exception <a name='l2h-135'><tt class='exception'>WantWriteError</tt></a></b>
183
<dl><dt><b>exception <a name='l2h-139'><tt class='exception'>WantWriteError</tt></a></b>
185
185
See <tt class="exception">WantReadError</tt>. The socket send buffer may be too full to
190
<dl><dt><b>exception <a name='l2h-136'><tt class='exception'>WantX509LookupError</tt></a></b>
190
<dl><dt><b>exception <a name='l2h-140'><tt class='exception'>WantX509LookupError</tt></a></b>
192
192
The operation did not complete because an application callback has asked to be
193
193
called again. The I/O method should be called again later, with the same
199
<dl><dt><b>exception <a name='l2h-137'><tt class='exception'>SysCallError</tt></a></b>
199
<dl><dt><b>exception <a name='l2h-141'><tt class='exception'>SysCallError</tt></a></b>
201
201
The <tt class="exception">SysCallError</tt> occurs when there's an I/O error and OpenSSL's
202
202
error queue does not contain any information. This can mean two things: An
209
209
<BR><HR><H4>Footnotes</H4>
211
<DT><A NAME="foot1208">... socket</A><A
211
<DT><A NAME="foot1231">... socket</A><A
212
212
href="openssl-ssl.html#tex2html4"><SUP>3</SUP></A></DT>
213
213
<DD>Actually, all that is required is an object
214
214
that <i>behaves</i> like a socket, you could even use files, even though
221
221
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
223
223
<UL CLASS="ChildLinks">
224
<LI><A NAME="tex2html289"
224
<LI><A NAME="tex2html303"
225
225
href="openssl-context.html">3.3.1 Context objects </A>
226
<LI><A NAME="tex2html290"
226
<LI><A NAME="tex2html304"
227
227
href="openssl-connection.html">3.3.2 Connection objects </A>
229
229
<!--End of Table of Child-Links-->