diff options
| author | Matěj Cepl <mcepl@cepl.eu> | 2017-04-20 23:52:50 +0200 |
|---|---|---|
| committer | Matěj Cepl <mcepl@cepl.eu> | 2017-09-20 21:13:34 +0200 |
| commit | bbf99577b2f9d071728f2e76263b14bf8f1d7580 (patch) | |
| tree | 50495a03042b4bb8b937230080a4276858453037 /doc/html/M2Crypto.html | |
| parent | 3da7124872c6e13bc30ba5da9799bb4abc8a2404 (diff) | |
| download | m2crypto-bbf99577b2f9d071728f2e76263b14bf8f1d7580.tar.gz | |
Add generated HTML docs.
Diffstat (limited to 'doc/html/M2Crypto.html')
| -rw-r--r-- | doc/html/M2Crypto.html | 4720 |
1 files changed, 4720 insertions, 0 deletions
diff --git a/doc/html/M2Crypto.html b/doc/html/M2Crypto.html new file mode 100644 index 0000000..f3775c2 --- /dev/null +++ b/doc/html/M2Crypto.html @@ -0,0 +1,4720 @@ + + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>M2Crypto Package — M2Crypto documentation</title> + + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="M2Crypto documentation" href="index.html" /> + <link rel="next" title="PGP Package" href="M2Crypto.PGP.html" /> + <link rel="prev" title="Welcome to M2Crypto’s documentation!" href="index.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="py-modindex.html" title="Python Module Index" + >modules</a> |</li> + <li class="right" > + <a href="M2Crypto.PGP.html" title="PGP Package" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="index.html" title="Welcome to M2Crypto’s documentation!" + accesskey="P">previous</a> |</li> + <li><a href="index.html">M2Crypto documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="m2crypto-package"> +<h1>M2Crypto Package<a class="headerlink" href="#m2crypto-package" title="Permalink to this headline">¶</a></h1> +<div class="section" id="id1"> +<h2><tt class="xref py py-mod docutils literal"><span class="pre">M2Crypto</span></tt> Package<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2> +<span class="target" id="module-M2Crypto.__init__"></span></div> +<div class="section" id="module-M2Crypto.ASN1"> +<span id="asn1-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">ASN1</span></tt> Module<a class="headerlink" href="#module-M2Crypto.ASN1" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.ASN1.ASN1_Integer"> +<em class="property">class </em><tt class="descclassname">M2Crypto.ASN1.</tt><tt class="descname">ASN1_Integer</tt><big>(</big><em>asn1int</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#ASN1_Integer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.ASN1_Integer" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.ASN1.ASN1_Integer.m2_asn1_integer_free"> +<tt class="descname">m2_asn1_integer_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.ASN1.ASN1_Integer.m2_asn1_integer_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.ASN1.ASN1_Object"> +<em class="property">class </em><tt class="descclassname">M2Crypto.ASN1.</tt><tt class="descname">ASN1_Object</tt><big>(</big><em>asn1obj</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#ASN1_Object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.ASN1_Object" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.ASN1.ASN1_Object.m2_asn1_object_free"> +<tt class="descname">m2_asn1_object_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.ASN1.ASN1_Object.m2_asn1_object_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.ASN1.ASN1_String"> +<em class="property">class </em><tt class="descclassname">M2Crypto.ASN1.</tt><tt class="descname">ASN1_String</tt><big>(</big><em>asn1str</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#ASN1_String"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.ASN1_String" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.ASN1.ASN1_String.as_text"> +<tt class="descname">as_text</tt><big>(</big><em>flags=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#ASN1_String.as_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.ASN1_String.as_text" title="Permalink to this definition">¶</a></dt> +<dd><p>output an ASN1_STRING structure according to the set flags.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>flags</strong> – determine the format of the output by using +predetermined constants, see ASN1_STRING_print_ex(3) +manpage for their meaning.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">output an ASN1_STRING structure.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ASN1.ASN1_String.m2_asn1_string_free"> +<tt class="descname">m2_asn1_string_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.ASN1.ASN1_String.m2_asn1_string_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.ASN1.ASN1_TIME"> +<em class="property">class </em><tt class="descclassname">M2Crypto.ASN1.</tt><tt class="descname">ASN1_TIME</tt><big>(</big><em>asn1_time=None</em>, <em>_pyfree=0</em>, <em>asn1_utctime=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#ASN1_TIME"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.ASN1_TIME" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.ASN1.ASN1_TIME.get_datetime"> +<tt class="descname">get_datetime</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#ASN1_TIME.get_datetime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.ASN1_TIME.get_datetime" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ASN1.ASN1_TIME.m2_asn1_time_free"> +<tt class="descname">m2_asn1_time_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.ASN1.ASN1_TIME.m2_asn1_time_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ASN1.ASN1_TIME.set_datetime"> +<tt class="descname">set_datetime</tt><big>(</big><em>date</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#ASN1_TIME.set_datetime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.ASN1_TIME.set_datetime" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ASN1.ASN1_TIME.set_string"> +<tt class="descname">set_string</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#ASN1_TIME.set_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.ASN1_TIME.set_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Set time from UTC string.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ASN1.ASN1_TIME.set_time"> +<tt class="descname">set_time</tt><big>(</big><em>time</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#ASN1_TIME.set_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.ASN1_TIME.set_time" title="Permalink to this definition">¶</a></dt> +<dd><p>Set time from seconds since epoch (int).</p> +</dd></dl> + +</dd></dl> + +<dl class="attribute"> +<dt id="M2Crypto.ASN1.ASN1_UTCTIME"> +<tt class="descclassname">M2Crypto.ASN1.</tt><tt class="descname">ASN1_UTCTIME</tt><a class="headerlink" href="#M2Crypto.ASN1.ASN1_UTCTIME" title="Permalink to this definition">¶</a></dt> +<dd><p>alias of <a class="reference internal" href="#M2Crypto.ASN1.ASN1_TIME" title="M2Crypto.ASN1.ASN1_TIME"><tt class="xref py py-class docutils literal"><span class="pre">ASN1_TIME</span></tt></a></p> +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.ASN1.LocalTimezone"> +<em class="property">class </em><tt class="descclassname">M2Crypto.ASN1.</tt><tt class="descname">LocalTimezone</tt><a class="reference internal" href="_modules/M2Crypto/ASN1.html#LocalTimezone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.LocalTimezone" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">datetime.tzinfo</span></tt></p> +<p>Localtimezone from datetime manual</p> +<dl class="method"> +<dt id="M2Crypto.ASN1.LocalTimezone.dst"> +<tt class="descname">dst</tt><big>(</big><em>dt</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#LocalTimezone.dst"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.LocalTimezone.dst" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ASN1.LocalTimezone.tzname"> +<tt class="descname">tzname</tt><big>(</big><em>dt</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#LocalTimezone.tzname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.LocalTimezone.tzname" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ASN1.LocalTimezone.utcoffset"> +<tt class="descname">utcoffset</tt><big>(</big><em>dt</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ASN1.html#LocalTimezone.utcoffset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ASN1.LocalTimezone.utcoffset" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.AuthCookie"> +<span id="authcookie-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">AuthCookie</span></tt> Module<a class="headerlink" href="#module-M2Crypto.AuthCookie" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.AuthCookie.AuthCookie"> +<em class="property">class </em><tt class="descclassname">M2Crypto.AuthCookie.</tt><tt class="descname">AuthCookie</tt><big>(</big><em>expiry</em>, <em>data</em>, <em>dough</em>, <em>mac</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookie"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookie" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookie.data"> +<tt class="descname">data</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookie.data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookie.data" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the data portion of the cookie.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookie.expiry"> +<tt class="descname">expiry</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookie.expiry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookie.expiry" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the cookie’s expiry time.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookie.headerValue"> +<tt class="descname">headerValue</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookie.headerValue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookie.headerValue" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookie.isExpired"> +<tt class="descname">isExpired</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookie.isExpired"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookie.isExpired" title="Permalink to this definition">¶</a></dt> +<dd><p>Return 1 if the cookie has expired, 0 otherwise.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookie.mac"> +<tt class="descname">mac</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookie.mac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookie.mac" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the cookie’s MAC.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookie.name"> +<tt class="descname">name</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookie.name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookie.name" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookie.output"> +<tt class="descname">output</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookie.output"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookie.output" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the cookie’s output in “Set-Cookie” format.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookie.value"> +<tt class="descname">value</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookie.value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookie.value" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the cookie’s output minus the “Set-Cookie: ” portion.</p> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.AuthCookie.AuthCookieJar"> +<em class="property">class </em><tt class="descclassname">M2Crypto.AuthCookie.</tt><tt class="descname">AuthCookieJar</tt><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookieJar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookieJar" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookieJar.isGoodCookie"> +<tt class="descname">isGoodCookie</tt><big>(</big><em>cookie</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookieJar.isGoodCookie"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookieJar.isGoodCookie" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookieJar.isGoodCookieString"> +<tt class="descname">isGoodCookieString</tt><big>(</big><em>cookie_str</em>, <em>_debug=False</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookieJar.isGoodCookieString"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookieJar.isGoodCookieString" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.AuthCookie.AuthCookieJar.makeCookie"> +<tt class="descname">makeCookie</tt><big>(</big><em>expiry</em>, <em>data</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#AuthCookieJar.makeCookie"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.AuthCookieJar.makeCookie" title="Permalink to this definition">¶</a></dt> +<dd><p>Make a cookie</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>expiry</strong> – expiration time (float in seconds)</li> +<li><strong>data</strong> – cookie content</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">AuthCookie object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.AuthCookie.mix"> +<tt class="descclassname">M2Crypto.AuthCookie.</tt><tt class="descname">mix</tt><big>(</big><em>expiry</em>, <em>data</em>, <em>format='exp=%f&data=%s&digest='</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#mix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.mix" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.AuthCookie.unmix"> +<tt class="descclassname">M2Crypto.AuthCookie.</tt><tt class="descname">unmix</tt><big>(</big><em>dough</em>, <em>regex=<_sre.SRE_Pattern object at 0x1ec24a0></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#unmix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.unmix" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.AuthCookie.unmix3"> +<tt class="descclassname">M2Crypto.AuthCookie.</tt><tt class="descname">unmix3</tt><big>(</big><em>dough</em>, <em>regex=<_sre.SRE_Pattern object at 0x1ec24a0></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/AuthCookie.html#unmix3"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.AuthCookie.unmix3" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="module-M2Crypto.BIO"> +<span id="bio-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">BIO</span></tt> Module<a class="headerlink" href="#module-M2Crypto.BIO" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.BIO.BIO"> +<em class="property">class </em><tt class="descclassname">M2Crypto.BIO.</tt><tt class="descname">BIO</tt><big>(</big><em>bio=None</em>, <em>_pyfree=0</em>, <em>_close_cb=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p> +<p>Abstract object interface to the BIO API.</p> +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.bio_ptr"> +<tt class="descname">bio_ptr</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.BIO.BIO.bio_ptr" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.fileno"> +<tt class="descname">fileno</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.fileno"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.fileno" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.flush"> +<tt class="descname">flush</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.flush"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.flush" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">1 for success, and 0 or -1 for failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.m2_bio_free"> +<tt class="descname">m2_bio_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.BIO.BIO.m2_bio_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.read"> +<tt class="descname">read</tt><big>(</big><em>size=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.read" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.readable"> +<tt class="descname">readable</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.readable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.readable" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.readline"> +<tt class="descname">readline</tt><big>(</big><em>size=4096</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.readline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.readline" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.readlines"> +<tt class="descname">readlines</tt><big>(</big><em>sizehint='ignored'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.readlines"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.readlines" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.reset"> +<tt class="descname">reset</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.reset" title="Permalink to this definition">¶</a></dt> +<dd><p>Sets the bio to its initial state +:return: 1 for success, and 0 or -1 for failure</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.seek"> +<tt class="descname">seek</tt><big>(</big><em>off</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.seek"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.seek" title="Permalink to this definition">¶</a></dt> +<dd><p>Seek to the specified absolute offset.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.should_read"> +<tt class="descname">should_read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.should_read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.should_read" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns whether the cause of the condition is the bio +should read more data</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.should_retry"> +<tt class="descname">should_retry</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.should_retry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.should_retry" title="Permalink to this definition">¶</a></dt> +<dd><p>Can the call be attempted again, or was there an error +ie do_handshake</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.should_write"> +<tt class="descname">should_write</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.should_write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.should_write" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns whether the cause of the condition is the bio +should write more data</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.tell"> +<tt class="descname">tell</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.tell"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.tell" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the current offset.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.write"> +<tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.write" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">either data written, or [0, -1] for nothing written, +-2 not implemented</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.write_close"> +<tt class="descname">write_close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.write_close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.write_close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.BIO.writeable"> +<tt class="descname">writeable</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIO.writeable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIO.writeable" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.BIO.BIOError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.BIO.</tt><tt class="descname">BIOError</tt><a class="reference internal" href="_modules/M2Crypto/BIO.html#BIOError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.BIOError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.BIO.CipherStream"> +<em class="property">class </em><tt class="descclassname">M2Crypto.BIO.</tt><tt class="descname">CipherStream</tt><big>(</big><em>obio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#CipherStream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.CipherStream" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <a class="reference internal" href="#M2Crypto.BIO.BIO" title="M2Crypto.BIO.BIO"><tt class="xref py py-class docutils literal"><span class="pre">M2Crypto.BIO.BIO</span></tt></a></p> +<p>Object interface to BIO_f_cipher.</p> +<dl class="attribute"> +<dt id="M2Crypto.BIO.CipherStream.SALT_LEN"> +<tt class="descname">SALT_LEN</tt><em class="property"> = 8</em><a class="headerlink" href="#M2Crypto.BIO.CipherStream.SALT_LEN" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.CipherStream.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#CipherStream.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.CipherStream.close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.CipherStream.m2_bio_free"> +<tt class="descname">m2_bio_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.BIO.CipherStream.m2_bio_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.CipherStream.m2_bio_pop"> +<tt class="descname">m2_bio_pop</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.BIO.CipherStream.m2_bio_pop" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.CipherStream.set_cipher"> +<tt class="descname">set_cipher</tt><big>(</big><em>algo</em>, <em>key</em>, <em>iv</em>, <em>op</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#CipherStream.set_cipher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.CipherStream.set_cipher" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.CipherStream.write_close"> +<tt class="descname">write_close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#CipherStream.write_close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.CipherStream.write_close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.BIO.File"> +<em class="property">class </em><tt class="descclassname">M2Crypto.BIO.</tt><tt class="descname">File</tt><big>(</big><em>pyfile</em>, <em>close_pyfile=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#File"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.File" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <a class="reference internal" href="#M2Crypto.BIO.BIO" title="M2Crypto.BIO.BIO"><tt class="xref py py-class docutils literal"><span class="pre">M2Crypto.BIO.BIO</span></tt></a></p> +<p>Object interface to BIO_s_pyfd</p> +<p>This class interfaces Python to OpenSSL functions that expect BIO *. For +general file manipulation in Python, use Python’s builtin file object.</p> +<dl class="method"> +<dt id="M2Crypto.BIO.File.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#File.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.File.close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.File.reset"> +<tt class="descname">reset</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#File.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.File.reset" title="Permalink to this definition">¶</a></dt> +<dd><p>Sets the bio to its initial state +:return: 0 for success, and -1 for failure</p> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.BIO.IOBuffer"> +<em class="property">class </em><tt class="descclassname">M2Crypto.BIO.</tt><tt class="descname">IOBuffer</tt><big>(</big><em>under_bio</em>, <em>mode='rwb'</em>, <em>_pyfree=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#IOBuffer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.IOBuffer" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <a class="reference internal" href="#M2Crypto.BIO.BIO" title="M2Crypto.BIO.BIO"><tt class="xref py py-class docutils literal"><span class="pre">M2Crypto.BIO.BIO</span></tt></a></p> +<p>Object interface to BIO_f_buffer.</p> +<p>Its principal function is to be BIO_push()’ed on top of a BIO_f_ssl, so +that makefile() of said underlying SSL socket works.</p> +<dl class="method"> +<dt id="M2Crypto.BIO.IOBuffer.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#IOBuffer.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.IOBuffer.close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.IOBuffer.m2_bio_free"> +<tt class="descname">m2_bio_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.BIO.IOBuffer.m2_bio_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.IOBuffer.m2_bio_pop"> +<tt class="descname">m2_bio_pop</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.BIO.IOBuffer.m2_bio_pop" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.BIO.MemoryBuffer"> +<em class="property">class </em><tt class="descclassname">M2Crypto.BIO.</tt><tt class="descname">MemoryBuffer</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#MemoryBuffer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.MemoryBuffer" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <a class="reference internal" href="#M2Crypto.BIO.BIO" title="M2Crypto.BIO.BIO"><tt class="xref py py-class docutils literal"><span class="pre">M2Crypto.BIO.BIO</span></tt></a></p> +<p>Object interface to BIO_s_mem.</p> +<p>Empirical testing suggests that this class performs less well than +cStringIO, because cStringIO is implemented in C, whereas this class +is implemented in Python. Thus, the recommended practice is to use +cStringIO for regular work and convert said cStringIO object to +a MemoryBuffer object only when necessary.</p> +<dl class="method"> +<dt id="M2Crypto.BIO.MemoryBuffer.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.BIO.MemoryBuffer.close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.MemoryBuffer.getvalue"> +<tt class="descname">getvalue</tt><big>(</big><em>size=0</em><big>)</big><a class="headerlink" href="#M2Crypto.BIO.MemoryBuffer.getvalue" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.MemoryBuffer.read"> +<tt class="descname">read</tt><big>(</big><em>size=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#MemoryBuffer.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.MemoryBuffer.read" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.MemoryBuffer.read_all"> +<tt class="descname">read_all</tt><big>(</big><em>size=0</em><big>)</big><a class="headerlink" href="#M2Crypto.BIO.MemoryBuffer.read_all" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.MemoryBuffer.write_close"> +<tt class="descname">write_close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#MemoryBuffer.write_close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.MemoryBuffer.write_close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.BIO.SSLBio"> +<em class="property">class </em><tt class="descclassname">M2Crypto.BIO.</tt><tt class="descname">SSLBio</tt><big>(</big><em>_pyfree=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#SSLBio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.SSLBio" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <a class="reference internal" href="#M2Crypto.BIO.BIO" title="M2Crypto.BIO.BIO"><tt class="xref py py-class docutils literal"><span class="pre">M2Crypto.BIO.BIO</span></tt></a></p> +<p>Object interface to BIO_f_ssl</p> +<dl class="method"> +<dt id="M2Crypto.BIO.SSLBio.do_handshake"> +<tt class="descname">do_handshake</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#SSLBio.do_handshake"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.SSLBio.do_handshake" title="Permalink to this definition">¶</a></dt> +<dd><p>Do the handshake.</p> +<p>Return 1 if the handshake completes +Return 0 or a negative number if there is a problem</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.BIO.SSLBio.set_ssl"> +<tt class="descname">set_ssl</tt><big>(</big><em>conn</em>, <em>close_flag=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#SSLBio.set_ssl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.SSLBio.set_ssl" title="Permalink to this definition">¶</a></dt> +<dd><p>Sets the bio to the SSL pointer which is +contained in the connection object.</p> +</dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.BIO.openfile"> +<tt class="descclassname">M2Crypto.BIO.</tt><tt class="descname">openfile</tt><big>(</big><em>filename</em>, <em>mode='rb'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BIO.html#openfile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BIO.openfile" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="module-M2Crypto.BN"> +<span id="bn-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">BN</span></tt> Module<a class="headerlink" href="#module-M2Crypto.BN" title="Permalink to this headline">¶</a></h2> +<dl class="function"> +<dt id="M2Crypto.BN.rand"> +<tt class="descclassname">M2Crypto.BN.</tt><tt class="descname">rand</tt><big>(</big><em>bits</em>, <em>top=-1</em>, <em>bottom=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BN.html#rand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BN.rand" title="Permalink to this definition">¶</a></dt> +<dd><p>Generate cryptographically strong random number.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>bits</strong> – Length of random number in bits.</li> +<li><strong>top</strong> – If -1, the most significant bit can be 0. If 0, the most +significant bit is 1, and if 1, the two most significant +bits will be 1.</li> +<li><strong>bottom</strong> – If bottom is true, the number will be odd.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.BN.rand_range"> +<tt class="descclassname">M2Crypto.BN.</tt><tt class="descname">rand_range</tt><big>(</big><em>range</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BN.html#rand_range"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BN.rand_range" title="Permalink to this definition">¶</a></dt> +<dd><p>Generate a random number in a range.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>range</strong> – Upper limit for range.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A random number in the range [0, range)</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.BN.randfname"> +<tt class="descclassname">M2Crypto.BN.</tt><tt class="descname">randfname</tt><big>(</big><em>length</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/BN.html#randfname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.BN.randfname" title="Permalink to this definition">¶</a></dt> +<dd><p>Return a random filename, which is simply a string where all +the characters are from the set [a-zA-Z0-9].</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>length</strong> – Length of filename to return.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">random filename string</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.DH"> +<span id="dh-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">DH</span></tt> Module<a class="headerlink" href="#module-M2Crypto.DH" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.DH.DH"> +<em class="property">class </em><tt class="descclassname">M2Crypto.DH.</tt><tt class="descname">DH</tt><big>(</big><em>dh</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DH.html#DH"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.DH" title="Permalink to this definition">¶</a></dt> +<dd><p>Object interface to the Diffie-Hellman key exchange +protocol.</p> +<dl class="method"> +<dt id="M2Crypto.DH.DH.check_params"> +<tt class="descname">check_params</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/DH.html#DH.check_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.DH.check_params" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DH.DH.compute_key"> +<tt class="descname">compute_key</tt><big>(</big><em>pubkey</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DH.html#DH.compute_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.DH.compute_key" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DH.DH.gen_key"> +<tt class="descname">gen_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/DH.html#DH.gen_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.DH.gen_key" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DH.DH.m2_dh_free"> +<tt class="descname">m2_dh_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.DH.DH.m2_dh_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DH.DH.print_params"> +<tt class="descname">print_params</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DH.html#DH.print_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.DH.print_params" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.DH.DHError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.DH.</tt><tt class="descname">DHError</tt><a class="reference internal" href="_modules/M2Crypto/DH.html#DHError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.DHError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DH.gen_params"> +<tt class="descclassname">M2Crypto.DH.</tt><tt class="descname">gen_params</tt><big>(</big><em>plen</em>, <em>g</em>, <em>callback=<function genparam_callback at 0x1faa758></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DH.html#gen_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.gen_params" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DH.load_params"> +<tt class="descclassname">M2Crypto.DH.</tt><tt class="descname">load_params</tt><big>(</big><em>file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DH.html#load_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.load_params" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DH.load_params_bio"> +<tt class="descclassname">M2Crypto.DH.</tt><tt class="descname">load_params_bio</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DH.html#load_params_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.load_params_bio" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DH.set_params"> +<tt class="descclassname">M2Crypto.DH.</tt><tt class="descname">set_params</tt><big>(</big><em>p</em>, <em>g</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DH.html#set_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DH.set_params" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="module-M2Crypto.DSA"> +<span id="dsa-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">DSA</span></tt> Module<a class="headerlink" href="#module-M2Crypto.DSA" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.DSA.DSA"> +<em class="property">class </em><tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">DSA</tt><big>(</big><em>dsa</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA" title="Permalink to this definition">¶</a></dt> +<dd><p>This class is a context supporting DSA key and parameter +values, signing and verifying.</p> +<p>Simple example:</p> +<div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">M2Crypto</span> <span class="kn">import</span> <span class="n">EVP</span><span class="p">,</span> <span class="n">DSA</span><span class="p">,</span> <span class="n">util</span> + +<span class="n">message</span> <span class="o">=</span> <span class="s1">'Kilroy was here!'</span> +<span class="n">md</span> <span class="o">=</span> <span class="n">EVP</span><span class="o">.</span><span class="n">MessageDigest</span><span class="p">(</span><span class="s1">'sha1'</span><span class="p">)</span> +<span class="n">md</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">message</span><span class="p">)</span> +<span class="n">digest</span> <span class="o">=</span> <span class="n">md</span><span class="o">.</span><span class="n">final</span><span class="p">()</span> + +<span class="n">dsa</span> <span class="o">=</span> <span class="n">DSA</span><span class="o">.</span><span class="n">gen_params</span><span class="p">(</span><span class="mi">1024</span><span class="p">)</span> +<span class="n">dsa</span><span class="o">.</span><span class="n">gen_key</span><span class="p">()</span> +<span class="n">r</span><span class="p">,</span> <span class="n">s</span> <span class="o">=</span> <span class="n">dsa</span><span class="o">.</span><span class="n">sign</span><span class="p">(</span><span class="n">digest</span><span class="p">)</span> +<span class="n">good</span> <span class="o">=</span> <span class="n">dsa</span><span class="o">.</span><span class="n">verify</span><span class="p">(</span><span class="n">digest</span><span class="p">,</span> <span class="n">r</span><span class="p">,</span> <span class="n">s</span><span class="p">)</span> +<span class="k">if</span> <span class="n">good</span><span class="p">:</span> + <span class="k">print</span><span class="p">(</span><span class="s1">' ** success **'</span><span class="p">)</span> +<span class="k">else</span><span class="p">:</span> + <span class="k">print</span><span class="p">(</span><span class="s1">' ** verification failed **'</span><span class="p">)</span> +</pre></div> +</div> +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.check_key"> +<tt class="descname">check_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.check_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.check_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Check to be sure the DSA object has a valid private key.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">1 (true) if a valid private key</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.gen_key"> +<tt class="descname">gen_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.gen_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.gen_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Generate a key pair.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.m2_dsa_free"> +<tt class="descname">m2_dsa_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.DSA.DSA.m2_dsa_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.save_key"> +<tt class="descname">save_key</tt><big>(</big><em>filename</em>, <em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.save_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.save_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the DSA key pair to a file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>filename</strong> – Save the DSA key pair to this file.</li> +<li><strong>cipher</strong> – name of symmetric key algorithm and mode +to encrypt the private key.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">1 (true) if successful</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.save_key_bio"> +<tt class="descname">save_key_bio</tt><big>(</big><em>bio</em>, <em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.save_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.save_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save DSA key pair to a BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bio</strong> – Save DSA parameters to this object.</li> +<li><strong>cipher</strong> – name of symmetric key algorithm and mode +to encrypt the private key.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">1 (true) if successful</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.save_params"> +<tt class="descname">save_params</tt><big>(</big><em>filename</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.save_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.save_params" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the DSA parameters to a file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> – Save the DSA parameters to this file.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 (true) if successful</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.save_params_bio"> +<tt class="descname">save_params_bio</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.save_params_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.save_params_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save DSA parameters to a BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bio</strong> – Save DSA parameters to this object.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 (true) if successful</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.save_pub_key"> +<tt class="descname">save_pub_key</tt><big>(</big><em>filename</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.save_pub_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.save_pub_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the DSA public key (with parameters) to a file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> – Save DSA public key (with parameters) +to this file.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 (true) if successful</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.save_pub_key_bio"> +<tt class="descname">save_pub_key_bio</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.save_pub_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.save_pub_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save DSA public key (with parameters) to a BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bio</strong> – Save DSA public key (with parameters) +to this object.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 (true) if successful</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.set_params"> +<tt class="descname">set_params</tt><big>(</big><em>p</em>, <em>q</em>, <em>g</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.set_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.set_params" title="Permalink to this definition">¶</a></dt> +<dd><p>Set new parameters.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>p</strong> – MPI binary representation ... format that consists of +the number’s length in bytes represented as a 4-byte +big-endian number, and the number itself in big-endian +format, where the most significant bit signals +a negative number (the representation of numbers with +the MSB set is prefixed with null byte).</li> +<li><strong>q</strong> – ditto</li> +<li><strong>g</strong> – ditto</li> +</ul> +</td> +</tr> +</tbody> +</table> +<dl class="docutils"> +<dt>@warning: This does not change the private key, so it may be</dt> +<dd>unsafe to use this method. It is better to use +gen_params function to create a new DSA object.</dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.sign"> +<tt class="descname">sign</tt><big>(</big><em>digest</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.sign"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.sign" title="Permalink to this definition">¶</a></dt> +<dd><p>Sign the digest.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>digest</strong> – SHA-1 hash of message (same as output +from MessageDigest, a “byte string”)</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">DSA signature, a tuple of two values, r and s, +both “byte strings”.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.sign_asn1"> +<tt class="descname">sign_asn1</tt><big>(</big><em>digest</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.sign_asn1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.sign_asn1" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.verify"> +<tt class="descname">verify</tt><big>(</big><em>digest</em>, <em>r</em>, <em>s</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.verify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.verify" title="Permalink to this definition">¶</a></dt> +<dd><p>Verify a newly calculated digest against the signature +values r and s.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>digest</strong> – SHA-1 hash of message (same as output +from MessageDigest, a “byte string”)</li> +<li><strong>r</strong> – r value of the signature, a “byte string”</li> +<li><strong>s</strong> – s value of the signature, a “byte string”</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">1 (true) if verify succeeded, 0 if failed</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA.verify_asn1"> +<tt class="descname">verify_asn1</tt><big>(</big><em>digest</em>, <em>blob</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA.verify_asn1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA.verify_asn1" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.DSA.DSAError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">DSAError</tt><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSAError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSAError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.DSA.DSA_pub"> +<em class="property">class </em><tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">DSA_pub</tt><big>(</big><em>dsa</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA_pub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA_pub" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <a class="reference internal" href="#M2Crypto.DSA.DSA" title="M2Crypto.DSA.DSA"><tt class="xref py py-class docutils literal"><span class="pre">M2Crypto.DSA.DSA</span></tt></a></p> +<p>This class is a DSA context that only supports a public key +and verification. It does NOT support a private key or +signing.</p> +<dl class="method"> +<dt id="M2Crypto.DSA.DSA_pub.check_key"> +<tt class="descname">check_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA_pub.check_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA_pub.check_key" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">does DSA_pub contain a pub key?</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA_pub.save_key"> +<tt class="descname">save_key</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#M2Crypto.DSA.DSA_pub.save_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the DSA public key (with parameters) to a file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> – Save DSA public key (with parameters) +to this file.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 (true) if successful</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA_pub.save_key_bio"> +<tt class="descname">save_key_bio</tt><big>(</big><em>bio</em><big>)</big><a class="headerlink" href="#M2Crypto.DSA.DSA_pub.save_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save DSA public key (with parameters) to a BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bio</strong> – Save DSA public key (with parameters) +to this object.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 (true) if successful</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA_pub.sign"> +<tt class="descname">sign</tt><big>(</big><em>*argv</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#DSA_pub.sign"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.DSA_pub.sign" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.DSA.DSA_pub.sign_asn1"> +<tt class="descname">sign_asn1</tt><big>(</big><em>*argv</em><big>)</big><a class="headerlink" href="#M2Crypto.DSA.DSA_pub.sign_asn1" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DSA.gen_params"> +<tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">gen_params</tt><big>(</big><em>bits</em>, <em>callback=<function genparam_callback at 0x1faa758></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#gen_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.gen_params" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that generates DSA parameters and +instantiates a DSA object from the output.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bits</strong> – The length of the prime to be generated. If +‘bits’ < 512, it is set to 512.</li> +<li><strong>callback</strong> – A Python callback object that will be +invoked during parameter generation; it usual +purpose is to provide visual feedback.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">instance of DSA.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DSA.load_key"> +<tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">load_key</tt><big>(</big><em>file</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#load_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.load_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a DSA object from a +PEM encoded DSA key pair.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> – Names the file (a path) that contains the PEM +representation of the DSA key pair.</li> +<li><strong>callback</strong> – A Python callback object that will be +invoked if the DSA key pair is +passphrase-protected.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">instance of DSA.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DSA.load_key_bio"> +<tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">load_key_bio</tt><big>(</big><em>bio</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#load_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.load_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a DSA object from a +PEM encoded DSA key pair.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bio</strong> – Contains the PEM representation of the DSA +key pair.</li> +<li><strong>callback</strong> – A Python callback object that will be +invoked if the DSA key pair is +passphrase-protected.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">instance of DSA.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DSA.load_params"> +<tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">load_params</tt><big>(</big><em>file</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#load_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.load_params" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a DSA object with DSA +parameters from a file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> – Names the file (a path) that contains the PEM +representation of the DSA parameters.</li> +<li><strong>callback</strong> – A Python callback object that will be +invoked if the DSA parameters file is +passphrase-protected.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">instance of DSA.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DSA.load_params_bio"> +<tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">load_params_bio</tt><big>(</big><em>bio</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#load_params_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.load_params_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a DSA object with DSA +parameters from a M2Crypto.BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bio</strong> – Contains the PEM representation of the DSA +parameters.</li> +<li><strong>callback</strong> – A Python callback object that will be +invoked if the DSA parameters file is +passphrase-protected.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">instance of DSA.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DSA.load_pub_key"> +<tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">load_pub_key</tt><big>(</big><em>file</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#load_pub_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.load_pub_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a DSA_pub object using +a DSA public key contained in PEM file. The PEM file +must contain the parameters in addition to the public key.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> – Names the file (a path) that contains the PEM +representation of the DSA public key.</li> +<li><strong>callback</strong> – A Python callback object that will be +invoked should the DSA public key be +passphrase-protected.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">instance of DSA_pub.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DSA.load_pub_key_bio"> +<tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">load_pub_key_bio</tt><big>(</big><em>bio</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#load_pub_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.load_pub_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a DSA_pub object using +a DSA public key contained in PEM format. The PEM +must contain the parameters in addition to the public key.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bio</strong> – Contains the PEM representation of the DSA +public key (with params).</li> +<li><strong>callback</strong> – A Python callback object that will be +invoked should the DSA public key be +passphrase-protected.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">instance of DSA_pub.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DSA.pub_key_from_params"> +<tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">pub_key_from_params</tt><big>(</big><em>p</em>, <em>q</em>, <em>g</em>, <em>pub</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#pub_key_from_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.pub_key_from_params" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a DSA_pub object using +the parameters and public key specified.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>p</strong> – value of p</li> +<li><strong>q</strong> – value of q</li> +<li><strong>g</strong> – value of g</li> +<li><strong>pub</strong> – value of the public key</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">instance of DSA_pub.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.DSA.set_params"> +<tt class="descclassname">M2Crypto.DSA.</tt><tt class="descname">set_params</tt><big>(</big><em>p</em>, <em>q</em>, <em>g</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/DSA.html#set_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.DSA.set_params" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a DSA object with DSA +parameters.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>p</strong> – value of p, a “byte string”</li> +<li><strong>q</strong> – value of q, a “byte string”</li> +<li><strong>g</strong> – value of g, a “byte string”</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">instance of DSA.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.EC"> +<span id="ec-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">EC</span></tt> Module<a class="headerlink" href="#module-M2Crypto.EC" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.EC.EC"> +<em class="property">class </em><tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">EC</tt><big>(</big><em>ec</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC" title="Permalink to this definition">¶</a></dt> +<dd><p>Object interface to a EC key pair.</p> +<dl class="method"> +<dt id="M2Crypto.EC.EC.as_pem"> +<tt class="descname">as_pem</tt><big>(</big><em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.as_pem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.as_pem" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns the key(pair) as a string in PEM format. +If no password is passed and the cipher is set +it exits with error</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.check_key"> +<tt class="descname">check_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.check_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.check_key" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.compute_dh_key"> +<tt class="descname">compute_dh_key</tt><big>(</big><em>pub_key</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.compute_dh_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.compute_dh_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Compute the ECDH shared key of this key pair and the given public +key object. They must both use the same curve. Returns the +shared key in binary as a buffer object. No Key Derivation Function is +applied.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.gen_key"> +<tt class="descname">gen_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.gen_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.gen_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Generates the key pair from its parameters. Use:</p> +<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">keypair</span> <span class="o">=</span> <span class="n">EC</span><span class="o">.</span><span class="n">gen_params</span><span class="p">(</span><span class="n">curve</span><span class="p">)</span> +<span class="n">keypair</span><span class="o">.</span><span class="n">gen_key</span><span class="p">()</span> +</pre></div> +</div> +<p>to create an EC key pair.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.m2_ec_key_free"> +<tt class="descname">m2_ec_key_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.EC.EC.m2_ec_key_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.pub"> +<tt class="descname">pub</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.pub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.pub" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.save_key"> +<tt class="descname">save_key</tt><big>(</big><em>file</em>, <em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.save_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.save_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the key pair to a file in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>file</strong> – Name of filename to save key to.</li> +<li><strong>cipher</strong> – Symmetric cipher to protect the key. The default +cipher is ‘aes_128_cbc’. If cipher is None, then +the key is saved in the clear.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect +the key. The default is +util.passphrase_callback.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.save_key_bio"> +<tt class="descname">save_key_bio</tt><big>(</big><em>bio</em>, <em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.save_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.save_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the key pair to an M2Crypto.BIO.BIO object in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>bio</strong> – M2Crypto.BIO.BIO object to save key to.</li> +<li><strong>cipher</strong> – Symmetric cipher to protect the key. The default +cipher is ‘aes_128_cbc’. If cipher is None, then +the key is saved in the clear.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect +the key. The default is +util.passphrase_callback.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.save_pub_key"> +<tt class="descname">save_pub_key</tt><big>(</big><em>file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.save_pub_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.save_pub_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the public key to a filename in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>file</strong> – Name of filename to save key to.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.save_pub_key_bio"> +<tt class="descname">save_pub_key_bio</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.save_pub_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.save_pub_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the public key to an M2Crypto.BIO.BIO object in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bio</strong> – M2Crypto.BIO.BIO object to save key to.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.sign_dsa"> +<tt class="descname">sign_dsa</tt><big>(</big><em>digest</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.sign_dsa"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.sign_dsa" title="Permalink to this definition">¶</a></dt> +<dd><p>Sign the given digest using ECDSA. Returns a tuple (r,s), the two +ECDSA signature parameters.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.sign_dsa_asn1"> +<tt class="descname">sign_dsa_asn1</tt><big>(</big><em>digest</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.sign_dsa_asn1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.sign_dsa_asn1" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.verify_dsa"> +<tt class="descname">verify_dsa</tt><big>(</big><em>digest</em>, <em>r</em>, <em>s</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.verify_dsa"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.verify_dsa" title="Permalink to this definition">¶</a></dt> +<dd><p>Verify the given digest using ECDSA. r and s are the ECDSA +signature parameters.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC.verify_dsa_asn1"> +<tt class="descname">verify_dsa_asn1</tt><big>(</big><em>digest</em>, <em>blob</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC.verify_dsa_asn1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC.verify_dsa_asn1" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.EC.ECError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">ECError</tt><a class="reference internal" href="_modules/M2Crypto/EC.html#ECError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.ECError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.EC.EC_pub"> +<em class="property">class </em><tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">EC_pub</tt><big>(</big><em>ec</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC_pub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC_pub" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <a class="reference internal" href="#M2Crypto.EC.EC" title="M2Crypto.EC.EC"><tt class="xref py py-class docutils literal"><span class="pre">M2Crypto.EC.EC</span></tt></a></p> +<p>Object interface to an EC public key. +((don’t like this implementation inheritance))</p> +<dl class="method"> +<dt id="M2Crypto.EC.EC_pub.get_der"> +<tt class="descname">get_der</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC_pub.get_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC_pub.get_der" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns the public key in DER format as a buffer object.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC_pub.get_key"> +<tt class="descname">get_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#EC_pub.get_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.EC_pub.get_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns the public key as a byte string.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC_pub.save_key"> +<tt class="descname">save_key</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#M2Crypto.EC.EC_pub.save_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the public key to a filename in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>file</strong> – Name of filename to save key to.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EC.EC_pub.save_key_bio"> +<tt class="descname">save_key_bio</tt><big>(</big><em>bio</em><big>)</big><a class="headerlink" href="#M2Crypto.EC.EC_pub.save_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the public key to an M2Crypto.BIO.BIO object in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bio</strong> – M2Crypto.BIO.BIO object to save key to.</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.ec_error"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">ec_error</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#ec_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.ec_error" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.gen_params"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">gen_params</tt><big>(</big><em>curve</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#gen_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.gen_params" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that generates EC parameters and +instantiates a EC object from the output.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curve</strong> – This is the OpenSSL nid of the curve to use.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.get_builtin_curves"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">get_builtin_curves</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#get_builtin_curves"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.get_builtin_curves" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.load_key"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">load_key</tt><big>(</big><em>file</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#load_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.load_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a EC object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>file</strong> – Names the filename that contains the PEM representation +of the EC key pair.</li> +<li><strong>callback</strong> – Python callback object that will be invoked +if the EC key pair is passphrase-protected.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.load_key_bio"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">load_key_bio</tt><big>(</big><em>bio</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#load_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.load_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Factory function that instantiates a EC object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>bio</strong> – M2Crypto.BIO object that contains the PEM +representation of the EC key pair.</li> +<li><strong>callback</strong> – Python callback object that will be invoked +if the EC key pair is passphrase-protected.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.load_key_string"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">load_key_string</tt><big>(</big><em>string</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#load_key_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.load_key_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an EC key pair from a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>string</strong> – String containing EC key pair in PEM format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to unlock the +key. The default is util.passphrase_callback.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.EC.EC object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.load_key_string_pubkey"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">load_key_string_pubkey</tt><big>(</big><em>string</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#load_key_string_pubkey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.load_key_string_pubkey" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an M2Crypto.EC.PKey from a public key as a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>string</strong> – String containing the key in PEM format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect the +key.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.EC.PKey object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.load_pub_key"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">load_pub_key</tt><big>(</big><em>file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#load_pub_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.load_pub_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an EC public key from filename.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>file</strong> – Name of filename containing EC public key in PEM +format.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">M2Crypto.EC.EC_pub object.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.load_pub_key_bio"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">load_pub_key_bio</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#load_pub_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.load_pub_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an EC public key from an M2Crypto.BIO.BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bio</strong> – M2Crypto.BIO.BIO object containing EC public key in PEM +format.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">M2Crypto.EC.EC_pub object.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.pub_key_from_der"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">pub_key_from_der</tt><big>(</big><em>der</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#pub_key_from_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.pub_key_from_der" title="Permalink to this definition">¶</a></dt> +<dd><p>Create EC_pub from DER.</p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EC.pub_key_from_params"> +<tt class="descclassname">M2Crypto.EC.</tt><tt class="descname">pub_key_from_params</tt><big>(</big><em>curve</em>, <em>bytes</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EC.html#pub_key_from_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EC.pub_key_from_params" title="Permalink to this definition">¶</a></dt> +<dd><p>Create EC_pub from curve name and octet string.</p> +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.EVP"> +<span id="evp-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">EVP</span></tt> Module<a class="headerlink" href="#module-M2Crypto.EVP" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.EVP.Cipher"> +<em class="property">class </em><tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">Cipher</tt><big>(</big><em>alg</em>, <em>key</em>, <em>iv</em>, <em>op</em>, <em>key_as_bytes=0</em>, <em>d='md5'</em>, <em>salt='12345678'</em>, <em>i=1</em>, <em>padding=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#Cipher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.Cipher" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.EVP.Cipher.final"> +<tt class="descname">final</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#Cipher.final"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.Cipher.final" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.Cipher.m2_cipher_ctx_free"> +<tt class="descname">m2_cipher_ctx_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.EVP.Cipher.m2_cipher_ctx_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.Cipher.set_padding"> +<tt class="descname">set_padding</tt><big>(</big><em>padding=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#Cipher.set_padding"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.Cipher.set_padding" title="Permalink to this definition">¶</a></dt> +<dd><p>Actually always return 1</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.Cipher.update"> +<tt class="descname">update</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#Cipher.update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.Cipher.update" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.EVP.EVPError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">EVPError</tt><a class="reference internal" href="_modules/M2Crypto/EVP.html#EVPError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.EVPError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.EVP.HMAC"> +<em class="property">class </em><tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">HMAC</tt><big>(</big><em>key</em>, <em>algo='sha1'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#HMAC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.HMAC" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.EVP.HMAC.digest"> +<tt class="descname">digest</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.EVP.HMAC.digest" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.HMAC.final"> +<tt class="descname">final</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#HMAC.final"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.HMAC.final" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.HMAC.m2_hmac_ctx_free"> +<tt class="descname">m2_hmac_ctx_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.EVP.HMAC.m2_hmac_ctx_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.HMAC.reset"> +<tt class="descname">reset</tt><big>(</big><em>key</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#HMAC.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.HMAC.reset" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.HMAC.update"> +<tt class="descname">update</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#HMAC.update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.HMAC.update" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.EVP.MessageDigest"> +<em class="property">class </em><tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">MessageDigest</tt><big>(</big><em>algo</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#MessageDigest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.MessageDigest" title="Permalink to this definition">¶</a></dt> +<dd><p>Message Digest</p> +<dl class="method"> +<dt id="M2Crypto.EVP.MessageDigest.digest"> +<tt class="descname">digest</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.EVP.MessageDigest.digest" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.MessageDigest.final"> +<tt class="descname">final</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#MessageDigest.final"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.MessageDigest.final" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.MessageDigest.m2_md_ctx_free"> +<tt class="descname">m2_md_ctx_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.EVP.MessageDigest.m2_md_ctx_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.MessageDigest.update"> +<tt class="descname">update</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#MessageDigest.update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.MessageDigest.update" title="Permalink to this definition">¶</a></dt> +<dd><p>Add data to be digested.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">-1 for Python error, 1 for success, 0 for OpenSSL failure.</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.EVP.PKey"> +<em class="property">class </em><tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">PKey</tt><big>(</big><em>pkey=None</em>, <em>_pyfree=0</em>, <em>md='sha1'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey" title="Permalink to this definition">¶</a></dt> +<dd><p>Public Key</p> +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.as_der"> +<tt class="descname">as_der</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.as_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.as_der" title="Permalink to this definition">¶</a></dt> +<dd><p>Return key in DER format in a string</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.as_pem"> +<tt class="descname">as_pem</tt><big>(</big><em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.as_pem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.as_pem" title="Permalink to this definition">¶</a></dt> +<dd><p>Return key in PEM format in a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>cipher</strong> – Symmetric cipher to protect the key. The default +cipher is <tt class="docutils literal"><span class="pre">'aes_128_cbc'</span></tt>. If cipher is None, +then the key is saved in the clear.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect +the key. The default is +util.passphrase_callback.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.assign_rsa"> +<tt class="descname">assign_rsa</tt><big>(</big><em>rsa</em>, <em>capture=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.assign_rsa"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.assign_rsa" title="Permalink to this definition">¶</a></dt> +<dd><p>Assign the RSA key pair to self.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>rsa</strong> – M2Crypto.RSA.RSA object to be assigned to self.</li> +<li><strong>capture</strong> – If true (default), this PKey object will own the RSA +object, meaning that once the PKey object gets +deleted it is no longer safe to use the RSA object.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Return 1 for success and 0 for failure.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.final"> +<tt class="descname">final</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.EVP.PKey.final" title="Permalink to this definition">¶</a></dt> +<dd><p>Return signature.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The signature.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.get_modulus"> +<tt class="descname">get_modulus</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.get_modulus"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.get_modulus" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the modulus in hex format.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.get_rsa"> +<tt class="descname">get_rsa</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.get_rsa"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.get_rsa" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the underlying RSA key if that is what the EVP +instance is holding.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.m2_md_ctx_free"> +<tt class="descname">m2_md_ctx_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.EVP.PKey.m2_md_ctx_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.m2_pkey_free"> +<tt class="descname">m2_pkey_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.EVP.PKey.m2_pkey_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.reset_context"> +<tt class="descname">reset_context</tt><big>(</big><em>md='sha1'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.reset_context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.reset_context" title="Permalink to this definition">¶</a></dt> +<dd><p>Reset internal message digest context.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>md</strong> – The message digest algorithm.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.save_key"> +<tt class="descname">save_key</tt><big>(</big><em>file</em>, <em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.save_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.save_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the key pair to a file in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>file</strong> – Name of file to save key to.</li> +<li><strong>cipher</strong> – Symmetric cipher to protect the key. The default +cipher is ‘aes_128_cbc’. If cipher is None, then +the key is saved in the clear.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect +the key. The default is +util.passphrase_callback.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.save_key_bio"> +<tt class="descname">save_key_bio</tt><big>(</big><em>bio</em>, <em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.save_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.save_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the key pair to the M2Crypto.BIO object ‘bio’ in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>bio</strong> – M2Crypto.BIO object to save key to.</li> +<li><strong>cipher</strong> – Symmetric cipher to protect the key. The default +cipher is ‘aes_128_cbc’. If cipher is None, then +the key is saved in the clear.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect +the key. The default is +util.passphrase_callback.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.sign_final"> +<tt class="descname">sign_final</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.sign_final"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.sign_final" title="Permalink to this definition">¶</a></dt> +<dd><p>Return signature.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The signature.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.sign_init"> +<tt class="descname">sign_init</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.sign_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.sign_init" title="Permalink to this definition">¶</a></dt> +<dd><p>Initialise signing operation with self.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.sign_update"> +<tt class="descname">sign_update</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.sign_update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.sign_update" title="Permalink to this definition">¶</a></dt> +<dd><p>Feed data to signing operation.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – Data to be signed.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.size"> +<tt class="descname">size</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.size" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the size of the key in bytes.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.update"> +<tt class="descname">update</tt><big>(</big><em>data</em><big>)</big><a class="headerlink" href="#M2Crypto.EVP.PKey.update" title="Permalink to this definition">¶</a></dt> +<dd><p>Feed data to signing operation.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – Data to be signed.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.verify_final"> +<tt class="descname">verify_final</tt><big>(</big><em>sign</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.verify_final"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.verify_final" title="Permalink to this definition">¶</a></dt> +<dd><p>Return result of verification.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sign</strong> – Signature to use for verification</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Result of verification: 1 for success, 0 for failure, -1 on +other error.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.verify_init"> +<tt class="descname">verify_init</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.verify_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.verify_init" title="Permalink to this definition">¶</a></dt> +<dd><p>Initialise signature verification operation with self.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.EVP.PKey.verify_update"> +<tt class="descname">verify_update</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#PKey.verify_update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.PKey.verify_update" title="Permalink to this definition">¶</a></dt> +<dd><p>Feed data to verification operation.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – Data to be verified.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">-1 on Python error, 1 for success, 0 for OpenSSL error</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EVP.hmac"> +<tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">hmac</tt><big>(</big><em>key</em>, <em>data</em>, <em>algo='sha1'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#hmac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.hmac" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EVP.load_key"> +<tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">load_key</tt><big>(</big><em>file</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#load_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.load_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an M2Crypto.EVP.PKey from file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> – Name of file containing the key in PEM format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect the +key.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.EVP.PKey object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EVP.load_key_bio"> +<tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">load_key_bio</tt><big>(</big><em>bio</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#load_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.load_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an M2Crypto.EVP.PKey from an M2Crypto.BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bio</strong> – M2Crypto.BIO object containing the key in PEM format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect the +key.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.EVP.PKey object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EVP.load_key_bio_pubkey"> +<tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">load_key_bio_pubkey</tt><big>(</big><em>bio</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#load_key_bio_pubkey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.load_key_bio_pubkey" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an M2Crypto.EVP.PKey from a public key as a M2Crypto.BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bio</strong> – M2Crypto.BIO object containing the key in PEM format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect the +key.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.EVP.PKey object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EVP.load_key_string"> +<tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">load_key_string</tt><big>(</big><em>string</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#load_key_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.load_key_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an M2Crypto.EVP.PKey from a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>string</strong> – String containing the key in PEM format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect the +key.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.EVP.PKey object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EVP.load_key_string_pubkey"> +<tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">load_key_string_pubkey</tt><big>(</big><em>string</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#load_key_string_pubkey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.load_key_string_pubkey" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an M2Crypto.EVP.PKey from a public key as a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>string</strong> – String containing the key in PEM format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect the +key.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.EVP.PKey object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.EVP.pbkdf2"> +<tt class="descclassname">M2Crypto.EVP.</tt><tt class="descname">pbkdf2</tt><big>(</big><em>password</em>, <em>salt</em>, <em>iter</em>, <em>keylen</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/EVP.html#pbkdf2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.EVP.pbkdf2" title="Permalink to this definition">¶</a></dt> +<dd><p>Derive a key from password using PBKDF2 algorithm specified in RFC 2898.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>password</strong> – Derive the key from this password.</li> +<li><strong>salt</strong> – Salt.</li> +<li><strong>iter</strong> – Number of iterations to perform.</li> +<li><strong>keylen</strong> – Length of key to produce.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Key.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.Engine"> +<span id="engine-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">Engine</span></tt> Module<a class="headerlink" href="#module-M2Crypto.Engine" title="Permalink to this headline">¶</a></h2> +<p>M2Crypto wrapper for OpenSSL ENGINE API.</p> +<p>Pavel Shramov +IMEC MSU</p> +<dl class="class"> +<dt id="M2Crypto.Engine.Engine"> +<em class="property">class </em><tt class="descclassname">M2Crypto.Engine.</tt><tt class="descname">Engine</tt><big>(</big><em>id=None</em>, <em>_ptr=None</em>, <em>_pyfree=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine" title="Permalink to this definition">¶</a></dt> +<dd><p>Wrapper for ENGINE object.</p> +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.ctrl_cmd_string"> +<tt class="descname">ctrl_cmd_string</tt><big>(</big><em>cmd</em>, <em>arg</em>, <em>optional=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine.ctrl_cmd_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine.ctrl_cmd_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Call ENGINE_ctrl_cmd_string</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.finish"> +<tt class="descname">finish</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine.finish"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine.finish" title="Permalink to this definition">¶</a></dt> +<dd><p>Release a functional and structural reference to the engine.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.get_id"> +<tt class="descname">get_id</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine.get_id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine.get_id" title="Permalink to this definition">¶</a></dt> +<dd><p>Return engine id</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.get_name"> +<tt class="descname">get_name</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine.get_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine.get_name" title="Permalink to this definition">¶</a></dt> +<dd><p>Return engine name</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.init"> +<tt class="descname">init</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine.init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine.init" title="Permalink to this definition">¶</a></dt> +<dd><p>Obtain a functional reference to the engine.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">0 on error, non-zero on success.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.load_certificate"> +<tt class="descname">load_certificate</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine.load_certificate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine.load_certificate" title="Permalink to this definition">¶</a></dt> +<dd><p>Load certificate from engine (e.g from smartcard). +NOTE: This function may be not implemented by engine!</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.load_private_key"> +<tt class="descname">load_private_key</tt><big>(</big><em>name</em>, <em>pin=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine.load_private_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine.load_private_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Load private key with engine methods (e.g from smartcard). +If pin is not set it will be asked</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.load_public_key"> +<tt class="descname">load_public_key</tt><big>(</big><em>name</em>, <em>pin=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine.load_public_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine.load_public_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Load public key with engine methods (e.g from smartcard).</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.m2_engine_free"> +<tt class="descname">m2_engine_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.Engine.Engine.m2_engine_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.Engine.Engine.set_default"> +<tt class="descname">set_default</tt><big>(</big><em>methods=65535</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#Engine.set_default"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.Engine.set_default" title="Permalink to this definition">¶</a></dt> +<dd><p>Use this engine as default for methods specified in argument</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>methods</strong> – Possible values are bitwise OR of m2.ENGINE_METHOD_*</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.Engine.EngineError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.Engine.</tt><tt class="descname">EngineError</tt><a class="reference internal" href="_modules/M2Crypto/Engine.html#EngineError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.EngineError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Engine.cleanup"> +<tt class="descclassname">M2Crypto.Engine.</tt><tt class="descname">cleanup</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#cleanup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.cleanup" title="Permalink to this definition">¶</a></dt> +<dd><p>If you load any engines, you need to clean up after your application +is finished with the engines.</p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Engine.load_dynamic"> +<tt class="descclassname">M2Crypto.Engine.</tt><tt class="descname">load_dynamic</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#load_dynamic"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.load_dynamic" title="Permalink to this definition">¶</a></dt> +<dd><p>Load dynamic engine</p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Engine.load_dynamic_engine"> +<tt class="descclassname">M2Crypto.Engine.</tt><tt class="descname">load_dynamic_engine</tt><big>(</big><em>id</em>, <em>sopath</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#load_dynamic_engine"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.load_dynamic_engine" title="Permalink to this definition">¶</a></dt> +<dd><p>Load and return dymanic engine from sopath and assign id to it</p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Engine.load_openssl"> +<tt class="descclassname">M2Crypto.Engine.</tt><tt class="descname">load_openssl</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Engine.html#load_openssl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Engine.load_openssl" title="Permalink to this definition">¶</a></dt> +<dd><p>Load openssl engine</p> +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.Err"> +<span id="err-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">Err</span></tt> Module<a class="headerlink" href="#module-M2Crypto.Err" title="Permalink to this headline">¶</a></h2> +<dl class="exception"> +<dt id="M2Crypto.Err.M2CryptoError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.Err.</tt><tt class="descname">M2CryptoError</tt><a class="reference internal" href="_modules/M2Crypto/Err.html#M2CryptoError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Err.M2CryptoError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.Err.SSLError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.Err.</tt><tt class="descname">SSLError</tt><big>(</big><em>err</em>, <em>client_addr</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Err.html#SSLError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Err.SSLError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Err.get_error"> +<tt class="descclassname">M2Crypto.Err.</tt><tt class="descname">get_error</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Err.html#get_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Err.get_error" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Err.get_error_code"> +<tt class="descclassname">M2Crypto.Err.</tt><tt class="descname">get_error_code</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Err.html#get_error_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Err.get_error_code" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Err.get_error_func"> +<tt class="descclassname">M2Crypto.Err.</tt><tt class="descname">get_error_func</tt><big>(</big><em>err</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Err.html#get_error_func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Err.get_error_func" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Err.get_error_lib"> +<tt class="descclassname">M2Crypto.Err.</tt><tt class="descname">get_error_lib</tt><big>(</big><em>err</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Err.html#get_error_lib"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Err.get_error_lib" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Err.get_error_reason"> +<tt class="descclassname">M2Crypto.Err.</tt><tt class="descname">get_error_reason</tt><big>(</big><em>err</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Err.html#get_error_reason"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Err.get_error_reason" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Err.get_x509_verify_error"> +<tt class="descclassname">M2Crypto.Err.</tt><tt class="descname">get_x509_verify_error</tt><big>(</big><em>err</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Err.html#get_x509_verify_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Err.get_x509_verify_error" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Err.peek_error_code"> +<tt class="descclassname">M2Crypto.Err.</tt><tt class="descname">peek_error_code</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Err.html#peek_error_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Err.peek_error_code" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="module-M2Crypto.RC4"> +<span id="rc4-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">RC4</span></tt> Module<a class="headerlink" href="#module-M2Crypto.RC4" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.RC4.RC4"> +<em class="property">class </em><tt class="descclassname">M2Crypto.RC4.</tt><tt class="descname">RC4</tt><big>(</big><em>key=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RC4.html#RC4"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RC4.RC4" title="Permalink to this definition">¶</a></dt> +<dd><p>Object interface to the stream cipher RC4.</p> +<dl class="method"> +<dt id="M2Crypto.RC4.RC4.final"> +<tt class="descname">final</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/RC4.html#RC4.final"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RC4.RC4.final" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RC4.RC4.rc4_free"> +<tt class="descname">rc4_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.RC4.RC4.rc4_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RC4.RC4.set_key"> +<tt class="descname">set_key</tt><big>(</big><em>key</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RC4.html#RC4.set_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RC4.RC4.set_key" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RC4.RC4.update"> +<tt class="descname">update</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RC4.html#RC4.update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RC4.RC4.update" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.RSA"> +<span id="rsa-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">RSA</span></tt> Module<a class="headerlink" href="#module-M2Crypto.RSA" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.RSA.RSA"> +<em class="property">class </em><tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">RSA</tt><big>(</big><em>rsa</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA" title="Permalink to this definition">¶</a></dt> +<dd><p>RSA Key Pair.</p> +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.as_pem"> +<tt class="descname">as_pem</tt><big>(</big><em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.as_pem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.as_pem" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns the key(pair) as a string in PEM format.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.check_key"> +<tt class="descname">check_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.check_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.check_key" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">returns 1 if rsa is a valid RSA key, and 0 otherwise. +-1 is returned if an error occurs while checking the key. +If the key is invalid or an error occurred, the reason +code can be obtained using ERR_get_error(3).</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.m2_rsa_free"> +<tt class="descname">m2_rsa_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.RSA.RSA.m2_rsa_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.private_decrypt"> +<tt class="descname">private_decrypt</tt><big>(</big><em>data</em>, <em>padding</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.private_decrypt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.private_decrypt" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.private_encrypt"> +<tt class="descname">private_encrypt</tt><big>(</big><em>data</em>, <em>padding</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.private_encrypt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.private_encrypt" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.pub"> +<tt class="descname">pub</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.pub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.pub" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.public_decrypt"> +<tt class="descname">public_decrypt</tt><big>(</big><em>data</em>, <em>padding</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.public_decrypt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.public_decrypt" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.public_encrypt"> +<tt class="descname">public_encrypt</tt><big>(</big><em>data</em>, <em>padding</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.public_encrypt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.public_encrypt" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.save_key"> +<tt class="descname">save_key</tt><big>(</big><em>file</em>, <em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.save_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.save_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the key pair to a file in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>file</strong> – Name of file to save key to.</li> +<li><strong>cipher</strong> – Symmetric cipher to protect the key. The default +cipher is ‘aes_128_cbc’. If cipher is None, then +the key is saved in the clear.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect +the key. The default is +util.passphrase_callback.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.save_key_bio"> +<tt class="descname">save_key_bio</tt><big>(</big><em>bio</em>, <em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.save_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.save_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the key pair to an M2Crypto.BIO.BIO object in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>bio</strong> – M2Crypto.BIO.BIO object to save key to.</li> +<li><strong>cipher</strong> – Symmetric cipher to protect the key. The default +cipher is ‘aes_128_cbc’. If cipher is None, then +the key is saved in the clear.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect +the key. The default is +util.passphrase_callback.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.save_key_der"> +<tt class="descname">save_key_der</tt><big>(</big><em>file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.save_key_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.save_key_der" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the key pair to a file in DER format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>file</strong> – Filename to save key to</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.save_key_der_bio"> +<tt class="descname">save_key_der_bio</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.save_key_der_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.save_key_der_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the key pair to an M2Crypto.BIO.BIO object in DER format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bio</strong> – M2Crypto.BIO.BIO object to save key to.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.save_pem"> +<tt class="descname">save_pem</tt><big>(</big><em>file</em>, <em>cipher='aes_128_cbc'</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="headerlink" href="#M2Crypto.RSA.RSA.save_pem" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the key pair to a file in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>file</strong> – Name of file to save key to.</li> +<li><strong>cipher</strong> – Symmetric cipher to protect the key. The default +cipher is ‘aes_128_cbc’. If cipher is None, then +the key is saved in the clear.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to protect +the key. The default is +util.passphrase_callback.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.save_pub_key"> +<tt class="descname">save_pub_key</tt><big>(</big><em>file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.save_pub_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.save_pub_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the public key to a file in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>file</strong> – Name of file to save key to.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.save_pub_key_bio"> +<tt class="descname">save_pub_key_bio</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.save_pub_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.save_pub_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save the public key to an M2Crypto.BIO.BIO object in PEM format.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bio</strong> – M2Crypto.BIO.BIO object to save key to.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.sign"> +<tt class="descname">sign</tt><big>(</big><em>digest</em>, <em>algo='sha1'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.sign"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.sign" title="Permalink to this definition">¶</a></dt> +<dd><p>Signs a digest with the private key</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>digest</strong> – A digest created by using the digest method</li> +<li><strong>algo</strong> – The method that created the digest. +Legal values like ‘sha1’,’sha224’, ‘sha256’, +‘ripemd160’, and ‘md5’.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a string which is the signature</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.sign_rsassa_pss"> +<tt class="descname">sign_rsassa_pss</tt><big>(</big><em>digest</em>, <em>algo='sha1'</em>, <em>salt_length=20</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.sign_rsassa_pss"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.sign_rsassa_pss" title="Permalink to this definition">¶</a></dt> +<dd><p>Signs a digest with the private key using RSASSA-PSS</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>digest</strong> – A digest created by using the digest method</li> +<li><strong>salt_length</strong> – The length of the salt to use</li> +<li><strong>algo</strong> – The hash algorithm to use +Legal values like ‘sha1’,’sha224’, ‘sha256’, +‘ripemd160’, and ‘md5’.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a string which is the signature</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.verify"> +<tt class="descname">verify</tt><big>(</big><em>data</em>, <em>signature</em>, <em>algo='sha1'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.verify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.verify" title="Permalink to this definition">¶</a></dt> +<dd><p>Verifies the signature with the public key</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>data</strong> – Data that has been signed</li> +<li><strong>signature</strong> – The signature signed with the private key</li> +<li><strong>algo</strong> – The method use to create digest from the data +before it was signed. Legal values like +‘sha1’,’sha224’, ‘sha256’, ‘ripemd160’, and ‘md5’.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">1 or 0, depending on whether the signature was +verified or not.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA.verify_rsassa_pss"> +<tt class="descname">verify_rsassa_pss</tt><big>(</big><em>data</em>, <em>signature</em>, <em>algo='sha1'</em>, <em>salt_length=20</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA.verify_rsassa_pss"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA.verify_rsassa_pss" title="Permalink to this definition">¶</a></dt> +<dd><p>Verifies the signature RSASSA-PSS</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>data</strong> – Data that has been signed</li> +<li><strong>signature</strong> – The signature signed with RSASSA-PSS</li> +<li><strong>salt_length</strong> – The length of the salt that was used</li> +<li><strong>algo</strong> – The hash algorithm to use +Legal values are for example ‘sha1’,’sha224’, +‘sha256’, ‘ripemd160’, and ‘md5’.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">1 or 0, depending on whether the signature was +verified or not.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.RSA.RSAError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">RSAError</tt><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSAError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSAError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.RSA.RSA_pub"> +<em class="property">class </em><tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">RSA_pub</tt><big>(</big><em>rsa</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA_pub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA_pub" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <a class="reference internal" href="#M2Crypto.RSA.RSA" title="M2Crypto.RSA.RSA"><tt class="xref py py-class docutils literal"><span class="pre">M2Crypto.RSA.RSA</span></tt></a></p> +<p>Object interface to an RSA public key.</p> +<dl class="method"> +<dt id="M2Crypto.RSA.RSA_pub.check_key"> +<tt class="descname">check_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA_pub.check_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA_pub.check_key" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA_pub.private_decrypt"> +<tt class="descname">private_decrypt</tt><big>(</big><em>*argv</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA_pub.private_decrypt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA_pub.private_decrypt" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA_pub.private_encrypt"> +<tt class="descname">private_encrypt</tt><big>(</big><em>*argv</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA_pub.private_encrypt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA_pub.private_encrypt" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA_pub.save_key"> +<tt class="descname">save_key</tt><big>(</big><em>file</em>, <em>*args</em>, <em>**kw</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA_pub.save_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA_pub.save_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Save public key to file.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.RSA.RSA_pub.save_key_bio"> +<tt class="descname">save_key_bio</tt><big>(</big><em>bio</em>, <em>*args</em>, <em>**kw</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#RSA_pub.save_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.RSA_pub.save_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Save public key to BIO.</p> +</dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.RSA.gen_key"> +<tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">gen_key</tt><big>(</big><em>bits</em>, <em>e</em>, <em>callback=<function keygen_callback at 0x1ffa410></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#gen_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.gen_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Generate an RSA key pair.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bits</strong> – Key length, in bits.</li> +<li><strong>e</strong> – The RSA public exponent.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +during key generation; its usual purpose is to +provide visual feedback. The default callback is +keygen_callback.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.RSA.RSA object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.RSA.keygen_callback"> +<tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">keygen_callback</tt><big>(</big><em>p</em>, <em>n</em>, <em>out=<open file '<stdout>'</em>, <em>mode 'w' at 0x7fc7ebc63150></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#keygen_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.keygen_callback" title="Permalink to this definition">¶</a></dt> +<dd><p>Default callback for gen_key().</p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.RSA.load_key"> +<tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">load_key</tt><big>(</big><em>file</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#load_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.load_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an RSA key pair from file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> – Name of file containing RSA public key in PEM format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to unlock the +key. The default is util.passphrase_callback.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.RSA.RSA object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.RSA.load_key_bio"> +<tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">load_key_bio</tt><big>(</big><em>bio</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#load_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.load_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an RSA key pair from an M2Crypto.BIO.BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bio</strong> – M2Crypto.BIO.BIO object containing RSA key pair in PEM +format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to unlock the +key. The default is util.passphrase_callback.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.RSA.RSA object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.RSA.load_key_string"> +<tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">load_key_string</tt><big>(</big><em>string</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#load_key_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.load_key_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an RSA key pair from a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>string</strong> – String containing RSA key pair in PEM format.</li> +<li><strong>callback</strong> – A Python callable object that is invoked +to acquire a passphrase with which to unlock the +key. The default is util.passphrase_callback.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.RSA.RSA object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.RSA.load_pub_key"> +<tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">load_pub_key</tt><big>(</big><em>file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#load_pub_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.load_pub_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an RSA public key from file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>file</strong> – Name of file containing RSA public key in PEM format.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">M2Crypto.RSA.RSA_pub object.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.RSA.load_pub_key_bio"> +<tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">load_pub_key_bio</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#load_pub_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.load_pub_key_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Load an RSA public key from an M2Crypto.BIO.BIO object.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bio</strong> – M2Crypto.BIO.BIO object containing RSA public key in PEM +format.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">M2Crypto.RSA.RSA_pub object.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.RSA.new_pub_key"> +<tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">new_pub_key</tt><big>(</big><em>e_n</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#new_pub_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.new_pub_key" title="Permalink to this definition">¶</a></dt> +<dd><p>Instantiate an RSA_pub object from an (e, n) tuple.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>e</strong> – The RSA public exponent; it is a string in OpenSSL’s MPINT +format - 4-byte big-endian bit-count followed by the +appropriate number of bits.</li> +<li><strong>n</strong> – The RSA composite of primes; it is a string in OpenSSL’s +MPINT format - 4-byte big-endian bit-count followed by the +appropriate number of bits.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.RSA.RSA_pub object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.RSA.rsa_error"> +<tt class="descclassname">M2Crypto.RSA.</tt><tt class="descname">rsa_error</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/RSA.html#rsa_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.RSA.rsa_error" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="module-M2Crypto.Rand"> +<span id="rand-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">Rand</span></tt> Module<a class="headerlink" href="#module-M2Crypto.Rand" title="Permalink to this headline">¶</a></h2> +<dl class="function"> +<dt id="M2Crypto.Rand.rand_seed"> +<tt class="descclassname">M2Crypto.Rand.</tt><tt class="descname">rand_seed</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.Rand.rand_seed" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Rand.rand_add"> +<tt class="descclassname">M2Crypto.Rand.</tt><tt class="descname">rand_add</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.Rand.rand_add" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Rand.load_file"> +<tt class="descclassname">M2Crypto.Rand.</tt><tt class="descname">load_file</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.Rand.load_file" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Rand.save_file"> +<tt class="descclassname">M2Crypto.Rand.</tt><tt class="descname">save_file</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.Rand.save_file" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Rand.rand_bytes"> +<tt class="descclassname">M2Crypto.Rand.</tt><tt class="descname">rand_bytes</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.Rand.rand_bytes" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Rand.rand_pseudo_bytes"> +<tt class="descclassname">M2Crypto.Rand.</tt><tt class="descname">rand_pseudo_bytes</tt><big>(</big><em>n</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/Rand.html#rand_pseudo_bytes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Rand.rand_pseudo_bytes" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Rand.rand_file_name"> +<tt class="descclassname">M2Crypto.Rand.</tt><tt class="descname">rand_file_name</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/Rand.html#rand_file_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.Rand.rand_file_name" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.Rand.rand_status"> +<tt class="descclassname">M2Crypto.Rand.</tt><tt class="descname">rand_status</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.Rand.rand_status" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="module-M2Crypto.SMIME"> +<span id="smime-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">SMIME</span></tt> Module<a class="headerlink" href="#module-M2Crypto.SMIME" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.SMIME.Cipher"> +<em class="property">class </em><tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">Cipher</tt><big>(</big><em>algo</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#Cipher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.Cipher" title="Permalink to this definition">¶</a></dt> +<dd><p>Object interface to EVP_CIPHER without all the frills of +M2Crypto.EVP.Cipher.</p> +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.SMIME.PKCS7"> +<em class="property">class </em><tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">PKCS7</tt><big>(</big><em>pkcs7=None</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#PKCS7"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.PKCS7" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.SMIME.PKCS7.get0_signers"> +<tt class="descname">get0_signers</tt><big>(</big><em>certs</em>, <em>flags=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#PKCS7.get0_signers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.PKCS7.get0_signers" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.PKCS7.m2_pkcs7_free"> +<tt class="descname">m2_pkcs7_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.SMIME.PKCS7.m2_pkcs7_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.PKCS7.type"> +<tt class="descname">type</tt><big>(</big><em>text_name=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#PKCS7.type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.PKCS7.type" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.PKCS7.write"> +<tt class="descname">write</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#PKCS7.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.PKCS7.write" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.PKCS7.write_der"> +<tt class="descname">write_der</tt><big>(</big><em>bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#PKCS7.write_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.PKCS7.write_der" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.SMIME.PKCS7_Error"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">PKCS7_Error</tt><a class="reference internal" href="_modules/M2Crypto/SMIME.html#PKCS7_Error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.PKCS7_Error" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.SMIME.SMIME"> +<em class="property">class </em><tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">SMIME</tt><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.decrypt"> +<tt class="descname">decrypt</tt><big>(</big><em>pkcs7</em>, <em>flags=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.decrypt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.decrypt" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.encrypt"> +<tt class="descname">encrypt</tt><big>(</big><em>data_bio</em>, <em>flags=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.encrypt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.encrypt" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.load_key"> +<tt class="descname">load_key</tt><big>(</big><em>keyfile</em>, <em>certfile=None</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.load_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.load_key" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.load_key_bio"> +<tt class="descname">load_key_bio</tt><big>(</big><em>keybio</em>, <em>certbio=None</em>, <em>callback=<function passphrase_callback at 0x1faa848></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.load_key_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.load_key_bio" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.set_cipher"> +<tt class="descname">set_cipher</tt><big>(</big><em>cipher</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.set_cipher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.set_cipher" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.set_x509_stack"> +<tt class="descname">set_x509_stack</tt><big>(</big><em>stack</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.set_x509_stack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.set_x509_stack" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.set_x509_store"> +<tt class="descname">set_x509_store</tt><big>(</big><em>store</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.set_x509_store"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.set_x509_store" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.sign"> +<tt class="descname">sign</tt><big>(</big><em>data_bio</em>, <em>flags=0</em>, <em>algo='sha1'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.sign"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.sign" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.unset_cipher"> +<tt class="descname">unset_cipher</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.unset_cipher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.unset_cipher" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.unset_key"> +<tt class="descname">unset_key</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.unset_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.unset_key" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.unset_x509_stack"> +<tt class="descname">unset_x509_stack</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.unset_x509_stack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.unset_x509_stack" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.unset_x509_store"> +<tt class="descname">unset_x509_store</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.unset_x509_store"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.unset_x509_store" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.verify"> +<tt class="descname">verify</tt><big>(</big><em>pkcs7</em>, <em>data_bio=None</em>, <em>flags=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.verify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.verify" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.SMIME.SMIME.write"> +<tt class="descname">write</tt><big>(</big><em>out_bio</em>, <em>pkcs7</em>, <em>data_bio=None</em>, <em>flags=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME.write" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.SMIME.SMIME_Error"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">SMIME_Error</tt><a class="reference internal" href="_modules/M2Crypto/SMIME.html#SMIME_Error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.SMIME_Error" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.SMIME.load_pkcs7"> +<tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">load_pkcs7</tt><big>(</big><em>p7file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#load_pkcs7"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.load_pkcs7" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.SMIME.load_pkcs7_bio"> +<tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">load_pkcs7_bio</tt><big>(</big><em>p7_bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#load_pkcs7_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.load_pkcs7_bio" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.SMIME.load_pkcs7_bio_der"> +<tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">load_pkcs7_bio_der</tt><big>(</big><em>p7_bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#load_pkcs7_bio_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.load_pkcs7_bio_der" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.SMIME.load_pkcs7_der"> +<tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">load_pkcs7_der</tt><big>(</big><em>p7file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#load_pkcs7_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.load_pkcs7_der" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.SMIME.smime_load_pkcs7"> +<tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">smime_load_pkcs7</tt><big>(</big><em>p7file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#smime_load_pkcs7"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.smime_load_pkcs7" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.SMIME.smime_load_pkcs7_bio"> +<tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">smime_load_pkcs7_bio</tt><big>(</big><em>p7_bio</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#smime_load_pkcs7_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.smime_load_pkcs7_bio" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.SMIME.text_crlf"> +<tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">text_crlf</tt><big>(</big><em>text</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#text_crlf"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.text_crlf" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.SMIME.text_crlf_bio"> +<tt class="descclassname">M2Crypto.SMIME.</tt><tt class="descname">text_crlf_bio</tt><big>(</big><em>bio_in</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/SMIME.html#text_crlf_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SMIME.text_crlf_bio" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="module-M2Crypto.X509"> +<span id="x509-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">X509</span></tt> Module<a class="headerlink" href="#module-M2Crypto.X509" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.X509.CRL"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">CRL</tt><big>(</big><em>crl=None</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#CRL"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.CRL" title="Permalink to this definition">¶</a></dt> +<dd><p>X509 Certificate Revocation List</p> +<dl class="method"> +<dt id="M2Crypto.X509.CRL.as_text"> +<tt class="descname">as_text</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#CRL.as_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.CRL.as_text" title="Permalink to this definition">¶</a></dt> +<dd><p>Return CRL in PEM format in a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">String containing the CRL in PEM format.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.CRL.m2_x509_crl_free"> +<tt class="descname">m2_x509_crl_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.CRL.m2_x509_crl_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.X509.Request"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">Request</tt><big>(</big><em>req=None</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request" title="Permalink to this definition">¶</a></dt> +<dd><p>X509 Certificate Request.</p> +<dl class="method"> +<dt id="M2Crypto.X509.Request.add_extensions"> +<tt class="descname">add_extensions</tt><big>(</big><em>ext_stack</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.add_extensions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.add_extensions" title="Permalink to this definition">¶</a></dt> +<dd><p>Add X509 extensions to this request.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ext_stack</strong> – Stack of extensions to add.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 for success and 0 for failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.as_der"> +<tt class="descname">as_der</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.as_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.as_der" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.as_pem"> +<tt class="descname">as_pem</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.as_pem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.as_pem" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.as_text"> +<tt class="descname">as_text</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.as_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.as_text" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.get_pubkey"> +<tt class="descname">get_pubkey</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.get_pubkey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.get_pubkey" title="Permalink to this definition">¶</a></dt> +<dd><p>Get the public key for the request.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Public key from the request.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.get_subject"> +<tt class="descname">get_subject</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.get_subject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.get_subject" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.get_version"> +<tt class="descname">get_version</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.get_version"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.get_version" title="Permalink to this definition">¶</a></dt> +<dd><p>Get version.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Returns version.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.m2_x509_req_free"> +<tt class="descname">m2_x509_req_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.Request.m2_x509_req_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.save"> +<tt class="descname">save</tt><big>(</big><em>filename</em>, <em>format=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.save" title="Permalink to this definition">¶</a></dt> +<dd><p>Saves X.509 certificate request to a file. Default output +format is PEM.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>filename</strong> – Name of the file the request will be saved to.</li> +<li><strong>format</strong> – Controls what output format is used to save the +request. Either FORMAT_PEM or FORMAT_DER to save +in PEM or DER format. Raises ValueError if an +unknown format is used.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">1 for success, 0 for failure. +The error code can be obtained by ERR_get_error.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.save_pem"> +<tt class="descname">save_pem</tt><big>(</big><em>filename</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.save_pem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.save_pem" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.set_pubkey"> +<tt class="descname">set_pubkey</tt><big>(</big><em>pkey</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.set_pubkey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.set_pubkey" title="Permalink to this definition">¶</a></dt> +<dd><p>Set the public key for the request.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pkey</strong> – Public key</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Return 1 for success and 0 for failure.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.set_subject"> +<tt class="descname">set_subject</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#M2Crypto.X509.Request.set_subject" title="Permalink to this definition">¶</a></dt> +<dd><p>Set subject name.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> – subjectName field.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 for success and 0 for failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.set_subject_name"> +<tt class="descname">set_subject_name</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.set_subject_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.set_subject_name" title="Permalink to this definition">¶</a></dt> +<dd><p>Set subject name.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> – subjectName field.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 for success and 0 for failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.set_version"> +<tt class="descname">set_version</tt><big>(</big><em>version</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.set_version"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.set_version" title="Permalink to this definition">¶</a></dt> +<dd><p>Set version.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>version</strong> – Version number.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Returns 0 on failure.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.sign"> +<tt class="descname">sign</tt><big>(</big><em>pkey</em>, <em>md</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.sign"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.sign" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>pkey</strong> – PKey to be signed</li> +<li><strong>md</strong> – used algorigthm</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">1 for success and 0 for failure</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.Request.verify"> +<tt class="descname">verify</tt><big>(</big><em>pkey</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#Request.verify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.Request.verify" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pkey</strong> – PKey to be verified</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 for success and 0 for failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.X509.X509"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">X509</tt><big>(</big><em>x509=None</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509" title="Permalink to this definition">¶</a></dt> +<dd><p>X.509 Certificate</p> +<dl class="method"> +<dt id="M2Crypto.X509.X509.add_ext"> +<tt class="descname">add_ext</tt><big>(</big><em>ext</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.add_ext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.add_ext" title="Permalink to this definition">¶</a></dt> +<dd><p>Add X509 extension to this certificate.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ext</strong> – Extension</td> +</tr> +</tbody> +</table> +<p>:return 1 for success and 0 for failure</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.as_der"> +<tt class="descname">as_der</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.as_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.as_der" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.as_pem"> +<tt class="descname">as_pem</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.as_pem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.as_pem" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.as_text"> +<tt class="descname">as_text</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.as_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.as_text" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.check_ca"> +<tt class="descname">check_ca</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.check_ca"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.check_ca" title="Permalink to this definition">¶</a></dt> +<dd><p>Check if the certificate is a Certificate Authority (CA) certificate.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">0 if the certificate is not CA, nonzero otherwise.</td> +</tr> +<tr class="field-even field"><th class="field-name">Requires :</th><td class="field-body">OpenSSL 0.9.8 or newer</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.check_purpose"> +<tt class="descname">check_purpose</tt><big>(</big><em>id</em>, <em>ca</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.check_purpose"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.check_purpose" title="Permalink to this definition">¶</a></dt> +<dd><p>Check if the certificate’s purpose matches the asked purpose.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>id</strong> – Purpose id. See X509_PURPOSE_* constants.</li> +<li><strong>ca</strong> – 1 if the certificate should be CA, 0 otherwise.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">0 if the certificate purpose does not match, nonzero +otherwise.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_ext"> +<tt class="descname">get_ext</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_ext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_ext" title="Permalink to this definition">¶</a></dt> +<dd><p>Get X509 extension by name.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> – Name of the extension</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">X509_Extension</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_ext_at"> +<tt class="descname">get_ext_at</tt><big>(</big><em>index</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_ext_at"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_ext_at" title="Permalink to this definition">¶</a></dt> +<dd><p>Get X509 extension by index.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> – Name of the extension</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">X509_Extension</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_ext_count"> +<tt class="descname">get_ext_count</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_ext_count"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_ext_count" title="Permalink to this definition">¶</a></dt> +<dd><p>Get X509 extension count.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_fingerprint"> +<tt class="descname">get_fingerprint</tt><big>(</big><em>md='md5'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_fingerprint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_fingerprint" title="Permalink to this definition">¶</a></dt> +<dd><p>Get the fingerprint of the certificate.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>md</strong> – Message digest algorithm to use.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">String containing the fingerprint in hex format.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_issuer"> +<tt class="descname">get_issuer</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_issuer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_issuer" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_not_after"> +<tt class="descname">get_not_after</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_not_after"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_not_after" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_not_before"> +<tt class="descname">get_not_before</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_not_before"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_not_before" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_pubkey"> +<tt class="descname">get_pubkey</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_pubkey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_pubkey" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_serial_number"> +<tt class="descname">get_serial_number</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_serial_number"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_serial_number" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_subject"> +<tt class="descname">get_subject</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_subject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_subject" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.get_version"> +<tt class="descname">get_version</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.get_version"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.get_version" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.m2_x509_free"> +<tt class="descname">m2_x509_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509.m2_x509_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.save"> +<tt class="descname">save</tt><big>(</big><em>filename</em>, <em>format=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.save" title="Permalink to this definition">¶</a></dt> +<dd><p>Saves X.509 certificate to a file. Default output +format is PEM.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>filename</strong> – Name of the file the cert will be saved to.</li> +<li><strong>format</strong> – Controls what output format is used to save the cert. +Either FORMAT_PEM or FORMAT_DER to save in PEM or +DER format. Raises a ValueError if an unknow +format is used.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">1 for success or 0 for failure</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.save_pem"> +<tt class="descname">save_pem</tt><big>(</big><em>filename</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.save_pem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.save_pem" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> – name of the file to be loaded</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 for success or 0 for failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.set_issuer"> +<tt class="descname">set_issuer</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.set_issuer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.set_issuer" title="Permalink to this definition">¶</a></dt> +<dd><p>Set issuer name.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> – subjectName field.</td> +</tr> +</tbody> +</table> +<p>:return 1 for success and 0 for failure</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.set_issuer_name"> +<tt class="descname">set_issuer_name</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.set_issuer_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.set_issuer_name" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">1 on success, 0 on failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.set_not_after"> +<tt class="descname">set_not_after</tt><big>(</big><em>asn1_time</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.set_not_after"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.set_not_after" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">1 on success, 0 on failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.set_not_before"> +<tt class="descname">set_not_before</tt><big>(</big><em>asn1_time</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.set_not_before"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.set_not_before" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">1 on success, 0 on failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.set_pubkey"> +<tt class="descname">set_pubkey</tt><big>(</big><em>pkey</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.set_pubkey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.set_pubkey" title="Permalink to this definition">¶</a></dt> +<dd><p>Set the public key for the certificate</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pkey</strong> – Public key</td> +</tr> +</tbody> +</table> +<p>:return 1 for success and 0 for failure</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.set_serial_number"> +<tt class="descname">set_serial_number</tt><big>(</big><em>serial</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.set_serial_number"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.set_serial_number" title="Permalink to this definition">¶</a></dt> +<dd><p>Set serial number.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>serial</strong> – Serial number.</td> +</tr> +</tbody> +</table> +<p>:return 1 for success and 0 for failure.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.set_subject"> +<tt class="descname">set_subject</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.set_subject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.set_subject" title="Permalink to this definition">¶</a></dt> +<dd><p>Set subject name.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> – subjectName field.</td> +</tr> +</tbody> +</table> +<p>:return 1 for success and 0 for failure</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.set_subject_name"> +<tt class="descname">set_subject_name</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.set_subject_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.set_subject_name" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">1 on success, 0 on failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.set_version"> +<tt class="descname">set_version</tt><big>(</big><em>version</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.set_version"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.set_version" title="Permalink to this definition">¶</a></dt> +<dd><p>Set version of the certificate.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>version</strong> – Version number.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Returns 0 on failure.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.sign"> +<tt class="descname">sign</tt><big>(</big><em>pkey</em>, <em>md</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.sign"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.sign" title="Permalink to this definition">¶</a></dt> +<dd><p>Sign the certificate.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>pkey</strong> – Public key</li> +<li><strong>md</strong> – Message digest algorithm to use for signing, +for example ‘sha1’.</li> +</ul> +</td> +</tr> +</tbody> +</table> +<p>:return int</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509.verify"> +<tt class="descname">verify</tt><big>(</big><em>pkey=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509.verify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509.verify" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="exception"> +<dt id="M2Crypto.X509.X509Error"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">X509Error</tt><a class="reference internal" href="_modules/M2Crypto/X509.html#X509Error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509Error" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.X509.X509_Extension"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">X509_Extension</tt><big>(</big><em>x509_ext_ptr=None</em>, <em>_pyfree=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Extension"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Extension" title="Permalink to this definition">¶</a></dt> +<dd><p>X509 Extension</p> +<dl class="method"> +<dt id="M2Crypto.X509.X509_Extension.get_critical"> +<tt class="descname">get_critical</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Extension.get_critical"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Extension.get_critical" title="Permalink to this definition">¶</a></dt> +<dd><p>Return whether or not this is a critical extension.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Nonzero if this is a critical extension.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Extension.get_name"> +<tt class="descname">get_name</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Extension.get_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Extension.get_name" title="Permalink to this definition">¶</a></dt> +<dd><p>Get the extension name, for example ‘subjectAltName’.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Extension.get_value"> +<tt class="descname">get_value</tt><big>(</big><em>flag=0</em>, <em>indent=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Extension.get_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Extension.get_value" title="Permalink to this definition">¶</a></dt> +<dd><p>Get the extension value, for example ‘<a class="reference external" href="DNS:www.example.com">DNS:www.example.com</a>‘.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>flag</strong> – Flag to control what and how to print.</li> +<li><strong>indent</strong> – How many spaces to print before actual value.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Extension.m2_x509_extension_free"> +<tt class="descname">m2_x509_extension_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509_Extension.m2_x509_extension_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Extension.set_critical"> +<tt class="descname">set_critical</tt><big>(</big><em>critical=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Extension.set_critical"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Extension.set_critical" title="Permalink to this definition">¶</a></dt> +<dd><p>Mark this extension critical or noncritical. By default an +extension is not critical.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>critical</strong> – Nonzero sets this extension as critical. +Calling this method without arguments will +set this extension to critical.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 for success, 0 for failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.X509.X509_Extension_Stack"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">X509_Extension_Stack</tt><big>(</big><em>stack=None</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Extension_Stack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Extension_Stack" title="Permalink to this definition">¶</a></dt> +<dd><p>X509 Extension Stack</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Warning :</th><td class="field-body">Do not modify the underlying OpenSSL stack +except through this interface, or use any OpenSSL +functions that do so indirectly. Doing so will get the +OpenSSL stack and the internal pystack of this class out +of sync, leading to python memory leaks, exceptions or +even python crashes!</td> +</tr> +</tbody> +</table> +<dl class="method"> +<dt id="M2Crypto.X509.X509_Extension_Stack.m2_sk_x509_extension_free"> +<tt class="descname">m2_sk_x509_extension_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509_Extension_Stack.m2_sk_x509_extension_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Extension_Stack.pop"> +<tt class="descname">pop</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Extension_Stack.pop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Extension_Stack.pop" title="Permalink to this definition">¶</a></dt> +<dd><p>Pop X509_Extension object from the stack.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">X509_Extension popped</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Extension_Stack.push"> +<tt class="descname">push</tt><big>(</big><em>x509_ext</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Extension_Stack.push"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Extension_Stack.push" title="Permalink to this definition">¶</a></dt> +<dd><p>Push X509_Extension object onto the stack.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x509_ext</strong> – X509_Extension object to be pushed onto the stack.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The number of extensions on the stack.</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.X509.X509_Name"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">X509_Name</tt><big>(</big><em>x509_name=None</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name" title="Permalink to this definition">¶</a></dt> +<dd><p>X509 Name</p> +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name.add_entry_by_txt"> +<tt class="descname">add_entry_by_txt</tt><big>(</big><em>field</em>, <em>type</em>, <em>entry</em>, <em>len</em>, <em>loc</em>, <em>set</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name.add_entry_by_txt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name.add_entry_by_txt" title="Permalink to this definition">¶</a></dt> +<dd><p>Add X509_Name field whose name is identified by its name.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>field</strong> – name of the entry</li> +<li><strong>type</strong> – use MBSTRING_ASC or MBSTRING_UTF8 +(or standard ASN1 type like V_ASN1_IA5STRING)</li> +<li><strong>entry</strong> – value</li> +<li><strong>len</strong> – buf_len of the entry +(-1 and the length is computed automagically)</li> +</ul> +</td> +</tr> +</tbody> +</table> +<p>The <tt class="docutils literal"><span class="pre">loc</span></tt> and <tt class="docutils literal"><span class="pre">set</span></tt> parameters determine where a new entry +should be added. +For almost all applications loc can be set to -1 and set to 0. +This adds a new entry to the end of name as a single valued +RelativeDistinguishedName (RDN).</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>loc</strong> – determines the index where the new entry is +inserted: if it is -1 it is appended.</li> +<li><strong>set</strong> – determines how the new type is added. If it is zero +a new RDN is created. +If set is -1 or 1 it is added to the previous or next RDN +structure respectively. This will then be a multivalued +RDN: since multivalues RDNs are very seldom used set is +almost always set to zero.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">1 for success of 0 if an error occurred.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name.as_der"> +<tt class="descname">as_der</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name.as_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name.as_der" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name.as_hash"> +<tt class="descname">as_hash</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name.as_hash"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name.as_hash" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name.as_text"> +<tt class="descname">as_text</tt><big>(</big><em>indent=0</em>, <em>flags=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name.as_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name.as_text" title="Permalink to this definition">¶</a></dt> +<dd><p>as_text returns the name as a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>indent</strong> – Each line in multiline format is indented +by this many spaces.</li> +<li><strong>flags</strong> – Flags that control how the output should be formatted.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name.entry_count"> +<tt class="descname">entry_count</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name.entry_count"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name.entry_count" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name.get_entries_by_nid"> +<tt class="descname">get_entries_by_nid</tt><big>(</big><em>nid</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name.get_entries_by_nid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name.get_entries_by_nid" title="Permalink to this definition">¶</a></dt> +<dd><p>Retrieve the next index matching nid.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>nid</strong> – name of the entry (as m2.NID* constants)</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of X509_Name_Entry items</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name.m2_x509_name_free"> +<tt class="descname">m2_x509_name_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509_Name.m2_x509_name_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="attribute"> +<dt id="M2Crypto.X509.X509_Name.nid"> +<tt class="descname">nid</tt><em class="property"> = {'C': 14, 'serialNumber': 105, 'organizationName': 17, 'CN': 13, 'SP': 16, 'commonName': 13, 'L': 15, 'stateOrProvinceName': 16, 'ST': 16, 'emailAddress': 48, 'O': 17, 'localityName': 15, 'GN': 99, 'surname': 100, 'OU': 18, 'givenName': 99, 'Email': 48, 'organizationUnitName': 18, 'SN': 100}</em><a class="headerlink" href="#M2Crypto.X509.X509_Name.nid" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.X509.X509_Name_Entry"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">X509_Name_Entry</tt><big>(</big><em>x509_name_entry</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name_Entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name_Entry" title="Permalink to this definition">¶</a></dt> +<dd><p>X509 Name Entry</p> +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name_Entry.create_by_txt"> +<tt class="descname">create_by_txt</tt><big>(</big><em>field</em>, <em>type</em>, <em>entry</em>, <em>len</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name_Entry.create_by_txt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name_Entry.create_by_txt" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name_Entry.get_data"> +<tt class="descname">get_data</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name_Entry.get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name_Entry.get_data" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name_Entry.get_object"> +<tt class="descname">get_object</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name_Entry.get_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name_Entry.get_object" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name_Entry.m2_x509_name_entry_free"> +<tt class="descname">m2_x509_name_entry_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509_Name_Entry.m2_x509_name_entry_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name_Entry.set_data"> +<tt class="descname">set_data</tt><big>(</big><em>data</em>, <em>type=4097</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name_Entry.set_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name_Entry.set_data" title="Permalink to this definition">¶</a></dt> +<dd><p>Sets the field name to asn1obj</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – data in a binary form to be set</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">0 on failure, 1 on success</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Name_Entry.set_object"> +<tt class="descname">set_object</tt><big>(</big><em>asn1obj</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Name_Entry.set_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Name_Entry.set_object" title="Permalink to this definition">¶</a></dt> +<dd><p>Sets the field name to asn1obj</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>asn1obj</strong> – </td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">0 on failure, 1 on success</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.X509.X509_Stack"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">X509_Stack</tt><big>(</big><em>stack=None</em>, <em>_pyfree=0</em>, <em>_pyfree_x509=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Stack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Stack" title="Permalink to this definition">¶</a></dt> +<dd><p>X509 Stack</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Warning :</th><td class="field-body">Do not modify the underlying OpenSSL stack +except through this interface, or use any OpenSSL +functions that do so indirectly. Doing so will get the +OpenSSL stack and the internal pystack of this class out +of sync, leading to python memory leaks, exceptions or +even python crashes!</td> +</tr> +</tbody> +</table> +<dl class="method"> +<dt id="M2Crypto.X509.X509_Stack.as_der"> +<tt class="descname">as_der</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Stack.as_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Stack.as_der" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the stack as a DER encoded string</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Stack.m2_sk_x509_free"> +<tt class="descname">m2_sk_x509_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509_Stack.m2_sk_x509_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Stack.pop"> +<tt class="descname">pop</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Stack.pop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Stack.pop" title="Permalink to this definition">¶</a></dt> +<dd><p>pop a certificate from the stack.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">X509 object that was popped, or None if there is +nothing to pop.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Stack.push"> +<tt class="descname">push</tt><big>(</big><em>x509</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Stack.push"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Stack.push" title="Permalink to this definition">¶</a></dt> +<dd><p>push an X509 certificate onto the stack.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x509</strong> – X509 object.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The number of X509 objects currently on the stack.</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.X509.X509_Store"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">X509_Store</tt><big>(</big><em>store=None</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Store"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Store" title="Permalink to this definition">¶</a></dt> +<dd><p>X509 Store</p> +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store.add_cert"> +<tt class="descname">add_cert</tt><big>(</big><em>x509</em><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509_Store.add_cert" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store.add_x509"> +<tt class="descname">add_x509</tt><big>(</big><em>x509</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Store.add_x509"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Store.add_x509" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store.load_info"> +<tt class="descname">load_info</tt><big>(</big><em>file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Store.load_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Store.load_info" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>file</strong> – filename</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 on success, 0 on failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store.load_locations"> +<tt class="descname">load_locations</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509_Store.load_locations" title="Permalink to this definition">¶</a></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>file</strong> – filename</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">1 on success, 0 on failure</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store.m2_x509_store_free"> +<tt class="descname">m2_x509_store_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509_Store.m2_x509_store_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store.set_verify_cb"> +<tt class="descname">set_verify_cb</tt><big>(</big><em>callback=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Store.set_verify_cb"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Store.set_verify_cb" title="Permalink to this definition">¶</a></dt> +<dd><p>Set callback which will be called when the store is verified. +Wrapper over OpenSSL X509_STORE_set_verify_cb().</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback</strong> – Callable to specify verification options. +Type of the callable must be: +(int, X509_Store_Context) -> int. +If None: set the standard options.</td> +</tr> +<tr class="field-even field"><th class="field-name">Note :</th><td class="field-body">compile-time or run-time errors in the callback would result +in mysterious errors during verification, which could be hard +to trace.</td> +</tr> +<tr class="field-odd field"><th class="field-name">Note :</th><td class="field-body">Python exceptions raised in callbacks do not propagate to +verify() call.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.X509.X509_Store_Context"> +<em class="property">class </em><tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">X509_Store_Context</tt><big>(</big><em>x509_store_ctx</em>, <em>_pyfree=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Store_Context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Store_Context" title="Permalink to this definition">¶</a></dt> +<dd><p>X509 Store Context</p> +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store_Context.get1_chain"> +<tt class="descname">get1_chain</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Store_Context.get1_chain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Store_Context.get1_chain" title="Permalink to this definition">¶</a></dt> +<dd><p>Get certificate chain.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Reference counted (i.e. safe to use even after the store +context goes away) stack of certificates in the chain.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store_Context.get_current_cert"> +<tt class="descname">get_current_cert</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Store_Context.get_current_cert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Store_Context.get_current_cert" title="Permalink to this definition">¶</a></dt> +<dd><p>Get current X.509 certificate.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Warning :</th><td class="field-body">The returned certificate is NOT refcounted, so you can not +rely on it being valid once the store context goes +away or is modified.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store_Context.get_error"> +<tt class="descname">get_error</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Store_Context.get_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Store_Context.get_error" title="Permalink to this definition">¶</a></dt> +<dd><p>Get error code.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store_Context.get_error_depth"> +<tt class="descname">get_error_depth</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#X509_Store_Context.get_error_depth"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.X509_Store_Context.get_error_depth" title="Permalink to this definition">¶</a></dt> +<dd><p>Get error depth.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.X509.X509_Store_Context.m2_x509_store_ctx_free"> +<tt class="descname">m2_x509_store_ctx_free</tt><big>(</big><big>)</big><a class="headerlink" href="#M2Crypto.X509.X509_Store_Context.m2_x509_store_ctx_free" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.load_cert"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">load_cert</tt><big>(</big><em>file</em>, <em>format=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#load_cert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.load_cert" title="Permalink to this definition">¶</a></dt> +<dd><p>Load certificate from file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> – Name of file containing certificate in either DER or +PEM format.</li> +<li><strong>format</strong> – Describes the format of the file to be loaded, +either PEM or DER.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.X509.X509 object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.load_cert_bio"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">load_cert_bio</tt><big>(</big><em>bio</em>, <em>format=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#load_cert_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.load_cert_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Load certificate from a bio.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bio</strong> – BIO pointing at a certificate in either DER or PEM format.</li> +<li><strong>format</strong> – Describes the format of the cert to be loaded, +either PEM or DER (via constants FORMAT_PEM +and FORMAT_FORMAT_DER)</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.X509.X509 object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.load_cert_der_string"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">load_cert_der_string</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#load_cert_der_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.load_cert_der_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Load certificate from a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>string</strong> – String containing a certificate in DER format.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">M2Crypto.X509.X509 object.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.load_cert_string"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">load_cert_string</tt><big>(</big><em>string</em>, <em>format=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#load_cert_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.load_cert_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Load certificate from a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>string</strong> – String containing a certificate in either DER or PEM format.</li> +<li><strong>format</strong> – Describes the format of the cert to be loaded, +either PEM or DER (via constants FORMAT_PEM +and FORMAT_FORMAT_DER)</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.X509.X509 object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.load_crl"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">load_crl</tt><big>(</big><em>file</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#load_crl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.load_crl" title="Permalink to this definition">¶</a></dt> +<dd><p>Load CRL from file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>file</strong> – Name of file containing CRL in PEM format.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">M2Crypto.X509.CRL object.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.load_request"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">load_request</tt><big>(</big><em>file</em>, <em>format=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#load_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.load_request" title="Permalink to this definition">¶</a></dt> +<dd><p>Load certificate request from file.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> – Name of file containing certificate request in +either PEM or DER format.</li> +<li><strong>format</strong> – Describes the format of the file to be loaded, +either PEM or DER. (using constants FORMAT_PEM +and FORMAT_DER)</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Request object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.load_request_bio"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">load_request_bio</tt><big>(</big><em>bio</em>, <em>format=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#load_request_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.load_request_bio" title="Permalink to this definition">¶</a></dt> +<dd><p>Load certificate request from a bio.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>bio</strong> – BIO pointing at a certificate request in +either DER or PEM format.</li> +<li><strong>format</strong> – Describes the format of the request to be loaded, +either PEM or DER. (using constants FORMAT_PEM +and FORMAT_DER)</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.X509.Request object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.load_request_der_string"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">load_request_der_string</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#load_request_der_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.load_request_der_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Load certificate request from a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>string</strong> – String containing a certificate request in DER format.</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">M2Crypto.X509.Request object.</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.load_request_string"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">load_request_string</tt><big>(</big><em>string</em>, <em>format=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#load_request_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.load_request_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Load certificate request from a string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>string</strong> – String containing a certificate request in +either DER or PEM format.</li> +<li><strong>format</strong> – Describes the format of the request to be loaded, +either PEM or DER. (using constants FORMAT_PEM +and FORMAT_DER)</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">M2Crypto.X509.Request object.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.new_extension"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">new_extension</tt><big>(</big><em>name</em>, <em>value</em>, <em>critical=0</em>, <em>_pyfree=1</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#new_extension"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.new_extension" title="Permalink to this definition">¶</a></dt> +<dd><p>Create new X509_Extension instance.</p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.new_stack_from_der"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">new_stack_from_der</tt><big>(</big><em>der_string</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#new_stack_from_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.new_stack_from_der" title="Permalink to this definition">¶</a></dt> +<dd><p>Create a new X509_Stack from DER string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">X509_Stack</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.X509.x509_store_default_cb"> +<tt class="descclassname">M2Crypto.X509.</tt><tt class="descname">x509_store_default_cb</tt><big>(</big><em>ok</em>, <em>ctx</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/X509.html#x509_store_default_cb"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.X509.x509_store_default_cb" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="module-M2Crypto.callback"> +<span id="callback-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">callback</span></tt> Module<a class="headerlink" href="#module-M2Crypto.callback" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="module-M2Crypto.ftpslib"> +<span id="ftpslib-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">ftpslib</span></tt> Module<a class="headerlink" href="#module-M2Crypto.ftpslib" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.ftpslib.FTP_TLS"> +<em class="property">class </em><tt class="descclassname">M2Crypto.ftpslib.</tt><tt class="descname">FTP_TLS</tt><big>(</big><em>host=None</em>, <em>ssl_ctx=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ftpslib.html#FTP_TLS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ftpslib.FTP_TLS" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">ftplib.FTP</span></tt></p> +<p>Python OO interface to client-side FTP/TLS.</p> +<dl class="method"> +<dt id="M2Crypto.ftpslib.FTP_TLS.auth_ssl"> +<tt class="descname">auth_ssl</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/ftpslib.html#FTP_TLS.auth_ssl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ftpslib.FTP_TLS.auth_ssl" title="Permalink to this definition">¶</a></dt> +<dd><p>Secure the control connection per AUTH SSL, aka AUTH TLS-P.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ftpslib.FTP_TLS.auth_tls"> +<tt class="descname">auth_tls</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/ftpslib.html#FTP_TLS.auth_tls"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ftpslib.FTP_TLS.auth_tls" title="Permalink to this definition">¶</a></dt> +<dd><p>Secure the control connection per AUTH TLS, aka AUTH TLS-C.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ftpslib.FTP_TLS.ntransfercmd"> +<tt class="descname">ntransfercmd</tt><big>(</big><em>cmd</em>, <em>rest=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/ftpslib.html#FTP_TLS.ntransfercmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ftpslib.FTP_TLS.ntransfercmd" title="Permalink to this definition">¶</a></dt> +<dd><p>Initiate a data transfer.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ftpslib.FTP_TLS.prot_c"> +<tt class="descname">prot_c</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/ftpslib.html#FTP_TLS.prot_c"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ftpslib.FTP_TLS.prot_c" title="Permalink to this definition">¶</a></dt> +<dd><p>Set up data connection in the clear.</p> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.ftpslib.FTP_TLS.prot_p"> +<tt class="descname">prot_p</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/ftpslib.html#FTP_TLS.prot_p"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.ftpslib.FTP_TLS.prot_p" title="Permalink to this definition">¶</a></dt> +<dd><p>Set up secure data connection.</p> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.httpslib"> +<span id="httpslib-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">httpslib</span></tt> Module<a class="headerlink" href="#module-M2Crypto.httpslib" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.httpslib.HTTPSConnection"> +<em class="property">class </em><tt class="descclassname">M2Crypto.httpslib.</tt><tt class="descname">HTTPSConnection</tt><big>(</big><em>host</em>, <em>port=None</em>, <em>strict=None</em>, <em>**ssl</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#HTTPSConnection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.HTTPSConnection" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">httplib.HTTPConnection</span></tt></p> +<p>This class allows communication via SSL using M2Crypto.</p> +<dl class="method"> +<dt id="M2Crypto.httpslib.HTTPSConnection.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#HTTPSConnection.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.HTTPSConnection.close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.httpslib.HTTPSConnection.connect"> +<tt class="descname">connect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#HTTPSConnection.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.HTTPSConnection.connect" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="attribute"> +<dt id="M2Crypto.httpslib.HTTPSConnection.default_port"> +<tt class="descname">default_port</tt><em class="property"> = 443</em><a class="headerlink" href="#M2Crypto.httpslib.HTTPSConnection.default_port" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.httpslib.HTTPSConnection.get_session"> +<tt class="descname">get_session</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#HTTPSConnection.get_session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.HTTPSConnection.get_session" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.httpslib.HTTPSConnection.set_session"> +<tt class="descname">set_session</tt><big>(</big><em>session</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#HTTPSConnection.set_session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.HTTPSConnection.set_session" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.httpslib.ProxyHTTPSConnection"> +<em class="property">class </em><tt class="descclassname">M2Crypto.httpslib.</tt><tt class="descname">ProxyHTTPSConnection</tt><big>(</big><em>host</em>, <em>port=None</em>, <em>strict=None</em>, <em>username=None</em>, <em>password=None</em>, <em>**ssl</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#ProxyHTTPSConnection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.ProxyHTTPSConnection" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <a class="reference internal" href="#M2Crypto.httpslib.HTTPSConnection" title="M2Crypto.httpslib.HTTPSConnection"><tt class="xref py py-class docutils literal"><span class="pre">M2Crypto.httpslib.HTTPSConnection</span></tt></a></p> +<p>An HTTPS Connection that uses a proxy and the CONNECT request.</p> +<p>When the connection is initiated, CONNECT is first sent to the proxy (along +with authorization headers, if supplied). If successful, an SSL connection +will be established over the socket through the proxy and to the target +host.</p> +<p>Finally, the actual request is sent over the SSL connection tunneling +through the proxy.</p> +<dl class="method"> +<dt id="M2Crypto.httpslib.ProxyHTTPSConnection.connect"> +<tt class="descname">connect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#ProxyHTTPSConnection.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.ProxyHTTPSConnection.connect" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.httpslib.ProxyHTTPSConnection.endheaders"> +<tt class="descname">endheaders</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#ProxyHTTPSConnection.endheaders"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.ProxyHTTPSConnection.endheaders" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.httpslib.ProxyHTTPSConnection.putheader"> +<tt class="descname">putheader</tt><big>(</big><em>header</em>, <em>value</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#ProxyHTTPSConnection.putheader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.ProxyHTTPSConnection.putheader" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="M2Crypto.httpslib.ProxyHTTPSConnection.putrequest"> +<tt class="descname">putrequest</tt><big>(</big><em>method</em>, <em>url</em>, <em>skip_host=0</em>, <em>skip_accept_encoding=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/httpslib.html#ProxyHTTPSConnection.putrequest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.httpslib.ProxyHTTPSConnection.putrequest" title="Permalink to this definition">¶</a></dt> +<dd><p>putrequest is called before connect, so can interpret url and get +real host/port to be used to make CONNECT request to proxy</p> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.m2"> +<span id="m2-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">m2</span></tt> Module<a class="headerlink" href="#module-M2Crypto.m2" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="module-M2Crypto.m2crypto"> +<span id="m2crypto-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">m2crypto</span></tt> Module<a class="headerlink" href="#module-M2Crypto.m2crypto" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.m2crypto.stack_st_OPENSSL_BLOCK"> +<em class="property">class </em><tt class="descclassname">M2Crypto.m2crypto.</tt><tt class="descname">stack_st_OPENSSL_BLOCK</tt><a class="headerlink" href="#M2Crypto.m2crypto.stack_st_OPENSSL_BLOCK" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">SwigPyObject</span></tt></p> +<p>::stack_st_OPENSSL_BLOCK</p> +<dl class="attribute"> +<dt id="M2Crypto.m2crypto.stack_st_OPENSSL_BLOCK.stack"> +<tt class="descname">stack</tt><a class="headerlink" href="#M2Crypto.m2crypto.stack_st_OPENSSL_BLOCK.stack" title="Permalink to this definition">¶</a></dt> +<dd><p>stack_st_OPENSSL_BLOCK.stack</p> +</dd></dl> + +<dl class="attribute"> +<dt id="M2Crypto.m2crypto.stack_st_OPENSSL_BLOCK.this"> +<tt class="descname">this</tt><a class="headerlink" href="#M2Crypto.m2crypto.stack_st_OPENSSL_BLOCK.this" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="attribute"> +<dt id="M2Crypto.m2crypto.stack_st_OPENSSL_BLOCK.thisown"> +<tt class="descname">thisown</tt><a class="headerlink" href="#M2Crypto.m2crypto.stack_st_OPENSSL_BLOCK.thisown" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="M2Crypto.m2crypto.stack_st_OPENSSL_STRING"> +<em class="property">class </em><tt class="descclassname">M2Crypto.m2crypto.</tt><tt class="descname">stack_st_OPENSSL_STRING</tt><a class="headerlink" href="#M2Crypto.m2crypto.stack_st_OPENSSL_STRING" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">SwigPyObject</span></tt></p> +<p>::stack_st_OPENSSL_STRING</p> +<dl class="attribute"> +<dt id="M2Crypto.m2crypto.stack_st_OPENSSL_STRING.stack"> +<tt class="descname">stack</tt><a class="headerlink" href="#M2Crypto.m2crypto.stack_st_OPENSSL_STRING.stack" title="Permalink to this definition">¶</a></dt> +<dd><p>stack_st_OPENSSL_STRING.stack</p> +</dd></dl> + +<dl class="attribute"> +<dt id="M2Crypto.m2crypto.stack_st_OPENSSL_STRING.this"> +<tt class="descname">this</tt><a class="headerlink" href="#M2Crypto.m2crypto.stack_st_OPENSSL_STRING.this" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="attribute"> +<dt id="M2Crypto.m2crypto.stack_st_OPENSSL_STRING.thisown"> +<tt class="descname">thisown</tt><a class="headerlink" href="#M2Crypto.m2crypto.stack_st_OPENSSL_STRING.thisown" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.m2urllib"> +<span id="m2urllib-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">m2urllib</span></tt> Module<a class="headerlink" href="#module-M2Crypto.m2urllib" title="Permalink to this headline">¶</a></h2> +<dl class="function"> +<dt id="M2Crypto.m2urllib.open_https"> +<tt class="descclassname">M2Crypto.m2urllib.</tt><tt class="descname">open_https</tt><big>(</big><em>self</em>, <em>url</em>, <em>data=None</em>, <em>ssl_context=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/m2urllib.html#open_https"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.m2urllib.open_https" title="Permalink to this definition">¶</a></dt> +<dd><p>Open URL over the SSL connection.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>url</strong> – URL to be opened</li> +<li><strong>data</strong> – data for the POST request</li> +<li><strong>ssl_context</strong> – SSL.Context to be used</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.m2urllib2"> +<span id="m2urllib2-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">m2urllib2</span></tt> Module<a class="headerlink" href="#module-M2Crypto.m2urllib2" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.m2urllib2.HTTPSHandler"> +<em class="property">class </em><tt class="descclassname">M2Crypto.m2urllib2.</tt><tt class="descname">HTTPSHandler</tt><big>(</big><em>ssl_context=None</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/m2urllib2.html#HTTPSHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.m2urllib2.HTTPSHandler" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">urllib2.AbstractHTTPHandler</span></tt></p> +<dl class="method"> +<dt id="M2Crypto.m2urllib2.HTTPSHandler.https_open"> +<tt class="descname">https_open</tt><big>(</big><em>req</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/m2urllib2.html#HTTPSHandler.https_open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.m2urllib2.HTTPSHandler.https_open" title="Permalink to this definition">¶</a></dt> +<dd><p>Return an addinfourl object for the request, using http_class.</p> +<p>http_class must implement the HTTPConnection API from httplib. +The addinfourl return value is a file-like object. It also +has methods and attributes including:</p> +<blockquote> +<div><ul class="simple"> +<li>info(): return a mimetools.Message object for the headers</li> +<li>geturl(): return the original request URL</li> +<li>code: HTTP status code</li> +</ul> +</div></blockquote> +</dd></dl> + +<dl class="method"> +<dt id="M2Crypto.m2urllib2.HTTPSHandler.https_request"> +<tt class="descname">https_request</tt><big>(</big><em>request</em><big>)</big><a class="headerlink" href="#M2Crypto.m2urllib2.HTTPSHandler.https_request" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.m2urllib2.build_opener"> +<tt class="descclassname">M2Crypto.m2urllib2.</tt><tt class="descname">build_opener</tt><big>(</big><em>ssl_context=None</em>, <em>*handlers</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/m2urllib2.html#build_opener"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.m2urllib2.build_opener" title="Permalink to this definition">¶</a></dt> +<dd><p>Create an opener object from a list of handlers.</p> +<p>The opener will use several default handlers, including support +for HTTP and FTP.</p> +<p>If any of the handlers passed as arguments are subclasses of the +default handlers, the default handlers will not be used.</p> +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.m2xmlrpclib"> +<span id="m2xmlrpclib-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">m2xmlrpclib</span></tt> Module<a class="headerlink" href="#module-M2Crypto.m2xmlrpclib" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="M2Crypto.m2xmlrpclib.SSL_Transport"> +<em class="property">class </em><tt class="descclassname">M2Crypto.m2xmlrpclib.</tt><tt class="descname">SSL_Transport</tt><big>(</big><em>ssl_context=None</em>, <em>*args</em>, <em>**kw</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/m2xmlrpclib.html#SSL_Transport"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.m2xmlrpclib.SSL_Transport" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">xmlrpclib.Transport</span></tt></p> +<dl class="method"> +<dt id="M2Crypto.m2xmlrpclib.SSL_Transport.request"> +<tt class="descname">request</tt><big>(</big><em>host</em>, <em>handler</em>, <em>request_body</em>, <em>verbose=0</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/m2xmlrpclib.html#SSL_Transport.request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.m2xmlrpclib.SSL_Transport.request" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="attribute"> +<dt id="M2Crypto.m2xmlrpclib.SSL_Transport.user_agent"> +<tt class="descname">user_agent</tt><em class="property"> = 'M2Crypto_XMLRPC/0.26.0 - xmlrpclib.py/1.0.1 (by www.pythonware.com)'</em><a class="headerlink" href="#M2Crypto.m2xmlrpclib.SSL_Transport.user_agent" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.threading"> +<span id="threading-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">threading</span></tt> Module<a class="headerlink" href="#module-M2Crypto.threading" title="Permalink to this headline">¶</a></h2> +<dl class="function"> +<dt id="M2Crypto.threading.cleanup"> +<tt class="descclassname">M2Crypto.threading.</tt><tt class="descname">cleanup</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/threading.html#cleanup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.threading.cleanup" title="Permalink to this definition">¶</a></dt> +<dd><p>End and cleanup threading support.</p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.threading.init"> +<tt class="descclassname">M2Crypto.threading.</tt><tt class="descname">init</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/M2Crypto/threading.html#init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.threading.init" title="Permalink to this definition">¶</a></dt> +<dd><p>Initialize threading support.</p> +</dd></dl> + +</div> +<div class="section" id="module-M2Crypto.util"> +<span id="util-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">util</span></tt> Module<a class="headerlink" href="#module-M2Crypto.util" title="Permalink to this headline">¶</a></h2> +<dl class="exception"> +<dt id="M2Crypto.util.UtilError"> +<em class="property">exception </em><tt class="descclassname">M2Crypto.util.</tt><tt class="descname">UtilError</tt><a class="reference internal" href="_modules/M2Crypto/util.html#UtilError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.UtilError" title="Permalink to this definition">¶</a></dt> +<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p> +</dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.bin_to_hex"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">bin_to_hex</tt><big>(</big><em>b</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#bin_to_hex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.bin_to_hex" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.genparam_callback"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">genparam_callback</tt><big>(</big><em>p</em>, <em>n</em>, <em>out=<open file '<stdout>'</em>, <em>mode 'w' at 0x7fc7ebc63150></em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#genparam_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.genparam_callback" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.no_passphrase_callback"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">no_passphrase_callback</tt><big>(</big><em>*args</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#no_passphrase_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.no_passphrase_callback" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.octx_to_num"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">octx_to_num</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#octx_to_num"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.octx_to_num" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.passphrase_callback"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">passphrase_callback</tt><big>(</big><em>v</em>, <em>prompt1='Enter passphrase:'</em>, <em>prompt2='Verify passphrase:'</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#passphrase_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.passphrase_callback" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.pkcs5_pad"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">pkcs5_pad</tt><big>(</big><em>data</em>, <em>blklen=8</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#pkcs5_pad"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.pkcs5_pad" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.pkcs7_pad"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">pkcs7_pad</tt><big>(</big><em>data</em>, <em>blklen</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#pkcs7_pad"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.pkcs7_pad" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.py3bytes"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">py3bytes</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#py3bytes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.py3bytes" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.py3str"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">py3str</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#py3str"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.py3str" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="M2Crypto.util.quiet_genparam_callback"> +<tt class="descclassname">M2Crypto.util.</tt><tt class="descname">quiet_genparam_callback</tt><big>(</big><em>p</em>, <em>n</em>, <em>out</em><big>)</big><a class="reference internal" href="_modules/M2Crypto/util.html#quiet_genparam_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.util.quiet_genparam_callback" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="subpackages"> +<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="M2Crypto.PGP.html">PGP Package</a><ul> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.PGP.html#id1"><tt class="docutils literal"><span class="pre">PGP</span></tt> Package</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.PGP.html#module-M2Crypto.PGP.PublicKey"><tt class="docutils literal"><span class="pre">PublicKey</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.PGP.html#module-M2Crypto.PGP.PublicKeyRing"><tt class="docutils literal"><span class="pre">PublicKeyRing</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.PGP.html#module-M2Crypto.PGP.RSA"><tt class="docutils literal"><span class="pre">RSA</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.PGP.html#module-M2Crypto.PGP.constants"><tt class="docutils literal"><span class="pre">constants</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.PGP.html#module-M2Crypto.PGP.packet"><tt class="docutils literal"><span class="pre">packet</span></tt> Module</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="M2Crypto.SSL.html">SSL Package</a><ul> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#id1"><tt class="docutils literal"><span class="pre">SSL</span></tt> Package</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.Checker"><tt class="docutils literal"><span class="pre">Checker</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.Cipher"><tt class="docutils literal"><span class="pre">Cipher</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.Connection"><tt class="docutils literal"><span class="pre">Connection</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.Context"><tt class="docutils literal"><span class="pre">Context</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.SSLServer"><tt class="docutils literal"><span class="pre">SSLServer</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.Session"><tt class="docutils literal"><span class="pre">Session</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.TwistedProtocolWrapper"><tt class="docutils literal"><span class="pre">TwistedProtocolWrapper</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.cb"><tt class="docutils literal"><span class="pre">cb</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.ssl_dispatcher"><tt class="docutils literal"><span class="pre">ssl_dispatcher</span></tt> Module</a></li> +<li class="toctree-l2"><a class="reference internal" href="M2Crypto.SSL.html#module-M2Crypto.SSL.timeout"><tt class="docutils literal"><span class="pre">timeout</span></tt> Module</a></li> +</ul> +</li> +</ul> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">M2Crypto Package</a><ul> +<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">M2Crypto</span></tt> Package</a></li> +<li><a class="reference internal" href="#module-M2Crypto.ASN1"><tt class="docutils literal"><span class="pre">ASN1</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.AuthCookie"><tt class="docutils literal"><span class="pre">AuthCookie</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.BIO"><tt class="docutils literal"><span class="pre">BIO</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.BN"><tt class="docutils literal"><span class="pre">BN</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.DH"><tt class="docutils literal"><span class="pre">DH</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.DSA"><tt class="docutils literal"><span class="pre">DSA</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.EC"><tt class="docutils literal"><span class="pre">EC</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.EVP"><tt class="docutils literal"><span class="pre">EVP</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.Engine"><tt class="docutils literal"><span class="pre">Engine</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.Err"><tt class="docutils literal"><span class="pre">Err</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.RC4"><tt class="docutils literal"><span class="pre">RC4</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.RSA"><tt class="docutils literal"><span class="pre">RSA</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.Rand"><tt class="docutils literal"><span class="pre">Rand</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.SMIME"><tt class="docutils literal"><span class="pre">SMIME</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.X509"><tt class="docutils literal"><span class="pre">X509</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.callback"><tt class="docutils literal"><span class="pre">callback</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.ftpslib"><tt class="docutils literal"><span class="pre">ftpslib</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.httpslib"><tt class="docutils literal"><span class="pre">httpslib</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.m2"><tt class="docutils literal"><span class="pre">m2</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.m2crypto"><tt class="docutils literal"><span class="pre">m2crypto</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.m2urllib"><tt class="docutils literal"><span class="pre">m2urllib</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.m2urllib2"><tt class="docutils literal"><span class="pre">m2urllib2</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.m2xmlrpclib"><tt class="docutils literal"><span class="pre">m2xmlrpclib</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.threading"><tt class="docutils literal"><span class="pre">threading</span></tt> Module</a></li> +<li><a class="reference internal" href="#module-M2Crypto.util"><tt class="docutils literal"><span class="pre">util</span></tt> Module</a></li> +<li><a class="reference internal" href="#subpackages">Subpackages</a><ul> +</ul> +</li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="index.html" + title="previous chapter">Welcome to M2Crypto’s documentation!</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="M2Crypto.PGP.html" + title="next chapter">PGP Package</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/M2Crypto.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="py-modindex.html" title="Python Module Index" + >modules</a> |</li> + <li class="right" > + <a href="M2Crypto.PGP.html" title="PGP Package" + >next</a> |</li> + <li class="right" > + <a href="index.html" title="Welcome to M2Crypto’s documentation!" + >previous</a> |</li> + <li><a href="index.html">M2Crypto documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2017, Matej Cepl <mcepl@cepl.eu>. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. + </div> + </body> +</html>
\ No newline at end of file |
