Ignore:
Timestamp:
29/09/08 16:05:29 (11 years ago)
Author:
pjkersha
Message:

Working unit tests for WSGI based Attribute Authority.

  • Altered so that all Attribute Config is picked up from the Paste ini file. Separate cfg or xml based config file is still supported.

TODO:

  • Simplify unit test config for client.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/documentation/epydoc/ndg.security.common.m2CryptoSSLUtility.HostCheck-class.html

    r3153 r4245  
    6060</table> 
    6161<!-- ==================== CLASS DESCRIPTION ==================== --> 
    62 <h1 class="epydoc">Class HostCheck</h1><span class="codelink"><a href="ndg.security.common.m2CryptoSSLUtility-pysrc.html#HostCheck">source&nbsp;code</a></span><br /><br /> 
     62<h1 class="epydoc">Class HostCheck</h1><p class="nomargin-top"><span class="codelink"><a href="ndg.security.common.m2CryptoSSLUtility-pysrc.html#HostCheck">source&nbsp;code</a></span></p> 
    6363<center> 
    64 <center>  <map id="uml_class_diagram_for_ndg_secu_113" name="uml_class_diagram_for_ndg_secu_113"> 
    65 <area shape="rect" href="javascript: void(0);" title="M2Crypto.SSL.Checker.Checker" alt="" coords="15,11,67,27"/> 
    66 <area shape="rect" href="ndg.security.common.m2CryptoSSLUtility.HostCheck&#45;class.html" title="Override SSL.Checker.Checker to enable alternate Common Name setting match for peer cert" alt="" coords="15,56,67,72"/> 
     64<center>  <map id="uml_class_diagram_for_ndg_secu_147" name="uml_class_diagram_for_ndg_secu_147"> 
     65<area shape="rect" href="javascript:void(0);" title="M2Crypto.SSL.Checker.Checker.numericIpMatch" alt="" coords="255,28,449,47"/> 
     66<area shape="rect" href="javascript:void(0);" title="M2Crypto.SSL.Checker.Checker" alt="" coords="253,11,451,56"/> 
     67<area shape="rect" href="ndg.security.common.m2CryptoSSLUtility.HostCheck&#45;class.html#caCertList" title="ndg.security.common.m2CryptoSSLUtility.HostCheck.caCertList" alt="" coords="17,103,687,121"/> 
     68<area shape="rect" href="ndg.security.common.m2CryptoSSLUtility.HostCheck&#45;class.html#caCertFilePathList" title="ndg.security.common.m2CryptoSSLUtility.HostCheck.caCertFilePathList" alt="" coords="17,121,687,140"/> 
     69<area shape="rect" href="ndg.security.common.m2CryptoSSLUtility.HostCheck&#45;class.html#__init__" title="Override parent class __init__ to enable setting of myProxyServerDN setting" alt="" coords="17,143,687,161"/> 
     70<area shape="rect" href="ndg.security.common.m2CryptoSSLUtility.HostCheck&#45;class.html#__call__" title="Carry out checks on server ID" alt="" coords="17,161,687,180"/> 
     71<area shape="rect" href="ndg.security.common.m2CryptoSSLUtility.HostCheck&#45;class.html" title="Override SSL.Checker.Checker to enable alternate Common Name setting match for peer cert" alt="" coords="16,85,688,181"/> 
    6772</map> 
    68   <img src="uml_class_diagram_for_ndg_secu_113.gif" alt='' usemap="#uml_class_diagram_for_ndg_secu_113" ismap="ismap" class="graph-without-title" /> 
    69 </center></center> 
     73  <img src="uml_class_diagram_for_ndg_secu_147.gif" alt='' usemap="#uml_class_diagram_for_ndg_secu_147" ismap="ismap" class="graph-without-title" /> 
     74</center> 
     75</center> 
    7076<hr /> 
    71 Override SSL.Checker.Checker to enable alternate Common Name setting  
    72   match for peer cert<br /><br /> 
     77<p>Override SSL.Checker.Checker to enable alternate Common Name setting  
     78  match for peer cert</p> 
    7379 
    7480<!-- ==================== INSTANCE METHODS ==================== --> 
     
    98104        <span class="summary-sig-arg">peerCertDN</span>=<span class="summary-sig-default">None</span>, 
    99105        <span class="summary-sig-arg">peerCertCN</span>=<span class="summary-sig-default">None</span>, 
    100         <span class="summary-sig-arg">acceptedDNs</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>, 
    101         <span class="summary-sig-arg">caCertList</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>, 
    102         <span class="summary-sig-arg">caCertFilePathList</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>, 
     106        <span class="summary-sig-arg">acceptedDNs</span>=<span class="summary-sig-default">[]</span>, 
     107        <span class="summary-sig-arg">caCertList</span>=<span class="summary-sig-default">[]</span>, 
     108        <span class="summary-sig-arg">caCertFilePathList</span>=<span class="summary-sig-default">[]</span>, 
    103109        <span class="summary-sig-arg">**kw</span>)</span><br /> 
    104       Override parent class __init__ to enable setting of  
    105       myProxyServerDN setting</td> 
     110      Override parent class __init__ to enable setting of myProxyServerDN  
     111      setting</td> 
    106112          <td align="right" valign="top"> 
    107113            <span class="codelink"><a href="ndg.security.common.m2CryptoSSLUtility-pysrc.html#HostCheck.__init__">source&nbsp;code</a></span> 
     
    140146          <td><span class="summary-sig"><a name="__setCACertList"></a><span class="summary-sig-name">__setCACertList</span>(<span class="summary-sig-arg">self</span>, 
    141147        <span class="summary-sig-arg">caCertList</span>)</span><br /> 
    142       Set list of CA certs - peer cert must validate against at least  
    143       one of these</td> 
     148      Set list of CA certs - peer cert must validate against at least one  
     149      of these</td> 
    144150          <td align="right" valign="top"> 
    145151            <span class="codelink"><a href="ndg.security.common.m2CryptoSSLUtility-pysrc.html#HostCheck.__setCACertList">source&nbsp;code</a></span> 
     
    157163      <table width="100%" cellpadding="0" cellspacing="0" border="0"> 
    158164        <tr> 
    159           <td><span class="summary-sig"><a href="ndg.security.common.m2CryptoSSLUtility.HostCheck-class.html#__setCACertsFromFileList" class="summary-sig-name">__setCACertsFromFileList</a>(<span class="summary-sig-arg">self</span>, 
     165          <td><span class="summary-sig"><a href="ndg.security.common.m2CryptoSSLUtility.HostCheck-class.html#__setCACertsFromFileList" class="summary-sig-name" onclick="show_private();">__setCACertsFromFileList</a>(<span class="summary-sig-arg">self</span>, 
    160166        <span class="summary-sig-arg">caCertFilePathList</span>)</span><br /> 
    161167      Read CA certificates from file and add them to the X.509 stack</td> 
     
    206212  </td> 
    207213</tr> 
     214<tr> 
     215    <td width="15%" align="right" valign="top" class="summary"> 
     216      <span class="summary-type">&nbsp;</span> 
     217    </td><td class="summary"> 
     218        <a href="ndg.security.common.m2CryptoSSLUtility.HostCheck-class.html#caCertList" class="summary-name">caCertList</a> = <code title="property(fset= __setCACertList, doc= &quot;list of CA certs - peer cert mus\ 
     219t validate against one&quot;)">property(fset= __setCACertList, doc= &quot;list of CA <code class="variable-ellipsis">...</code></code> 
     220    </td> 
     221  </tr> 
     222<tr> 
     223    <td width="15%" align="right" valign="top" class="summary"> 
     224      <span class="summary-type">&nbsp;</span> 
     225    </td><td class="summary"> 
     226        <a href="ndg.security.common.m2CryptoSSLUtility.HostCheck-class.html#caCertFilePathList" class="summary-name">caCertFilePathList</a> = <code title="property(fset= __setCACertsFromFileList, doc= &quot;list of CA cert file pa\ 
     227ths - peer cert must validate against one&quot;)">property(fset= __setCACertsFromFileList, <code class="variable-ellipsis">...</code></code> 
     228    </td> 
     229  </tr> 
    208230  <tr> 
    209231    <td colspan="2" class="summary"> 
     
    231253  </td> 
    232254</tr> 
    233 <tr> 
    234     <td width="15%" align="right" valign="top" class="summary"> 
    235       <span class="summary-type">&nbsp;</span> 
    236     </td><td class="summary"> 
    237         <a href="ndg.security.common.m2CryptoSSLUtility.HostCheck-class.html#caCertList" class="summary-name">caCertList</a><br /> 
    238       list of CA certs - peer cert must validate against one 
    239     </td> 
    240   </tr> 
    241 <tr> 
    242     <td width="15%" align="right" valign="top" class="summary"> 
    243       <span class="summary-type">&nbsp;</span> 
    244     </td><td class="summary"> 
    245         <a href="ndg.security.common.m2CryptoSSLUtility.HostCheck-class.html#caCertFilePathList" class="summary-name">caCertFilePathList</a><br /> 
    246       list of CA cert file paths - peer cert must validate against  
    247       one 
    248     </td> 
    249   </tr> 
    250255  <tr> 
    251256    <td colspan="2" class="summary"> 
     
    284289        <span class="sig-arg">peerCertDN</span>=<span class="sig-default">None</span>, 
    285290        <span class="sig-arg">peerCertCN</span>=<span class="sig-default">None</span>, 
    286         <span class="sig-arg">acceptedDNs</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>, 
    287         <span class="sig-arg">caCertList</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>, 
    288         <span class="sig-arg">caCertFilePathList</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>, 
     291        <span class="sig-arg">acceptedDNs</span>=<span class="sig-default">[]</span>, 
     292        <span class="sig-arg">caCertList</span>=<span class="sig-default">[]</span>, 
     293        <span class="sig-arg">caCertFilePathList</span>=<span class="sig-default">[]</span>, 
    289294        <span class="sig-arg">**kw</span>)</span> 
    290295    <br /><em class="fname">(Constructor)</em> 
     
    293298    ><span class="codelink"><a href="ndg.security.common.m2CryptoSSLUtility-pysrc.html#HostCheck.__init__">source&nbsp;code</a></span>&nbsp; 
    294299    </td> 
    295   </table> 
     300  </tr></table> 
    296301   
    297   Override parent class __init__ to enable setting of myProxyServerDN  
    298   setting 
     302  <p>Override parent class __init__ to enable setting of myProxyServerDN  
     303  setting</p> 
    299304  <dl class="fields"> 
    300305    <dt>Parameters:</dt> 
    301306    <dd><ul class="nomargin-top"> 
    302         <li><p><strong class="pname"><code>peerCertDN</code></strong> (string/list) - Set the expected Distinguished Name of the server to avoid  
    303           errors matching hostnames.  This is useful where the hostname is  
    304           not fully qualified.</p> 
    305           *param acceptedDNs: a list of acceptable DNs.  This enables  
     307        <li><strong class="pname"><code>peerCertDN</code></strong> (string/list) - Set the expected Distinguished Name of the server to avoid errors 
     308          matching hostnames.  This is useful where the hostname is not  
     309          fully qualified. 
     310          <p>*param acceptedDNs: a list of acceptable DNs.  This enables  
    306311          validation where the expected DN is where against a limited list  
    307           of certs.</li> 
     312          of certs.</p></li> 
    308313        <li><strong class="pname"><code>peerCertCN</code></strong> (string) - enable alternate Common Name to peer hostname</li> 
    309         <li><strong class="pname"><code>caCertList</code></strong> (list type of M2Crypto.X509.X509 types) - CA X.509 certificates - if set the peer cert's CA signature is 
     314        <li><strong class="pname"><code>caCertList</code></strong> (list type of M2Crypto.X509.X509 types) - CA X.509 certificates - if set the peer cert's CA signature is  
    310315          verified against one of these.  At least one must verify</li> 
    311         <li><strong class="pname"><code>caCertFilePathList</code></strong> (list string types) - same as caCertList except input as list of CA cert file  
    312           paths</li> 
     316        <li><strong class="pname"><code>caCertFilePathList</code></strong> (list string types) - same as caCertList except input as list of CA cert file paths</li> 
    313317    </ul></dd> 
    314318    <dt>Overrides: 
    315       M2Crypto.SSL.Checker.Checker.__init__ 
     319        object.__init__ 
    316320    </dt> 
    317321  </dl> 
     
    333337    ><span class="codelink"><a href="ndg.security.common.m2CryptoSSLUtility-pysrc.html#HostCheck.__call__">source&nbsp;code</a></span>&nbsp; 
    334338    </td> 
    335   </table> 
     339  </tr></table> 
    336340   
    337   Carry out checks on server ID 
     341  <p>Carry out checks on server ID</p> 
    338342  <dl class="fields"> 
    339343    <dt>Parameters:</dt> 
    340344    <dd><ul class="nomargin-top"> 
    341         <li><strong class="pname"><code>peerCert</code></strong> - MyProxy server host certificate as M2Crypto.X509.X509  
    342           instance</li> 
     345        <li><strong class="pname"><code>peerCert</code></strong> - MyProxy server host certificate as M2Crypto.X509.X509 instance</li> 
    343346        <li><strong class="pname"><code>host</code></strong> - name of host to check</li> 
    344347    </ul></dd> 
    345348    <dt>Overrides: 
    346       M2Crypto.SSL.Checker.Checker.__call__ 
     349        M2Crypto.SSL.Checker.Checker.__call__ 
    347350    </dt> 
    348351  </dl> 
     
    362365    ><span class="codelink"><a href="ndg.security.common.m2CryptoSSLUtility-pysrc.html#HostCheck.__setCACertsFromFileList">source&nbsp;code</a></span>&nbsp; 
    363366    </td> 
    364   </table> 
     367  </tr></table> 
    365368   
    366   Read CA certificates from file and add them to the X.509 stack 
     369  <p>Read CA certificates from file and add them to the X.509 stack</p> 
    367370  <dl class="fields"> 
    368371    <dt>Parameters:</dt> 
     
    375378</div> 
    376379<br /> 
    377 <!-- ==================== PROPERTY DETAILS ==================== --> 
    378 <a name="section-PropertyDetails"></a> 
     380<!-- ==================== CLASS VARIABLE DETAILS ==================== --> 
     381<a name="section-ClassVariableDetails"></a> 
    379382<table class="details" border="1" cellpadding="3" 
    380383       cellspacing="0" width="100%" bgcolor="white"> 
     
    383386    <table border="0" cellpadding="0" cellspacing="0" width="100%"> 
    384387      <tr valign="top"> 
    385         <td align="left"><span class="table-header">Property Details</span></td> 
     388        <td align="left"><span class="table-header">Class Variable Details</span></td> 
    386389        <td align="right" valign="top" 
    387          ><span class="options">[<a href="#section-PropertyDetails" 
     390         ><span class="options">[<a href="#section-ClassVariableDetails" 
    388391         class="privatelink" onclick="toggle_private();" 
    389392         >hide private</a>]</span></td> 
     
    399402<tr><td> 
    400403  <h3 class="epydoc">caCertList</h3> 
    401   list of CA certs - peer cert must validate against one 
    402   <dl class="fields"> 
    403     <dt>Set Method:</dt> 
    404     <dd class="value"><span class="summary-sig"><a href="ndg.security.common.m2CryptoSSLUtility.HostCheck-class.html#__setCACertList" class="summary-sig-name">ndg.security.common.m2CryptoSSLUtility.HostCheck.__setCACertList</a>(<span class="summary-sig-arg">self</span>, 
    405         <span class="summary-sig-arg">caCertList</span>)</span> 
    406         - Set list of CA certs - peer cert must validate against at least  
    407       one of these 
    408     </dd> 
     404   
     405  <dl class="fields"> 
     406  </dl> 
     407  <dl class="fields"> 
     408    <dt>Value:</dt> 
     409      <dd><table><tr><td><pre class="variable"> 
     410property(fset= __setCACertList, doc= &quot;list of CA certs - peer cert mus<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span> 
     411t validate against one&quot;) 
     412</pre></td></tr></table> 
     413</dd> 
    409414  </dl> 
    410415</td></tr></table> 
     
    416421<tr><td> 
    417422  <h3 class="epydoc">caCertFilePathList</h3> 
    418   list of CA cert file paths - peer cert must validate against one 
    419   <dl class="fields"> 
    420     <dt>Set Method:</dt> 
    421     <dd class="value"><span class="summary-sig"><a href="ndg.security.common.m2CryptoSSLUtility.HostCheck-class.html#__setCACertsFromFileList" class="summary-sig-name">ndg.security.common.m2CryptoSSLUtility.HostCheck.__setCACertsFromFileList</a>(<span class="summary-sig-arg">self</span>, 
    422         <span class="summary-sig-arg">caCertFilePathList</span>)</span> 
    423         - Read CA certificates from file and add them to the X.509 stack 
    424     </dd> 
     423   
     424  <dl class="fields"> 
     425  </dl> 
     426  <dl class="fields"> 
     427    <dt>Value:</dt> 
     428      <dd><table><tr><td><pre class="variable"> 
     429property(fset= __setCACertsFromFileList, doc= &quot;list of CA cert file pa<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span> 
     430ths - peer cert must validate against one&quot;) 
     431</pre></td></tr></table> 
     432</dd> 
    425433  </dl> 
    426434</td></tr></table> 
     
    459467    <td align="left" class="footer"> 
    460468    <a href="epydoc-log.html">Generated by Epydoc 
    461     3.0beta1 on Mon Dec 17 09:22:46 2007</a> 
     469    3.0.1 on Thu Sep  4 09:37:47 2008</a> 
    462470    </td> 
    463471    <td align="right" class="footer"> 
    464       <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a> 
     472      <a target="mainFrame" href="http://epydoc.sourceforge.net" 
     473        >http://epydoc.sourceforge.net</a> 
    465474    </td> 
    466475  </tr> 
     
    473482  // visible); but by default, we want to hide them.  So hide 
    474483  // them unless we have a cookie that says to show them. 
    475   checkCookie() 
     484  checkCookie(); 
    476485  // --> 
    477486</script> 
    478    
    479487</body> 
    480488</html> 
Note: See TracChangeset for help on using the changeset viewer.