<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Class: R509::Cert::Extensions::AuthorityKeyIdentifier — Documentation by YARD 0.8.5 </title> <link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" /> <link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" 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); </script> <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script> </head> <body> <div id="header"> <div id="menu"> <a href="../../../_index.html">Index (A)</a> » <span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../Cert.html" title="R509::Cert (class)">Cert</a></span></span> » <span class='title'><span class='object_link'><a href="../Extensions.html" title="R509::Cert::Extensions (module)">Extensions</a></span></span> » <span class="title">AuthorityKeyIdentifier</span> <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> </div> <div id="search"> <a class="full_list_link" id="class_list_link" href="../../../class_list.html"> Class List </a> <a class="full_list_link" id="method_list_link" href="../../../method_list.html"> Method List </a> <a class="full_list_link" id="file_list_link" href="../../../file_list.html"> File List </a> </div> <div class="clear"></div> </div> <iframe id="search_frame"></iframe> <div id="content"><h1>Class: R509::Cert::Extensions::AuthorityKeyIdentifier </h1> <dl class="box"> <dt class="r1">Inherits:</dt> <dd class="r1"> <span class="inheritName">OpenSSL::X509::Extension</span> <ul class="fullTree"> <li>Object</li> <li class="next">OpenSSL::X509::Extension</li> <li class="next">R509::Cert::Extensions::AuthorityKeyIdentifier</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> <dt class="r2 last">Defined in:</dt> <dd class="r2 last">lib/r509/cert/extensions.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> </div> </div> <div class="tags"> </div> <h2>Constant Summary</h2> <dl class="constants"> <dt id="OID-constant" class="">OID = <div class="docstring"> <div class="discussion"> <p>friendly name for Authority Key Identifier OID</p> </div> </div> <div class="tags"> </div> </dt> <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>authorityKeyIdentifier</span><span class='tstring_end'>"</span></span></pre></dd> </dl> <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> <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> </span> <span class="note title readonly">readonly</span> <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> </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> </span> <span class="note title readonly">readonly</span> <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> </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> </span> <span class="note title readonly">readonly</span> <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> </div></span> </li> </ul> <h2> Instance Method Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small> </h2> <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> </span> <span class="note title constructor">constructor</span> <span class="summary_desc"><div class='inline'> <p>A new instance of AuthorityKeyIdentifier.</p> </div></span> </li> </ul> <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::Cert::Extensions::AuthorityKeyIdentifier (class)">AuthorityKeyIdentifier</a></span></tt>) <strong>initialize</strong>(*args) </h3><div class="docstring"> <div class="discussion"> <p>A new instance of AuthorityKeyIdentifier</p> </div> </div> <div class="tags"> </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> </td> <td> <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 350</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'>"</span><span class='tstring_content'>H*</span><span class='tstring_end'>"</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'>"</span><span class='tstring_content'>:</span><span class='tstring_end'>"</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'>"</span><span class='tstring_content'>H*</span><span class='tstring_end'>"</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'>"</span><span class='tstring_content'>00</span><span class='tstring_end'>"</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'>"</span><span class='tstring_content'>:</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> <div id="instance_attr_details" class="attr_details"> <h2>Instance Attribute Details</h2> <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> </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> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 348 349 350</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 348</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> </tr> </table> </div> <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> </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> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 348 349 350</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 348</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> </tr> </table> </div> <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> </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> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 348 349 350</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 348</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> </tr> </table> </div> </div> </div> <div id="footer"> Generated on Wed Apr 17 15:21:08 2013 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.8.5 (ruby-1.9.3). </div> </body> </html>