doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html in r509-0.9.2 vs doc/R509/Cert/Extensions/AuthorityKeyIdentifier.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::Cert::Extensions::AuthorityKeyIdentifier - &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); @@ -94,23 +94,33 @@ <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/r509/cert/extensions.rb</dd> + <dd class="r2 last">lib/r509/cert/extensions/authority_key_identifier.rb</dd> </dl> <div class="clear"></div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> -<p>Implements the AuthorityKeyIdentifier certificate extension, with methods -to provide access to the components and meaning of the extension's -contents.</p> +<p>RFC 5280 Description (see: <a +href="http://www.ietf.org/rfc/rfc5280.txt">www.ietf.org/rfc/rfc5280.txt</a>)</p> +<p>The authority key identifier extension provides a means of identifying the +public key corresponding to the private key used to sign a certificate. +This extension is used where an issuer has multiple signing keys (either +due to multiple concurrent key pairs or due to changeover). The +identification MAY be based on either the key identifier (the subject key +identifier in the issuer&#39;s certificate) or the issuer name and serial +number.</p> +<p>You can use this extension to parse an existing extension for easy access +to the contents or create a new one.</p> + + </div> </div> <div class="tags"> @@ -133,10 +143,26 @@ </div> </dt> <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>authorityKeyIdentifier</span><span class='tstring_end'>&quot;</span></span></pre></dd> + <dt id="AKI_EXTENSION_DEFAULT-constant" class="">AKI_EXTENSION_DEFAULT = + <div class="docstring"> + <div class="discussion"> + +<p>default extension behavior when generating</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'>keyid</span><span class='tstring_end'>&quot;</span></span></pre></dd> + </dl> @@ -145,11 +171,11 @@ <ul class="summary"> <li class="public "> <span class="summary_signature"> - <a href="#authority_cert_issuer-instance_method" title="#authority_cert_issuer (instance method)">- (Object) <strong>authority_cert_issuer</strong> </a> + <a href="#authority_cert_issuer-instance_method" title="#authority_cert_issuer (instance method)">- (R509::ASN1::GeneralName<sup>?</sup>) <strong>authority_cert_issuer</strong> </a> </span> @@ -165,23 +191,20 @@ <span class="summary_desc"><div class='inline'> -<p>key_identifier, if present, will be a hex string delimited by colons -authority_cert_issuer, if present, will be a GeneralName object -authority_cert_serial_number, if present, will be a hex string delimited by -colons.</p> +<p>authority_cert_issuer, if present, will be a GeneralName object.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> - <a href="#authority_cert_serial_number-instance_method" title="#authority_cert_serial_number (instance method)">- (Object) <strong>authority_cert_serial_number</strong> </a> + <a href="#authority_cert_serial_number-instance_method" title="#authority_cert_serial_number (instance method)">- (String<sup>?</sup>) <strong>authority_cert_serial_number</strong> </a> </span> @@ -197,23 +220,21 @@ <span class="summary_desc"><div class='inline'> -<p>key_identifier, if present, will be a hex string delimited by colons -authority_cert_issuer, if present, will be a GeneralName object -authority_cert_serial_number, if present, will be a hex string delimited by +<p>authority_cert_serial_number, if present, will be a hex string delimited by colons.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> - <a href="#key_identifier-instance_method" title="#key_identifier (instance method)">- (Object) <strong>key_identifier</strong> </a> + <a href="#key_identifier-instance_method" title="#key_identifier (instance method)">- (String<sup>?</sup>) <strong>key_identifier</strong> </a> </span> @@ -229,14 +250,11 @@ <span class="summary_desc"><div class='inline'> -<p>key_identifier, if present, will be a hex string delimited by colons -authority_cert_issuer, if present, will be a GeneralName object -authority_cert_serial_number, if present, will be a hex string delimited by -colons.</p> +<p>key_identifier, if present, will be a hex string delimited by colons.</p> </div></span> </li> @@ -254,11 +272,11 @@ <ul class="summary"> <li class="public "> <span class="summary_signature"> - <a href="#initialize-instance_method" title="#initialize (instance method)">- (AuthorityKeyIdentifier) <strong>initialize</strong>(*args) </a> + <a href="#initialize-instance_method" title="#initialize (instance method)">- (AuthorityKeyIdentifier) <strong>initialize</strong>(arg) </a> </span> @@ -287,11 +305,11 @@ <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::Cert::Extensions::AuthorityKeyIdentifier (class)">AuthorityKeyIdentifier</a></span></tt>) <strong>initialize</strong>(*args) + - (<tt><span class='object_link'><a href="" title="R509::Cert::Extensions::AuthorityKeyIdentifier (class)">AuthorityKeyIdentifier</a></span></tt>) <strong>initialize</strong>(arg) @@ -302,73 +320,123 @@ </div> </div> <div class="tags"> + <p class="tag_title">Parameters:</p> +<ul class="param"> + <li> + + <span class='name'>arg</span> + + + <span class='type'>(<tt>Hash</tt>)</span> + + + + &mdash; + <div class='inline'> +<p>a customizable set of options</p> +</div> + + </li> + +</ul> + + + + <p class="tag_title">Options Hash (<tt>arg</tt>):</p> + <ul class="option"> + + <li> + <span class="name">:public_key</span> + <span class="type">(<tt><span class='object_link'>OpenSSL::PKey</span></tt>)</span> + <span class="default"> + + </span> + + &mdash; <div class='inline'> +<p>Required if embedding keyid</p> +</div> + + </li> + + <li> + <span class="name">:issuer_subject</span> + <span class="type">(<tt><span class='object_link'><a href="../../Subject.html" title="R509::Subject (class)">R509::Subject</a></span></tt>)</span> + <span class="default"> + + </span> + + &mdash; <div class='inline'> +<p>Required if embedding issuer</p> +</div> + + </li> + + <li> + <span class="name">:value</span> + <span class="type">(<tt>String</tt>)</span> + <span class="default"> + + &mdash; default: + <tt>keyid</tt> + + </span> + + &mdash; <div class='inline'> +<p>For the rules of :value see: <a +href="http://www.openssl.org/docs/apps/x509v3_config.html#Authority_Key_Identifier_">www.openssl.org/docs/apps/x509v3_config.html#Authority_Key_Identifier_</a>. +If you want to embed issuer you MUST supply :issuer_certificate and not +:public_key</p> +</div> + + </li> + + <li> + <span class="name">:critical</span> + <span class="type">(<tt>Boolean</tt>)</span> + <span class="default"> + + &mdash; default: + <tt>false</tt> + + </span> + + </li> + + </ul> + + + </div><table class="source_code"> <tr> <td> <pre class="lines"> -350 -351 -352 -353 -354 -355 -356 -357 -358 -359 -360 -361 -362 -363 -364 -365 -366 -367 -368 -369 -370 -371 -372 -373 -374 -375</pre> +41 +42 +43 +44 +45 +46 +47 +48</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 350</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/authority_key_identifier.rb', line 41</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='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='comment'># AuthorityKeyIdentifier ::= SEQUENCE { -</span> <span class='comment'># keyIdentifier [0] KeyIdentifier OPTIONAL, -</span> <span class='comment'># authorityCertIssuer [1] GeneralNames OPTIONAL, -</span> <span class='comment'># authorityCertSerialNumber [2] CertificateSerialNumber 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_el'>el</span><span class='op'>|</span> - <span class='kw'>case</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_tag'>tag</span> - <span class='kw'>when</span> <span class='int'>0</span> - <span class='ivar'>@key_identifier</span> <span class='op'>=</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>H*</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>..</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>:</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> - <span class='kw'>when</span> <span class='int'>1</span> - <span class='ivar'>@authority_cert_issuer</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_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span> - <span class='kw'>when</span> <span class='int'>2</span> - <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>H*</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>..</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> - <span class='comment'># OpenSSL's convention is to drop leading 00s, so let's strip that off if -</span> <span class='comment'># present -</span> <span class='kw'>if</span> <span class='id identifier rubyid_arr'>arr</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>00</span><span class='tstring_end'>&quot;</span></span> - <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_delete_at'>delete_at</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span> - <span class='kw'>end</span> - <span class='ivar'>@authority_cert_serial_number</span> <span class='op'>=</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>:</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> - <span class='kw'>end</span> +<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span> + <span class='kw'>if</span> <span class='kw'>not</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_is_extension?'>is_extension?</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span> + <span class='id identifier rubyid_arg'>arg</span> <span class='op'>=</span> <span class='id identifier rubyid_build_extension'>build_extension</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span> <span class='kw'>end</span> + <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span> + <span class='id identifier rubyid_parse_extension'>parse_extension</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -381,42 +449,52 @@ <span id=""></span> <div class="method_details first"> <h3 class="signature first" id="authority_cert_issuer-instance_method"> - - (<tt>Object</tt>) <strong>authority_cert_issuer</strong> <span class="extras">(readonly)</span> + - (<tt><span class='object_link'><a href="../../ASN1/GeneralName.html" title="R509::ASN1::GeneralName (class)">R509::ASN1::GeneralName</a></span></tt><sup>?</sup>) <strong>authority_cert_issuer</strong> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> -<p>key_identifier, if present, will be a hex string delimited by colons -authority_cert_issuer, if present, will be a GeneralName object -authority_cert_serial_number, if present, will be a hex string delimited by -colons</p> +<p>authority_cert_issuer, if present, will be a GeneralName object</p> </div> </div> <div class="tags"> +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt><span class='object_link'><a href="../../ASN1/GeneralName.html" title="R509::ASN1::GeneralName (class)">R509::ASN1::GeneralName</a></span></tt>, <tt>nil</tt>)</span> + + + + </li> + +</ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> -348 -349 -350</pre> +31 +32 +33</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 348</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/authority_key_identifier.rb', line 31</span> <span class='kw'>def</span> <span class='id identifier rubyid_authority_cert_issuer'>authority_cert_issuer</span> <span class='ivar'>@authority_cert_issuer</span> <span class='kw'>end</span></pre> </td> @@ -427,42 +505,53 @@ <span id=""></span> <div class="method_details "> <h3 class="signature " id="authority_cert_serial_number-instance_method"> - - (<tt>Object</tt>) <strong>authority_cert_serial_number</strong> <span class="extras">(readonly)</span> + - (<tt>String</tt><sup>?</sup>) <strong>authority_cert_serial_number</strong> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> -<p>key_identifier, if present, will be a hex string delimited by colons -authority_cert_issuer, if present, will be a GeneralName object -authority_cert_serial_number, if present, will be a hex string delimited by +<p>authority_cert_serial_number, if present, will be a hex string delimited by colons</p> </div> </div> <div class="tags"> +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span> + + + + </li> + +</ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> -348 -349 -350</pre> +34 +35 +36</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 348</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/authority_key_identifier.rb', line 34</span> <span class='kw'>def</span> <span class='id identifier rubyid_authority_cert_serial_number'>authority_cert_serial_number</span> <span class='ivar'>@authority_cert_serial_number</span> <span class='kw'>end</span></pre> </td> @@ -473,42 +562,52 @@ <span id=""></span> <div class="method_details "> <h3 class="signature " id="key_identifier-instance_method"> - - (<tt>Object</tt>) <strong>key_identifier</strong> <span class="extras">(readonly)</span> + - (<tt>String</tt><sup>?</sup>) <strong>key_identifier</strong> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> -<p>key_identifier, if present, will be a hex string delimited by colons -authority_cert_issuer, if present, will be a GeneralName object -authority_cert_serial_number, if present, will be a hex string delimited by -colons</p> +<p>key_identifier, if present, will be a hex string delimited by colons</p> </div> </div> <div class="tags"> +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span> + + + + </li> + +</ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> -348 -349 -350</pre> +28 +29 +30</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 348</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/authority_key_identifier.rb', line 28</span> <span class='kw'>def</span> <span class='id identifier rubyid_key_identifier'>key_identifier</span> <span class='ivar'>@key_identifier</span> <span class='kw'>end</span></pre> </td> @@ -520,12 +619,12 @@ </div> <div id="footer"> - Generated on Tue Apr 23 10:46:06 2013 by + Generated on Sun Jan 26 13:37:29 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