doc/R509/Cert/Extensions/BasicConstraints.html in r509-0.8.1 vs doc/R509/Cert/Extensions/BasicConstraints.html in r509-0.9

- old
+ new

@@ -4,11 +4,11 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Class: R509::Cert::Extensions::BasicConstraints - &mdash; Documentation by YARD 0.8.2.1 + &mdash; Documentation by YARD 0.8.5 </title> <link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" /> @@ -117,11 +117,22 @@ <h2>Constant Summary</h2> <dl class="constants"> <dt id="OID-constant" class="">OID = - + <div class="docstring"> + <div class="discussion"> + +<p>friendly name for BasicConstraints OID</p> + + + </div> +</div> +<div class="tags"> + + +</div> </dt> <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>basicConstraints</span><span class='tstring_end'>&quot;</span></span></pre></dd> </dl> @@ -190,12 +201,12 @@ <span class="summary_desc"><div class='inline'> -<p>Returns true if the path length allows this certificate to be used to sign -CA certificates.</p> +<p>Returns true if the path length allows this certificate to be used to +create subordinate signing certificates beneath it.</p> </div></span> </li> @@ -278,27 +289,51 @@ <tr> <td> <pre class="lines"> +33 34 35 36 37 38 39 -40</pre> +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 34</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 33</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='kw'>super</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> - <span class='ivar'>@is_ca</span> <span class='op'>=</span> <span class='op'>!</span> <span class='lparen'>(</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>CA:TRUE</span><span class='regexp_end'>/</span></span> <span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='id identifier rubyid_pathlen_match'>pathlen_match</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>pathlen:(\d+)</span><span class='regexp_end'>/</span></span> <span class='rparen'>)</span> - <span class='ivar'>@path_length</span> <span class='op'>=</span> <span class='id identifier rubyid_pathlen_match'>pathlen_match</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>unless</span> <span class='id identifier rubyid_pathlen_match'>pathlen_match</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> + <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>ASN1</span><span class='period'>.</span><span class='id identifier rubyid_get_extension_payload'>get_extension_payload</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> + <span class='ivar'>@is_ca</span> <span class='op'>=</span> <span class='kw'>false</span> + <span class='comment'># BasicConstraints ::= SEQUENCE { +</span> <span class='comment'># cA BOOLEAN DEFAULT FALSE, +</span> <span class='comment'># pathLenConstraint INTEGER (0..MAX) OPTIONAL } +</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_entry'>entry</span><span class='op'>|</span> + <span class='kw'>if</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Boolean</span><span class='rparen'>)</span> + <span class='comment'># since the boolean is optional it may not be present +</span> <span class='ivar'>@is_ca</span> <span class='op'>=</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> + <span class='kw'>else</span> + <span class='comment'># There are only two kinds of entries permitted so anything +</span> <span class='comment'># else is an integer pathlength +</span> <span class='ivar'>@path_length</span> <span class='op'>=</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> + <span class='kw'>end</span> + <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -334,16 +369,16 @@ <tr> <td> <pre class="lines"> +30 31 -32 -33</pre> +32</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 31</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 30</span> <span class='kw'>def</span> <span class='id identifier rubyid_path_length'>path_length</span> <span class='ivar'>@path_length</span> <span class='kw'>end</span></pre> </td> @@ -368,12 +403,13 @@ </h3><div class="docstring"> <div class="discussion"> -<p>Returns true if the path length allows this certificate to be used to sign -CA certificates.</p> +<p>Returns true if the path length allows this certificate to be used to +create subordinate signing certificates beneath it. Does not check if there +is a pathlen restriction in the cert chain above the current cert</p> </div> </div> <div class="tags"> @@ -396,17 +432,17 @@ <tr> <td> <pre class="lines"> -48 -49 -50 -51</pre> +60 +61 +62 +63</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 48</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 60</span> <span class='kw'>def</span> <span class='id identifier rubyid_allows_sub_ca?'>allows_sub_ca?</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='ivar'>@path_length</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>return</span> <span class='ivar'>@path_length</span> <span class='op'>&gt;</span> <span class='int'>0</span> <span class='kw'>end</span></pre> @@ -450,16 +486,16 @@ <tr> <td> <pre class="lines"> -42 -43 -44</pre> +53 +54 +55</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 42</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 53</span> <span class='kw'>def</span> <span class='id identifier rubyid_is_ca?'>is_ca?</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='kw'>return</span> <span class='ivar'>@is_ca</span> <span class='op'>==</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> </td> @@ -470,12 +506,12 @@ </div> </div> <div id="footer"> - Generated on Thu Nov 8 14:19:28 2012 by + Generated on Tue Apr 16 10:49:57 2013 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.2.1 (ruby-1.9.3). + 0.8.5 (ruby-1.9.3). </div> </body> </html> \ No newline at end of file