doc/R509/ASN1/GeneralNames.html in r509-0.9.2 vs doc/R509/ASN1/GeneralNames.html in r509-0.10.0

- old
+ new

@@ -4,17 +4,17 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Class: R509::ASN1::GeneralNames - &mdash; Documentation by YARD 0.8.5 + &mdash; Documentation by YARD 0.8.6.1 </title> - <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" /> + <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" /> - <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" /> + <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" /> <script type="text/javascript" charset="utf-8"> hasFrames = window.top.frames.main ? true : false; relpath = '../../'; framesUrl = "../../frames.html#!" + escape(window.location.href); @@ -88,15 +88,19 @@ + <dt class="r2">Includes:</dt> + <dd class="r2"><span class='object_link'><a href="../Cert/Extensions/ValidationMixin.html" title="R509::Cert::Extensions::ValidationMixin (module)">Cert::Extensions::ValidationMixin</a></span></dd> + + - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/r509/asn1.rb</dd> + <dt class="r1 last">Defined in:</dt> + <dd class="r1 last">lib/r509/asn1.rb</dd> </dl> <div class="clear"></div> <h2>Overview</h2><div class="docstring"> @@ -127,14 +131,60 @@ <ul class="summary"> <li class="public "> <span class="summary_signature"> + <a href="#add_item-instance_method" title="#add_item (instance method)">- (Object) <strong>add_item</strong>(asn) </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'></div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#create_item-instance_method" title="#create_item (instance method)">- (Object) <strong>create_item</strong>(hash) </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'></div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#directory_names-instance_method" title="#directory_names (instance method)">- (Array) <strong>directory_names</strong> </a> + (also: #dir_names) + </span> @@ -175,11 +225,11 @@ <li class="public "> <span class="summary_signature"> - <a href="#initialize-instance_method" title="#initialize (instance method)">- (GeneralNames) <strong>initialize</strong> </a> + <a href="#initialize-instance_method" title="#initialize (instance method)">- (GeneralNames) <strong>initialize</strong>(data = nil) </a> </span> @@ -205,10 +255,12 @@ <a href="#ip_addresses-instance_method" title="#ip_addresses (instance method)">- (Array) <strong>ip_addresses</strong> </a> + (also: #ips) + </span> @@ -253,10 +305,12 @@ <a href="#rfc_822_names-instance_method" title="#rfc_822_names (instance method)">- (Array) <strong>rfc_822_names</strong> </a> + (also: #email_names) + </span> @@ -297,10 +351,32 @@ <li class="public "> <span class="summary_signature"> + <a href="#to_h-instance_method" title="#to_h (instance method)">- (Hash) <strong>to_h</strong> </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'></div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#uniform_resource_identifiers-instance_method" title="#uniform_resource_identifiers (instance method)">- (Array) <strong>uniform_resource_identifiers</strong> </a> (also: #uris) @@ -323,17 +399,19 @@ </ul> -<div id="constructor_details" class="method_details_list"> + + + <div id="constructor_details" class="method_details_list"> <h2>Constructor Details</h2> <div class="method_details first"> <h3 class="signature first" id="initialize-instance_method"> - - (<tt><span class='object_link'><a href="" title="R509::ASN1::GeneralNames (class)">GeneralNames</a></span></tt>) <strong>initialize</strong> + - (<tt><span class='object_link'><a href="" title="R509::ASN1::GeneralNames (class)">GeneralNames</a></span></tt>) <strong>initialize</strong>(data = nil) @@ -344,37 +422,70 @@ </div> </div> <div class="tags"> + <p class="tag_title">Parameters:</p> +<ul class="param"> + <li> + + <span class='name'>data</span> + + + <span class='type'>(<tt>Array</tt>, <tt><span class='object_link'><a href="" title="R509::ASN1::GeneralNames (class)">R509::ASN1::GeneralNames</a></span></tt>)</span> + + + <em class="default">(defaults to: <tt>nil</tt>)</em> + + + &mdash; + <div class='inline'> +<p>Pass an array of hashes to create R509::ASN1::GeneralName objects or an +existing R509::ASN1::GeneralNames object</p> +</div> + + </li> + +</ul> + </div><table class="source_code"> <tr> <td> <pre class="lines"> -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219</pre> +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 206</span> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 235</span> -<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> +<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span> <span class='ivar'>@types</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:otherName</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='comment'># unimplemented </span> <span class='symbol'>:rfc822Name</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:dNSName</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:x400Address</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='comment'># unimplemented @@ -383,10 +494,20 @@ </span> <span class='symbol'>:uniformResourceIdentifier</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:iPAddress</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:registeredID</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='comment'># unimplemented </span> <span class='rbrace'>}</span> <span class='ivar'>@ordered_names</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> + <span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> + <span class='kw'>if</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span> + <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_names'>names</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span> <span class='id identifier rubyid_add_item'>add_item</span><span class='lparen'>(</span><span class='id identifier rubyid_n'>n</span><span class='rparen'>)</span> <span class='rbrace'>}</span> + <span class='kw'>else</span> + <span class='id identifier rubyid_validate_general_name_hash_array'>validate_general_name_hash_array</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span> + <span class='id identifier rubyid_data'>data</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_n'>n</span><span class='op'>|</span> + <span class='id identifier rubyid_create_item'>create_item</span><span class='lparen'>(</span><span class='id identifier rubyid_n'>n</span><span class='rparen'>)</span> + <span class='kw'>end</span> + <span class='kw'>end</span> + <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -397,16 +518,163 @@ <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> - <h3 class="signature first" id="directory_names-instance_method"> + <h3 class="signature first" id="add_item-instance_method"> + - (<tt>Object</tt>) <strong>add_item</strong>(asn) + + + + + +</h3><div class="docstring"> + <div class="discussion"> + + + </div> +</div> +<div class="tags"> + <p class="tag_title">Parameters:</p> +<ul class="param"> + + <li> + + <span class='name'>asn</span> + + + <span class='type'>(<tt>OpenSSL::ASN1::ASN1Data</tt>)</span> + + + + &mdash; + <div class='inline'> +<p>Takes ASN.1 data in for parsing GeneralName structures</p> +</div> + + </li> + +</ul> + + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 261</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_add_item'>add_item</span><span class='lparen'>(</span><span class='id identifier rubyid_asn'>asn</span><span class='rparen'>)</span> + <span class='comment'># map general names into our hash of arrays +</span> <span class='kw'>if</span> <span class='id identifier rubyid_asn'>asn</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>GeneralName</span><span class='rparen'>)</span> + <span class='ivar'>@ordered_names</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_asn'>asn</span> + <span class='ivar'>@types</span><span class='lbracket'>[</span><span class='id identifier rubyid_asn'>asn</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_asn'>asn</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> + <span class='kw'>else</span> + <span class='id identifier rubyid_gn'>gn</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>GeneralName</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_asn'>asn</span><span class='rparen'>)</span> + <span class='ivar'>@ordered_names</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_gn'>gn</span> + <span class='ivar'>@types</span><span class='lbracket'>[</span><span class='id identifier rubyid_gn'>gn</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_gn'>gn</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> + <span class='kw'>end</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="create_item-instance_method"> + + - (<tt>Object</tt>) <strong>create_item</strong>(hash) + + + + + +</h3><div class="docstring"> + <div class="discussion"> + + + </div> +</div> +<div class="tags"> + <p class="tag_title">Parameters:</p> +<ul class="param"> + + <li> + + <span class='name'>hash</span> + + + <span class='type'>(<tt>Hash</tt>)</span> + + + + &mdash; + <div class='inline'> +<p>A hash with (:tag or :type) and :value keys. Allows you to build +GeneralName objects and add them to the GeneralNames object</p> +</div> + + </li> + +</ul> + + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +275 +276 +277 +278 +279 +280 +281</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 275</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_create_item'>create_item</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span> + <span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:has_key?</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='lparen'>(</span><span class='kw'>not</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:tag</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:type</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='kw'>not</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:value</span><span class='rparen'>)</span> + <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Must be a hash with (:tag or :type) and :value nodes</span><span class='tstring_end'>&quot;</span></span> + <span class='kw'>end</span> + <span class='id identifier rubyid_gn'>gn</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>GeneralName</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:tag</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='symbol'>:tag</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:type</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:value</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='rparen'>)</span> + <span class='id identifier rubyid_add_item'>add_item</span><span class='lparen'>(</span><span class='id identifier rubyid_gn'>gn</span><span class='rparen'>)</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="directory_names-instance_method"> + - (<tt>Array</tt>) <strong>directory_names</strong> + <span class="aliases">Also known as: + <span class="names"><span id='dir_names-instance_method'>dir_names</span></span> + </span> + </h3><div class="docstring"> <div class="discussion"> @@ -440,16 +708,16 @@ <tr> <td> <pre class="lines"> -277 -278 -279</pre> +318 +319 +320</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 277</span> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 318</span> <span class='kw'>def</span> <span class='id identifier rubyid_directory_names'>directory_names</span> <span class='ivar'>@types</span><span class='lbracket'>[</span><span class='symbol'>:directoryName</span><span class='rbracket'>]</span> <span class='kw'>end</span></pre> </td> @@ -499,16 +767,16 @@ <tr> <td> <pre class="lines"> -261 -262 -263</pre> +301 +302 +303</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 261</span> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 301</span> <span class='kw'>def</span> <span class='id identifier rubyid_dns_names'>dns_names</span> <span class='ivar'>@types</span><span class='lbracket'>[</span><span class='symbol'>:dNSName</span><span class='rbracket'>]</span> <span class='kw'>end</span></pre> </td> @@ -521,10 +789,14 @@ - (<tt>Array</tt>) <strong>ip_addresses</strong> + <span class="aliases">Also known as: + <span class="names"><span id='ips-instance_method'>ips</span></span> + </span> + </h3><div class="docstring"> <div class="discussion"> @@ -558,16 +830,16 @@ <tr> <td> <pre class="lines"> -272 -273 -274</pre> +312 +313 +314</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 272</span> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 312</span> <span class='kw'>def</span> <span class='id identifier rubyid_ip_addresses'>ip_addresses</span> <span class='ivar'>@types</span><span class='lbracket'>[</span><span class='symbol'>:iPAddress</span><span class='rbracket'>]</span> <span class='kw'>end</span></pre> </td> @@ -617,16 +889,16 @@ <tr> <td> <pre class="lines"> -251 -252 -253</pre> +290 +291 +292</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 251</span> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 290</span> <span class='kw'>def</span> <span class='id identifier rubyid_names'>names</span> <span class='ivar'>@ordered_names</span> <span class='kw'>end</span></pre> </td> @@ -639,10 +911,14 @@ - (<tt>Array</tt>) <strong>rfc_822_names</strong> + <span class="aliases">Also known as: + <span class="names"><span id='email_names-instance_method'>email_names</span></span> + </span> + </h3><div class="docstring"> <div class="discussion"> @@ -676,16 +952,16 @@ <tr> <td> <pre class="lines"> -256 -257 -258</pre> +295 +296 +297</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 256</span> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 295</span> <span class='kw'>def</span> <span class='id identifier rubyid_rfc_822_names'>rfc_822_names</span> <span class='ivar'>@types</span><span class='lbracket'>[</span><span class='symbol'>:rfc822Name</span><span class='rbracket'>]</span> <span class='kw'>end</span></pre> </td> @@ -735,23 +1011,23 @@ <tr> <td> <pre class="lines"> -282 -283 -284 -285 -286 -287 -288 -289 -290 -291</pre> +324 +325 +326 +327 +328 +329 +330 +331 +332 +333</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 282</span> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 324</span> <span class='kw'>def</span> <span class='id identifier rubyid_serialize_names'>serialize_names</span> <span class='id identifier rubyid_confs'>confs</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='id identifier rubyid_extension_strings'>extension_strings</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='ivar'>@ordered_names</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> @@ -765,10 +1041,62 @@ </tr> </table> </div> <div class="method_details "> + <h3 class="signature " id="to_h-instance_method"> + + - (<tt>Hash</tt>) <strong>to_h</strong> + + + + + +</h3><div class="docstring"> + <div class="discussion"> + + + </div> +</div> +<div class="tags"> + +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>Hash</tt>)</span> + + + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +284 +285 +286</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 284</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span> + <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_names'>names</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span> <span class='id identifier rubyid_n'>n</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span> <span class='rbrace'>}</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> <h3 class="signature " id="uniform_resource_identifiers-instance_method"> - (<tt>Array</tt>) <strong>uniform_resource_identifiers</strong> @@ -812,16 +1140,16 @@ <tr> <td> <pre class="lines"> -266 -267 -268</pre> +306 +307 +308</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 266</span> + <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 306</span> <span class='kw'>def</span> <span class='id identifier rubyid_uniform_resource_identifiers'>uniform_resource_identifiers</span> <span class='ivar'>@types</span><span class='lbracket'>[</span><span class='symbol'>:uniformResourceIdentifier</span><span class='rbracket'>]</span> <span class='kw'>end</span></pre> </td> @@ -832,12 +1160,12 @@ </div> </div> <div id="footer"> - Generated on Tue Apr 23 10:46:05 2013 by + Generated on Sun Jan 26 13:37:26 2014 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.5 (ruby-1.9.3). + 0.8.6.1 (ruby-2.0.0). </div> </body> </html> \ No newline at end of file