1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>3.1 crypto -- Generic cryptographic module </title>
<META NAME="description" CONTENT="3.1 crypto -- Generic cryptographic module ">
<META NAME="keywords" CONTENT="pyOpenSSL">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<link rel="STYLESHEET" href="pyOpenSSL.css">
<LINK REL="next" href="openssl-rand.html">
<LINK REL="previous" href="openssl.html">
<LINK REL="up" href="openssl.html">
<LINK REL="next" href="openssl-x509.html">
</head>
<body>
<DIV CLASS="navigation">
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="openssl.html"><img src="previous.gif"
border="0" height="32"
alt="Previous Page" width="32"></A></td>
<td><A href="openssl.html"><img src="up.gif"
border="0" height="32"
alt="Up One Level" width="32"></A></td>
<td><A href="openssl-x509.html"><img src="next.gif"
border="0" height="32"
alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python OpenSSL Manual</td>
<td><A href="contents.html"><img src="contents.gif"
border="0" height="32"
alt="Contents" width="32"></A></td>
<td><img src="blank.gif"
border="0" height="32"
alt="" width="32"></td>
<td><img src="blank.gif"
border="0" height="32"
alt="" width="32"></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl.html">3 OpenSSL </A>
<b class="navlabel">Up:</b> <a class="sectref" href="openssl.html">3 OpenSSL </A>
<b class="navlabel">Next:</b> <a class="sectref" href="openssl-x509.html">3.1.1 X509 objects</A>
<br><hr>
</DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION000410000000000000000"> </A>
<BR>
3.1 <tt class="module">crypto</tt> -- Generic cryptographic module
</H2>
<P>
<P>
<dl><dt><b><a name='l2h-6'><tt>X509Type</tt></a></b>
<dd>
A Python type object representing the X509 object type.
</dl>
<P>
<dl><dt><b><a name='l2h-7'><tt class='function'>X509</tt></a></b>()
<dd>
Factory function that creates an X509 object.
</dl>
<P>
<dl><dt><b><a name='l2h-8'><tt>X509NameType</tt></a></b>
<dd>
A Python type object representing the X509Name object type.
</dl>
<P>
<dl><dt><b><a name='l2h-9'><tt class='function'>X509Name</tt></a></b>(<var>x509name</var>)
<dd>
Factory function that creates a copy of <var>x509name</var>.
</dl>
<P>
<dl><dt><b><a name='l2h-10'><tt>X509ReqType</tt></a></b>
<dd>
A Python type object representing the X509Req object type.
</dl>
<P>
<dl><dt><b><a name='l2h-11'><tt class='function'>X509Req</tt></a></b>()
<dd>
Factory function that creates an X509Req object.
</dl>
<P>
<dl><dt><b><a name='l2h-12'><tt>X509StoreType</tt></a></b>
<dd>
A Python type object representing the X509Store object type.
</dl>
<P>
<dl><dt><b><a name='l2h-13'><tt>PKeyType</tt></a></b>
<dd>
A Python type object representing the PKey object type.
</dl>
<P>
<dl><dt><b><a name='l2h-14'><tt class='function'>PKey</tt></a></b>()
<dd>
Factory function that creates a PKey object.
</dl>
<P>
<dl><dt><b><a name='l2h-15'><tt>PKCS7Type</tt></a></b>
<dd>
A Python type object representing the PKCS7 object type.
</dl>
<P>
<dl><dt><b><a name='l2h-16'><tt>PKCS12Type</tt></a></b>
<dd>
A Python type object representing the PKCS12 object type.
</dl>
<P>
<dl><dt><b><a name='l2h-17'><tt>X509ExtensionType</tt></a></b>
<dd>
A Python type object representing the X509Extension object type.
</dl>
<P>
<dl><dt><b><a name='l2h-18'><tt class='function'>X509Extension</tt></a></b>(<var>typename, critical, value</var>)
<dd>
Factory function that creates a X509Extension object.
</dl>
<P>
<dl><dt><b><a name='l2h-19'><tt>NetscapeSPKIType</tt></a></b>
<dd>
A Python type object representing the NetscapeSPKI object type.
</dl>
<P>
<dl><dt><b><a name='l2h-20'><tt class='function'>NetscapeSPKI</tt></a></b>(<big>[</big><var>enc</var><big>]</big>)
<dd>
Factory function that creates a NetscapeSPKI object. If the <var>enc</var> argument
is present, it should be a base64-encoded string representing a NetscapeSPKI
object, as returned by the <tt class="method">b64_encode</tt> method.
</dl>
<P>
<dl><dt><b><a name='l2h-21'><tt>FILETYPE_PEM</tt></a></b>
<dd>
<dt><b><a name='l2h-32'><tt>FILETYPE_ASN1</tt></a></b><dd>
File type constants.
</dl>
<P>
<dl><dt><b><a name='l2h-22'><tt>TYPE_RSA</tt></a></b>
<dd>
<dt><b><a name='l2h-33'><tt>TYPE_DSA</tt></a></b><dd>
Key type constants.
</dl>
<P>
<dl><dt><b>exception <a name='l2h-23'><tt class='exception'>Error</tt></a></b>
<dd>
Generic exception used in the <tt class="module">crypto</tt> module.
</dl>
<P>
<dl><dt><b><a name='l2h-24'><tt class='function'>dump_certificate</tt></a></b>(<var>type, cert</var>)
<dd>
Dump the certificate <var>cert</var> into a buffer string encoded with the type
<var>type</var>.
</dl>
<P>
<dl><dt><b><a name='l2h-25'><tt class='function'>dump_certificate_request</tt></a></b>(<var>type, req</var>)
<dd>
Dump the certificate request <var>req</var> into a buffer string encoded with the
type <var>type</var>.
</dl>
<P>
<dl><dt><b><a name='l2h-26'><tt class='function'>dump_privatekey</tt></a></b>(<var>type, pkey</var><big>[</big><var>, cipher, passphrase</var><big>]</big>)
<dd>
Dump the private key <var>pkey</var> into a buffer string encoded with the type
<var>type</var>, optionally (if <var>type</var> is <tt class="constant">FILETYPE_PEM</tt>) encrypting it
using <var>cipher</var> and <var>passphrase</var>.
<P>
<var>passphrase</var> must be either a string or a callback for providing the
pass phrase.
</dl>
<P>
<dl><dt><b><a name='l2h-27'><tt class='function'>load_certificate</tt></a></b>(<var>type, buffer</var>)
<dd>
Load a certificate (X509) from the string <var>buffer</var> encoded with the
type <var>type</var>.
</dl>
<P>
<dl><dt><b><a name='l2h-28'><tt class='function'>load_certificate_request</tt></a></b>(<var>type, buffer</var>)
<dd>
Load a certificate request (X509Req) from the string <var>buffer</var> encoded with
the type <var>type</var>.
</dl>
<P>
<dl><dt><b><a name='l2h-29'><tt class='function'>load_privatekey</tt></a></b>(<var>type, buffer</var><big>[</big><var>, passphrase</var><big>]</big>)
<dd>
Load a private key (PKey) from the string <var>buffer</var> encoded with
the type <var>type</var> (must be one of <tt class="constant">FILETYPE_PEM</tt> and
<tt class="constant">FILETYPE_ASN1</tt>).
<P>
<var>passphrase</var> must be either a string or a callback for providing the
pass phrase.
</dl>
<P>
<dl><dt><b><a name='l2h-30'><tt class='function'>load_pkcs7_data</tt></a></b>(<var>type, buffer</var>)
<dd>
Load pkcs7 data from the string <var>buffer</var> encoded with the type <var>type</var>.
</dl>
<P>
<dl><dt><b><a name='l2h-31'><tt class='function'>load_pkcs12</tt></a></b>(<var>buffer</var><big>[</big><var>, passphrase</var><big>]</big>)
<dd>
Load pkcs12 data from the string <var>buffer</var>. If the pkcs12 structure is
encrypted, a <var>passphrase</var> must be included.
</dl>
<P>
<p><hr>
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html137"
href="openssl-x509.html">3.1.1 X509 objects </A>
<LI><A NAME="tex2html138"
href="openssl-x509name.html">3.1.2 X509Name objects </A>
<LI><A NAME="tex2html139"
href="openssl-x509req.html">3.1.3 X509Req objects </A>
<LI><A NAME="tex2html140"
href="openssl-x509store.html">3.1.4 X509Store objects </A>
<LI><A NAME="tex2html141"
href="openssl-pkey.html">3.1.5 PKey objects </A>
<LI><A NAME="tex2html142"
href="openssl-pkcs7.html">3.1.6 PKCS7 objects </A>
<LI><A NAME="tex2html143"
href="openssl-pkcs12.html">3.1.7 PKCS12 objects </A>
<LI><A NAME="tex2html144"
href="openssl-509ext.html">3.1.8 X509Extension objects </A>
<LI><A NAME="tex2html145"
href="openssl-netscape-spki.html">3.1.9 NetscapeSPKI objects </A>
</UL>
<!--End of Table of Child-Links-->
<DIV CLASS="navigation">
<p><hr>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="openssl.html"><img src="previous.gif"
border="0" height="32"
alt="Previous Page" width="32"></A></td>
<td><A href="openssl.html"><img src="up.gif"
border="0" height="32"
alt="Up One Level" width="32"></A></td>
<td><A href="openssl-x509.html"><img src="next.gif"
border="0" height="32"
alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python OpenSSL Manual</td>
<td><A href="contents.html"><img src="contents.gif"
border="0" height="32"
alt="Contents" width="32"></A></td>
<td><img src="blank.gif"
border="0" height="32"
alt="" width="32"></td>
<td><img src="blank.gif"
border="0" height="32"
alt="" width="32"></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="openssl.html">3 OpenSSL </A>
<b class="navlabel">Up:</b> <a class="sectref" href="openssl.html">3 OpenSSL </A>
<b class="navlabel">Next:</b> <a class="sectref" href="openssl-x509.html">3.1.1 X509 objects</A>
<hr>
<span class="release-info">Release 0.6.</span>
</DIV>
<!--End of Navigation Panel-->
</BODY>
</HTML>
|