diff options
Diffstat (limited to 'doc/html/ZServerSSL-HOWTO.html')
-rw-r--r-- | doc/html/ZServerSSL-HOWTO.html | 203 |
1 files changed, 96 insertions, 107 deletions
diff --git a/doc/html/ZServerSSL-HOWTO.html b/doc/html/ZServerSSL-HOWTO.html index 67023d0..41238ea 100644 --- a/doc/html/ZServerSSL-HOWTO.html +++ b/doc/html/ZServerSSL-HOWTO.html @@ -1,19 +1,18 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml"> +<html> <head> - <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>1. ZServerSSL-HOWTO — M2Crypto documentation</title> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>1. ZServerSSL-HOWTO — M2Crypto documentation</title> <link rel="stylesheet" href="_static/alabaster.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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> - <script type="text/javascript" src="_static/language_data.js"></script> + <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> + <script src="_static/jquery.js"></script> + <script src="_static/underscore.js"></script> + <script src="_static/doctools.js"></script> + <script src="_static/language_data.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> @@ -33,44 +32,44 @@ <div class="body" role="main"> <div class="section" id="zserverssl-howto"> -<span id="id1"></span><h1><a class="toc-backref" href="#id3">1. ZServerSSL-HOWTO</a><a class="headerlink" href="#zserverssl-howto" title="Permalink to this headline">¶</a></h1> -<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">author:</th><td class="field-body">Pheng Siong Ng <<a class="reference external" href="mailto:ngps%40post1.com">ngps<span>@</span>post1<span>.</span>com</a>></td> -</tr> -<tr class="field-even field"><th class="field-name">copyright:</th><td class="field-body">© 2000, 2001 by Ng Pheng Siong.</td> -</tr> -<tr class="field-odd field"><th class="field-name">date:</th><td class="field-body">2003-06-22</td> -</tr> -</tbody> -</table> +<span id="id1"></span><h1><a class="toc-backref" href="#id3"><span class="sectnum">1.</span> ZServerSSL-HOWTO</a><a class="headerlink" href="#zserverssl-howto" title="Permalink to this headline">¶</a></h1> +<dl class="field-list simple"> +<dt class="field-odd">author</dt> +<dd class="field-odd"><p>Pheng Siong Ng <<a class="reference external" href="mailto:ngps%40post1.com">ngps<span>@</span>post1<span>.</span>com</a>></p> +</dd> +<dt class="field-even">copyright</dt> +<dd class="field-even"><p>© 2000, 2001 by Ng Pheng Siong.</p> +</dd> +<dt class="field-odd">date</dt> +<dd class="field-odd"><p>2003-06-22</p> +</dd> +</dl> <div class="contents topic" id="contents"> -<p class="topic-title first">Contents</p> +<p class="topic-title">Contents</p> <ul class="auto-toc simple"> -<li><a class="reference internal" href="#zserverssl-howto" id="id3">1. ZServerSSL-HOWTO</a><ul class="auto-toc"> -<li><a class="reference internal" href="#introduction" id="id4">1.1. Introduction</a></li> -<li><a class="reference internal" href="#preparation" id="id5">1.2. Preparation</a></li> -<li><a class="reference internal" href="#installation" id="id6">1.3. Installation</a></li> -<li><a class="reference internal" href="#testing" id="id7">1.4. Testing</a></li> -<li><a class="reference internal" href="#https" id="id8">1.5. HTTPS</a></li> -<li><a class="reference internal" href="#webdav-over-https" id="id9">1.6. WebDAV-over-HTTPS</a></li> -<li><a class="reference internal" href="#webdav-source-over-https" id="id10">1.7. WebDAV-Source-over-HTTPS</a></li> -<li><a class="reference internal" href="#python-with-m2crypto" id="id11">1.8. Python with M2Crypto</a></li> -<li><a class="reference internal" href="#id2" id="id12">1.9. HTTPS</a></li> -<li><a class="reference internal" href="#xmlrpc-over-https" id="id13">1.10. XMLRPC-over-HTTPS</a></li> -<li><a class="reference internal" href="#conclusion" id="id14">1.11. Conclusion</a></li> +<li><p><a class="reference internal" href="#zserverssl-howto" id="id3"><span class="sectnum">1.</span> ZServerSSL-HOWTO</a></p> +<ul class="auto-toc"> +<li><p><a class="reference internal" href="#introduction" id="id4"><span class="sectnum">1.1.</span> Introduction</a></p></li> +<li><p><a class="reference internal" href="#preparation" id="id5"><span class="sectnum">1.2.</span> Preparation</a></p></li> +<li><p><a class="reference internal" href="#installation" id="id6"><span class="sectnum">1.3.</span> Installation</a></p></li> +<li><p><a class="reference internal" href="#testing" id="id7"><span class="sectnum">1.4.</span> Testing</a></p></li> +<li><p><a class="reference internal" href="#https" id="id8"><span class="sectnum">1.5.</span> HTTPS</a></p></li> +<li><p><a class="reference internal" href="#webdav-over-https" id="id9"><span class="sectnum">1.6.</span> WebDAV-over-HTTPS</a></p></li> +<li><p><a class="reference internal" href="#webdav-source-over-https" id="id10"><span class="sectnum">1.7.</span> WebDAV-Source-over-HTTPS</a></p></li> +<li><p><a class="reference internal" href="#python-with-m2crypto" id="id11"><span class="sectnum">1.8.</span> Python with M2Crypto</a></p></li> +<li><p><a class="reference internal" href="#id2" id="id12"><span class="sectnum">1.9.</span> HTTPS</a></p></li> +<li><p><a class="reference internal" href="#xmlrpc-over-https" id="id13"><span class="sectnum">1.10.</span> XMLRPC-over-HTTPS</a></p></li> +<li><p><a class="reference internal" href="#conclusion" id="id14"><span class="sectnum">1.11.</span> Conclusion</a></p></li> </ul> </li> </ul> </div> <div class="section" id="introduction"> -<h2><a class="toc-backref" href="#id4">1.1. Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2> +<h2><a class="toc-backref" href="#id4"><span class="sectnum">1.1.</span> Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2> <p>ZServerSSL adds to Zope’s ZServer the following:</p> <ul class="simple"> -<li>HTTPS server</li> -<li>WebDAV-source-over-HTTPS server</li> +<li><p>HTTPS server</p></li> +<li><p>WebDAV-source-over-HTTPS server</p></li> </ul> <p>With the HTTPS server, ZServerSSL also provides WebDAV-over-HTTPS and XMLRPC-over-HTTPS access to Zope.</p> @@ -79,100 +78,92 @@ XMLRPC-over-HTTPS access to Zope.</p> in Un*x fashion.</p> </div> <div class="section" id="preparation"> -<h2><a class="toc-backref" href="#id5">1.2. Preparation</a><a class="headerlink" href="#preparation" title="Permalink to this headline">¶</a></h2> +<h2><a class="toc-backref" href="#id5"><span class="sectnum">1.2.</span> Preparation</a><a class="headerlink" href="#preparation" title="Permalink to this headline">¶</a></h2> <ol class="arabic simple"> -<li>Download M2Crypto 0.11, contained in the file <code class="docutils literal notranslate"><span class="pre">m2crypto-0.11.zip</span></code>.</li> -<li>Unpack <code class="docutils literal notranslate"><span class="pre">m2crypto-0.11.zip</span></code>. This will create a directory -<code class="docutils literal notranslate"><span class="pre">m2crypto-0.11</span></code>. Henceforth, we refer to this directory as <code class="docutils literal notranslate"><span class="pre">$M2</span></code>.</li> -<li>Install M2Crypto per the instructions in <code class="docutils literal notranslate"><span class="pre">$M2/INSTALL</span></code>.</li> +<li><p>Download M2Crypto 0.11, contained in the file <code class="docutils literal notranslate"><span class="pre">m2crypto-0.11.zip</span></code>.</p></li> +<li><p>Unpack <code class="docutils literal notranslate"><span class="pre">m2crypto-0.11.zip</span></code>. This will create a directory +<code class="docutils literal notranslate"><span class="pre">m2crypto-0.11</span></code>. Henceforth, we refer to this directory as <code class="docutils literal notranslate"><span class="pre">$M2</span></code>.</p></li> +<li><p>Install M2Crypto per the instructions in <code class="docutils literal notranslate"><span class="pre">$M2/INSTALL</span></code>.</p></li> </ol> <p>The ZServerSSL distribution is in <code class="docutils literal notranslate"><span class="pre">$M2/demo/Zope</span></code>. We shall refer to this directory as <code class="docutils literal notranslate"><span class="pre">$ZSSL</span></code>.</p> </div> <div class="section" id="installation"> -<h2><a class="toc-backref" href="#id6">1.3. Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2> +<h2><a class="toc-backref" href="#id6"><span class="sectnum">1.3.</span> Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2> <p>Below, we refer to your Zope top-level directory as <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>.</p> <ol class="arabic"> -<li><p class="first">Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/z2s.py</span></code> into <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>.</p> -</li> -<li><p class="first">Depending on your operating system, modify <code class="docutils literal notranslate"><span class="pre">$ZOPE/start</span></code> or +<li><p>Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/z2s.py</span></code> into <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>.</p></li> +<li><p>Depending on your operating system, modify <code class="docutils literal notranslate"><span class="pre">$ZOPE/start</span></code> or <code class="docutils literal notranslate"><span class="pre">$ZOPE/start.bat</span></code> to invoke <code class="docutils literal notranslate"><span class="pre">$ZOPE/z2s.py</span></code>, instead of <code class="docutils literal notranslate"><span class="pre">$ZOPE/z2.py</span></code>. The files <code class="docutils literal notranslate"><span class="pre">$ZSSL/starts</span></code> and <code class="docutils literal notranslate"><span class="pre">$ZSSL/starts.bat</span></code> -serve as examples.</p> -</li> -<li><p class="first">Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/dh1024.pem</span></code> into <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>. This file contains -Diffie-Hellman parameters for use by the SSL protocol.</p> -</li> -<li><p class="first">Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/randpool.dat</span></code> into <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>. This file contains seed +serve as examples.</p></li> +<li><p>Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/dh1024.pem</span></code> into <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>. This file contains +Diffie-Hellman parameters for use by the SSL protocol.</p></li> +<li><p>Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/randpool.dat</span></code> into <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>. This file contains seed material for the OpenSSL PRNG. Alternatively, create <code class="docutils literal notranslate"><span class="pre">$ZOPE/randpool.dat</span></code> thusly:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ dd if=/dev/urandom of=randpool.dat bs=1024 count=1 </pre></div> </div> </li> -<li><p class="first">Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/ca.pem</span></code> to <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>. This file contains an +<li><p>Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/ca.pem</span></code> to <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>. This file contains an example Certification Authority (CA) certificate. For information on operating your own CA, see <a class="reference internal" href="howto.ca.html#howto-ca"><span class="std std-ref">HOWTO: Creating your own CA with OpenSSL</span></a> or -one of numerous similar documents available on the web.</p> -</li> -<li><p class="first">Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/server.pem</span></code> to <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>. This file contains an RSA key +one of numerous similar documents available on the web.</p></li> +<li><p>Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/server.pem</span></code> to <code class="docutils literal notranslate"><span class="pre">$ZOPE</span></code>. This file contains an RSA key pair and its X.509v3 certificate issued by the above CA. You may also -create your own key/certificate bundle.</p> -</li> -<li><p class="first">Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/ZServer/HTTPS_Server.py</span></code> to <code class="docutils literal notranslate"><span class="pre">$ZOPE/ZServer</span></code>.</p> -</li> -<li><p class="first">Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/ZServer/__init__.py</span></code> to <code class="docutils literal notranslate"><span class="pre">$ZOPE/ZServer</span></code>. This +create your own key/certificate bundle.</p></li> +<li><p>Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/ZServer/HTTPS_Server.py</span></code> to <code class="docutils literal notranslate"><span class="pre">$ZOPE/ZServer</span></code>.</p></li> +<li><p>Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/ZServer/__init__.py</span></code> to <code class="docutils literal notranslate"><span class="pre">$ZOPE/ZServer</span></code>. This overwrites the existing <code class="docutils literal notranslate"><span class="pre">$ZOPE/ZServer/__init__.py</span></code>. Alternatively, apply the following patch to <code class="docutils literal notranslate"><span class="pre">$ZOPE/ZServer/__init__.py</span></code>:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">---</span> <span class="fm">__init__</span><span class="o">.</span><span class="n">py</span><span class="o">.</span><span class="n">org</span> <span class="n">Sat</span> <span class="n">Jun</span> <span class="mi">21</span> <span class="mi">23</span><span class="p">:</span><span class="mi">20</span><span class="p">:</span><span class="mi">41</span> <span class="mi">2003</span> <span class="o">+++</span> <span class="fm">__init__</span><span class="o">.</span><span class="n">py</span> <span class="n">Tue</span> <span class="n">Jan</span> <span class="mi">7</span> <span class="mi">23</span><span class="p">:</span><span class="mi">30</span><span class="p">:</span><span class="mi">53</span> <span class="mi">2003</span> <span class="o">@@</span> <span class="o">-</span><span class="mi">84</span><span class="p">,</span><span class="mi">6</span> <span class="o">+</span><span class="mi">84</span><span class="p">,</span><span class="mi">7</span> <span class="o">@@</span> <span class="kn">import</span> <span class="nn">asyncore</span> - <span class="kn">from</span> <span class="nn">medusa</span> <span class="k">import</span> <span class="n">resolver</span><span class="p">,</span> <span class="n">logger</span> - <span class="kn">from</span> <span class="nn">HTTPServer</span> <span class="k">import</span> <span class="n">zhttp_server</span><span class="p">,</span> <span class="n">zhttp_handler</span> -<span class="o">+</span><span class="kn">from</span> <span class="nn">HTTPS_Server</span> <span class="k">import</span> <span class="n">zhttps_server</span><span class="p">,</span> <span class="n">zhttps_handler</span> - <span class="kn">from</span> <span class="nn">PCGIServer</span> <span class="k">import</span> <span class="n">PCGIServer</span> - <span class="kn">from</span> <span class="nn">FCGIServer</span> <span class="k">import</span> <span class="n">FCGIServer</span> - <span class="kn">from</span> <span class="nn">FTPServer</span> <span class="k">import</span> <span class="n">FTPServer</span> + <span class="kn">from</span> <span class="nn">medusa</span> <span class="kn">import</span> <span class="n">resolver</span><span class="p">,</span> <span class="n">logger</span> + <span class="kn">from</span> <span class="nn">HTTPServer</span> <span class="kn">import</span> <span class="n">zhttp_server</span><span class="p">,</span> <span class="n">zhttp_handler</span> +<span class="o">+</span><span class="kn">from</span> <span class="nn">HTTPS_Server</span> <span class="kn">import</span> <span class="n">zhttps_server</span><span class="p">,</span> <span class="n">zhttps_handler</span> + <span class="kn">from</span> <span class="nn">PCGIServer</span> <span class="kn">import</span> <span class="n">PCGIServer</span> + <span class="kn">from</span> <span class="nn">FCGIServer</span> <span class="kn">import</span> <span class="n">FCGIServer</span> + <span class="kn">from</span> <span class="nn">FTPServer</span> <span class="kn">import</span> <span class="n">FTPServer</span> </pre></div> </div> </li> -<li><p class="first">Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/ZServer/medusa/https_server.py</span></code> to -<code class="docutils literal notranslate"><span class="pre">$ZOPE/ZServer/medusa</span></code>.</p> -</li> -<li><p class="first">Stop Zope, if it is running.</p> -</li> -<li><p class="first">Start Zope with ZServerSSL thusly:</p> +<li><p>Copy <code class="docutils literal notranslate"><span class="pre">$ZSSL/ZServer/medusa/https_server.py</span></code> to +<code class="docutils literal notranslate"><span class="pre">$ZOPE/ZServer/medusa</span></code>.</p></li> +<li><p>Stop Zope, if it is running.</p></li> +<li><p>Start Zope with ZServerSSL thusly:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">starts</span> <span class="o">-</span><span class="n">X</span> <span class="o">-</span><span class="n">f</span> <span class="mi">9021</span> <span class="o">-</span><span class="n">w</span> <span class="mi">9080</span> <span class="o">-</span><span class="n">W</span> <span class="mi">9081</span> <span class="o">-</span><span class="n">y</span> <span class="mi">9443</span> <span class="o">-</span><span class="n">Y</span> <span class="mi">9444</span> </pre></div> </div> <p>This starts the following:</p> <ul class="simple"> -<li>an FTP server on port 9021</li> -<li>a HTTP server on port 9080</li> -<li>a WebDAV-source server on port 9081</li> -<li>a HTTPS server on port 9443</li> -<li>a WebDAV-source-over-HTTPS server on port 9444</li> +<li><p>an FTP server on port 9021</p></li> +<li><p>a HTTP server on port 9080</p></li> +<li><p>a WebDAV-source server on port 9081</p></li> +<li><p>a HTTPS server on port 9443</p></li> +<li><p>a WebDAV-source-over-HTTPS server on port 9444</p></li> </ul> </li> </ol> </div> <div class="section" id="testing"> -<h2><a class="toc-backref" href="#id7">1.4. Testing</a><a class="headerlink" href="#testing" title="Permalink to this headline">¶</a></h2> +<h2><a class="toc-backref" href="#id7"><span class="sectnum">1.4.</span> Testing</a><a class="headerlink" href="#testing" title="Permalink to this headline">¶</a></h2> <p>Below, we assume your Zope server is running on <code class="docutils literal notranslate"><span class="pre">localhost</span></code>.</p> </div> <div class="section" id="https"> -<h2><a class="toc-backref" href="#id8">1.5. HTTPS</a><a class="headerlink" href="#https" title="Permalink to this headline">¶</a></h2> +<h2><a class="toc-backref" href="#id8"><span class="sectnum">1.5.</span> HTTPS</a><a class="headerlink" href="#https" title="Permalink to this headline">¶</a></h2> <p>This testing is done with Mozilla 1.1 on FreeBSD.</p> <ol class="arabic simple"> -<li>With a browser, connect to <a class="reference external" href="https://localhost:9443/">https://localhost:9443/</a>. Browse around. -Check out your browser’s HTTPS informational screens.</li> -<li>Connect to <a class="reference external" href="https://localhost:9443/manage">https://localhost:9443/manage</a>. Verify that you can access -Zope’s management functionality.</li> +<li><p>With a browser, connect to <a class="reference external" href="https://localhost:9443/">https://localhost:9443/</a>. Browse around. +Check out your browser’s HTTPS informational screens.</p></li> +<li><p>Connect to <a class="reference external" href="https://localhost:9443/manage">https://localhost:9443/manage</a>. Verify that you can access +Zope’s management functionality.</p></li> </ol> </div> <div class="section" id="webdav-over-https"> -<h2><a class="toc-backref" href="#id9">1.6. WebDAV-over-HTTPS</a><a class="headerlink" href="#webdav-over-https" title="Permalink to this headline">¶</a></h2> +<h2><a class="toc-backref" href="#id9"><span class="sectnum">1.6.</span> WebDAV-over-HTTPS</a><a class="headerlink" href="#webdav-over-https" title="Permalink to this headline">¶</a></h2> <p>This testing is done with Cadaver 0.21.0 on FreeBSD.:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cadaver https://localhost:9443/ WARNING: Untrusted server certificate presented: @@ -209,24 +200,24 @@ $ </div> </div> <div class="section" id="webdav-source-over-https"> -<h2><a class="toc-backref" href="#id10">1.7. WebDAV-Source-over-HTTPS</a><a class="headerlink" href="#webdav-source-over-https" title="Permalink to this headline">¶</a></h2> +<h2><a class="toc-backref" href="#id10"><span class="sectnum">1.7.</span> WebDAV-Source-over-HTTPS</a><a class="headerlink" href="#webdav-source-over-https" title="Permalink to this headline">¶</a></h2> <p>This testing is done with Mozilla 1.1 on FreeBSD.</p> <ol class="arabic simple"> -<li>Open the Mozilla Composer window.</li> -<li>Click “File”, “Open Web Location”. A dialog box appears.</li> -<li>Enter <code class="docutils literal notranslate"><span class="pre">https://localhost:9444/index_html</span></code> for the URL.</li> -<li>Select “Open in new Composer window.”</li> -<li>Click “Open”. A new Composer window will open with <code class="docutils literal notranslate"><span class="pre">index_html</span></code> -loaded.</li> +<li><p>Open the Mozilla Composer window.</p></li> +<li><p>Click “File”, “Open Web Location”. A dialog box appears.</p></li> +<li><p>Enter <code class="docutils literal notranslate"><span class="pre">https://localhost:9444/index_html</span></code> for the URL.</p></li> +<li><p>Select “Open in new Composer window.”</p></li> +<li><p>Click “Open”. A new Composer window will open with <code class="docutils literal notranslate"><span class="pre">index_html</span></code> +loaded.</p></li> </ol> </div> <div class="section" id="python-with-m2crypto"> -<h2><a class="toc-backref" href="#id11">1.8. Python with M2Crypto</a><a class="headerlink" href="#python-with-m2crypto" title="Permalink to this headline">¶</a></h2> +<h2><a class="toc-backref" href="#id11"><span class="sectnum">1.8.</span> Python with M2Crypto</a><a class="headerlink" href="#python-with-m2crypto" title="Permalink to this headline">¶</a></h2> <p>This testing is done with M2Crypto 0.11 and Python 2.2.2 on FreeBSD.</p> </div> <div class="section" id="id2"> -<h2><a class="toc-backref" href="#id12">1.9. HTTPS</a><a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2> -<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">M2Crypto</span> <span class="k">import</span> <span class="n">Rand</span><span class="p">,</span> <span class="n">SSL</span><span class="p">,</span> <span class="n">m2urllib</span> +<h2><a class="toc-backref" href="#id12"><span class="sectnum">1.9.</span> HTTPS</a><a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">M2Crypto</span> <span class="kn">import</span> <span class="n">Rand</span><span class="p">,</span> <span class="n">SSL</span><span class="p">,</span> <span class="n">m2urllib</span> <span class="gp">>>> </span><span class="n">url</span> <span class="o">=</span> <span class="n">m2urllib</span><span class="o">.</span><span class="n">FancyURLopener</span><span class="p">()</span> <span class="gp">>>> </span><span class="n">url</span><span class="o">.</span><span class="n">addheader</span><span class="p">(</span><span class="s1">'Connection'</span><span class="p">,</span> <span class="s1">'close'</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">u</span> <span class="o">=</span> <span class="n">url</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">'https://127.0.0.1:9443/'</span><span class="p">)</span> @@ -269,8 +260,8 @@ loaded.</li> </div> </div> <div class="section" id="xmlrpc-over-https"> -<h2><a class="toc-backref" href="#id13">1.10. XMLRPC-over-HTTPS</a><a class="headerlink" href="#xmlrpc-over-https" title="Permalink to this headline">¶</a></h2> -<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">M2Crypto.m2xmlrpclib</span> <span class="k">import</span> <span class="n">Server</span><span class="p">,</span> <span class="n">SSL_Transport</span> +<h2><a class="toc-backref" href="#id13"><span class="sectnum">1.10.</span> XMLRPC-over-HTTPS</a><a class="headerlink" href="#xmlrpc-over-https" title="Permalink to this headline">¶</a></h2> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">M2Crypto.m2xmlrpclib</span> <span class="kn">import</span> <span class="n">Server</span><span class="p">,</span> <span class="n">SSL_Transport</span> <span class="gp">>>> </span><span class="n">zs</span> <span class="o">=</span> <span class="n">Server</span><span class="p">(</span><span class="s1">'https://127.0.0.1:9443/'</span><span class="p">,</span> <span class="n">SSL_Transport</span><span class="p">())</span> <span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">zs</span><span class="o">.</span><span class="n">propertyMap</span><span class="p">())</span> <span class="go">[{'type': 'string', 'id': 'title', 'mode': 'w'}]</span> @@ -279,7 +270,7 @@ loaded.</li> </div> </div> <div class="section" id="conclusion"> -<h2><a class="toc-backref" href="#id14">1.11. Conclusion</a><a class="headerlink" href="#conclusion" title="Permalink to this headline">¶</a></h2> +<h2><a class="toc-backref" href="#id14"><span class="sectnum">1.11.</span> Conclusion</a><a class="headerlink" href="#conclusion" title="Permalink to this headline">¶</a></h2> <p>Well, it works! ;-)</p> </div> </div> @@ -313,17 +304,15 @@ loaded.</li> </ul> </div> <div id="searchbox" style="display: none" role="search"> - <h3>Quick search</h3> + <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="search.html" method="get"> - <input type="text" name="q" /> + <input type="text" name="q" aria-labelledby="searchlabel" /> <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> </form> </div> </div> -<script type="text/javascript">$('#searchbox').show(0);</script> +<script>$('#searchbox').show(0);</script> @@ -340,7 +329,7 @@ loaded.</li> ©2017, Matej Cepl <mcepl@cepl.eu>. | - Powered by <a href="http://sphinx-doc.org/">Sphinx 1.8.5</a> + Powered by <a href="http://sphinx-doc.org/">Sphinx 3.2.1</a> & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a> | |