doc/R509/Cert/Extensions/KeyUsage.html in r509-0.9.2 vs doc/R509/Cert/Extensions/KeyUsage.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::KeyUsage - &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); @@ -90,26 +90,42 @@ + <dt class="r2">Includes:</dt> + <dd class="r2"><span class='object_link'><a href="ValidationMixin.html" title="R509::Cert::Extensions::ValidationMixin (module)">ValidationMixin</a></span></dd> + + - <dt class="r2 last">Defined in:</dt> - <dd class="r2 last">lib/r509/cert/extensions.rb</dd> + <dt class="r1 last">Defined in:</dt> + <dd class="r1 last">lib/r509/cert/extensions/key_usage.rb</dd> </dl> <div class="clear"></div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> -<p>Implements the KeyUsage 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 key usage extension defines the purpose (e.g., encipherment, signature, +certificate signing) of the key contained in the certificate. The usage +restriction might be employed when a key that could be used for more than +one operation is to be restricted. For example, when an RSA key should be +used only to verify signatures on objects other than public key +certificates and CRLs, the digitalSignature and/or nonRepudiation bits +would be asserted. Likewise, when an RSA key should be used only for key +management, the keyEncipherment bit would be asserted.</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"> @@ -288,11 +304,11 @@ <ul class="summary"> <li class="public "> <span class="summary_signature"> - <a href="#allowed_uses-instance_method" title="#allowed_uses (instance method)">- (Object) <strong>allowed_uses</strong> </a> + <a href="#allowed_uses-instance_method" title="#allowed_uses (instance method)">- (Array<sup>?</sup>) <strong>allowed_uses</strong> </a> </span> @@ -308,11 +324,11 @@ <span class="summary_desc"><div class='inline'> -<p>An array of the key uses allowed.</p> +<p>An array (of strings) of the key uses allowed.</p> </div></span> </li> @@ -464,11 +480,11 @@ <li class="public "> <span class="summary_signature"> - <a href="#initialize-instance_method" title="#initialize (instance method)">- (KeyUsage) <strong>initialize</strong>(*args) </a> + <a href="#initialize-instance_method" title="#initialize (instance method)">- (KeyUsage) <strong>initialize</strong>(arg) </a> </span> @@ -481,11 +497,11 @@ <span class="summary_desc"><div class='inline'> -<p>See OpenSSL::X509::Extension#initialize.</p> +<p>This method takes a hash or an existing Extension object to parse.</p> </div></span> </li> @@ -575,170 +591,181 @@ <span class="summary_desc"><div class='inline'></div></span> </li> + <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="#to_yaml-instance_method" title="#to_yaml (instance method)">- (YAML) <strong>to_yaml</strong> </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'></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::KeyUsage (class)">KeyUsage</a></span></tt>) <strong>initialize</strong>(*args) + - (<tt><span class='object_link'><a href="" title="R509::Cert::Extensions::KeyUsage (class)">KeyUsage</a></span></tt>) <strong>initialize</strong>(arg) </h3><div class="docstring"> <div class="discussion"> -<p>See OpenSSL::X509::Extension#initialize</p> +<p>This method takes a hash or an existing Extension object to parse</p> +<p>The following types are known to r509 by default</p> +<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_digitalSignature'>digitalSignature</span> +<span class='id identifier rubyid_nonRepudiation'>nonRepudiation</span> +<span class='id identifier rubyid_keyEncipherment'>keyEncipherment</span> +<span class='id identifier rubyid_dataEncipherment'>dataEncipherment</span> +<span class='id identifier rubyid_keyAgreement'>keyAgreement</span> +<span class='id identifier rubyid_keyCertSign'>keyCertSign</span> +<span class='id identifier rubyid_cRLSign'>cRLSign</span> +<span class='id identifier rubyid_encipherOnly'>encipherOnly</span> +<span class='id identifier rubyid_decipherOnly'>decipherOnly</span></code></pre> + + </div> </div> <div class="tags"> + <div class="examples"> + <p class="tag_title">Examples:</p> + + + <pre class="example code"><code>R509::Cert::Extensions::KeyUsage.new( + :critical =&gt; false, + :value =&gt; [&#39;digitalSignature,&#39;keyEncipherment&#39;] +)</code></pre> + + </div> +<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">:value</span> + <span class="type">(<tt>Array</tt>)</span> + <span class="default"> + + </span> + + </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"> -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157</pre> +71 +72 +73 +74 +75 +76 +77 +78</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 96</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 71</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'># There are 9 possible bits, which means we need 2 bytes -</span> <span class='comment'># to represent them all. When the last bit is not set -</span> <span class='comment'># the second byte is not encoded. let's add it back so we can -</span> <span class='comment'># have the full bitmask for comparison -</span> <span class='kw'>if</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span> - <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\0</span><span class='tstring_end'>&quot;</span></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='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</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'>n</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='comment'># treat it as a 16-bit unsigned big endian -</span> <span class='comment'># KeyUsage ::= BIT STRING { -</span> <span class='comment'># digitalSignature (0), -</span> <span class='comment'># nonRepudiation (1), -- recent editions of X.509 have -</span> <span class='comment'># -- renamed this bit to contentCommitment -</span> <span class='comment'># keyEncipherment (2), -</span> <span class='comment'># dataEncipherment (3), -</span> <span class='comment'># keyAgreement (4), -</span> <span class='comment'># keyCertSign (5), -</span> <span class='comment'># cRLSign (6), -</span> <span class='comment'># encipherOnly (7), -</span> <span class='comment'># decipherOnly (8) } -</span> <span class='ivar'>@allowed_uses</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> - <span class='kw'>if</span> <span class='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>&amp;</span> <span class='int'>0b1000000000000000</span> <span class='op'>&gt;</span> <span class='int'>0</span> - <span class='ivar'>@digital_signature</span> <span class='op'>=</span> <span class='kw'>true</span> - <span class='ivar'>@allowed_uses</span> <span class='op'>&lt;&lt;</span> <span class='const'>AU_DIGITAL_SIGNATURE</span> - <span class='kw'>end</span> - <span class='kw'>if</span> <span class='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>&amp;</span> <span class='int'>0b0100000000000000</span> <span class='op'>&gt;</span> <span class='int'>0</span> - <span class='ivar'>@non_repudiation</span> <span class='op'>=</span> <span class='kw'>true</span> - <span class='ivar'>@allowed_uses</span> <span class='op'>&lt;&lt;</span> <span class='const'>AU_NON_REPUDIATION</span> - <span class='kw'>end</span> - <span class='kw'>if</span> <span class='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>&amp;</span> <span class='int'>0b0010000000000000</span> <span class='op'>&gt;</span> <span class='int'>0</span> - <span class='ivar'>@key_encipherment</span> <span class='op'>=</span> <span class='kw'>true</span> - <span class='ivar'>@allowed_uses</span> <span class='op'>&lt;&lt;</span> <span class='const'>AU_KEY_ENCIPHERMENT</span> - <span class='kw'>end</span> - <span class='kw'>if</span> <span class='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>&amp;</span> <span class='int'>0b0001000000000000</span> <span class='op'>&gt;</span> <span class='int'>0</span> - <span class='ivar'>@data_encipherment</span> <span class='op'>=</span> <span class='kw'>true</span> - <span class='ivar'>@allowed_uses</span> <span class='op'>&lt;&lt;</span> <span class='const'>AU_DATA_ENCIPHERMENT</span> - <span class='kw'>end</span> - <span class='kw'>if</span> <span class='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>&amp;</span> <span class='int'>0b0000100000000000</span> <span class='op'>&gt;</span> <span class='int'>0</span> - <span class='ivar'>@key_agreement</span> <span class='op'>=</span> <span class='kw'>true</span> - <span class='ivar'>@allowed_uses</span> <span class='op'>&lt;&lt;</span> <span class='const'>AU_KEY_AGREEMENT</span> - <span class='kw'>end</span> - <span class='kw'>if</span> <span class='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>&amp;</span> <span class='int'>0b0000010000000000</span> <span class='op'>&gt;</span> <span class='int'>0</span> - <span class='ivar'>@key_cert_sign</span> <span class='op'>=</span> <span class='kw'>true</span> - <span class='ivar'>@allowed_uses</span> <span class='op'>&lt;&lt;</span> <span class='const'>AU_KEY_CERT_SIGN</span> - <span class='kw'>end</span> - <span class='kw'>if</span> <span class='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>&amp;</span> <span class='int'>0b0000001000000000</span> <span class='op'>&gt;</span> <span class='int'>0</span> - <span class='ivar'>@crl_sign</span> <span class='op'>=</span> <span class='kw'>true</span> - <span class='ivar'>@allowed_uses</span> <span class='op'>&lt;&lt;</span> <span class='const'>AU_CRL_SIGN</span> - <span class='kw'>end</span> - <span class='kw'>if</span> <span class='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>&amp;</span> <span class='int'>0b0000000100000000</span> <span class='op'>&gt;</span> <span class='int'>0</span> - <span class='ivar'>@encipher_only</span> <span class='op'>=</span> <span class='kw'>true</span> - <span class='ivar'>@allowed_uses</span> <span class='op'>&lt;&lt;</span> <span class='const'>AU_ENCIPHER_ONLY</span> - <span class='kw'>end</span> - <span class='kw'>if</span> <span class='id identifier rubyid_bit_mask'>bit_mask</span> <span class='op'>&amp;</span> <span class='int'>0b0000000010000000</span> <span class='op'>&gt;</span> <span class='int'>0</span> - <span class='ivar'>@decipher_only</span> <span class='op'>=</span> <span class='kw'>true</span> - <span class='ivar'>@allowed_uses</span> <span class='op'>&lt;&lt;</span> <span class='const'>AU_DECIPHER_ONLY</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> @@ -751,39 +778,52 @@ <span id=""></span> <div class="method_details first"> <h3 class="signature first" id="allowed_uses-instance_method"> - - (<tt>Object</tt>) <strong>allowed_uses</strong> <span class="extras">(readonly)</span> + - (<tt>Array</tt><sup>?</sup>) <strong>allowed_uses</strong> <span class="extras">(readonly)</span> </h3><div class="docstring"> <div class="discussion"> -<p>An array of the key uses allowed.</p> +<p>An array (of strings) of the key uses allowed.</p> </div> </div> <div class="tags"> +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>Array</tt>, <tt>nil</tt>)</span> + + + + </li> + +</ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> -74 -75 -76</pre> +30 +31 +32</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 74</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 30</span> <span class='kw'>def</span> <span class='id identifier rubyid_allowed_uses'>allowed_uses</span> <span class='ivar'>@allowed_uses</span> <span class='kw'>end</span></pre> </td> @@ -856,16 +896,16 @@ <tr> <td> <pre class="lines"> -163 -164 -165</pre> +84 +85 +86</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 163</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 84</span> <span class='kw'>def</span> <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='id identifier rubyid_friendly_use_name'>friendly_use_name</span> <span class='rparen'>)</span> <span class='ivar'>@allowed_uses</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span> <span class='id identifier rubyid_friendly_use_name'>friendly_use_name</span> <span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -908,16 +948,16 @@ <tr> <td> <pre class="lines"> -191 -192 -193</pre> +112 +113 +114</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 191</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 112</span> <span class='kw'>def</span> <span class='id identifier rubyid_crl_sign?'>crl_sign?</span> <span class='lparen'>(</span><span class='ivar'>@crl_sign</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -960,16 +1000,16 @@ <tr> <td> <pre class="lines"> -179 -180 -181</pre> +100 +101 +102</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 179</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 100</span> <span class='kw'>def</span> <span class='id identifier rubyid_data_encipherment?'>data_encipherment?</span> <span class='lparen'>(</span><span class='ivar'>@data_encipherment</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -1012,16 +1052,16 @@ <tr> <td> <pre class="lines"> -199 -200 -201</pre> +120 +121 +122</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 199</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 120</span> <span class='kw'>def</span> <span class='id identifier rubyid_decipher_only?'>decipher_only?</span> <span class='lparen'>(</span><span class='ivar'>@decipher_only</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -1064,16 +1104,16 @@ <tr> <td> <pre class="lines"> -167 -168 -169</pre> +88 +89 +90</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 167</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 88</span> <span class='kw'>def</span> <span class='id identifier rubyid_digital_signature?'>digital_signature?</span> <span class='lparen'>(</span><span class='ivar'>@digital_signature</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -1116,16 +1156,16 @@ <tr> <td> <pre class="lines"> -195 -196 -197</pre> +116 +117 +118</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 195</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 116</span> <span class='kw'>def</span> <span class='id identifier rubyid_encipher_only?'>encipher_only?</span> <span class='lparen'>(</span><span class='ivar'>@encipher_only</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -1168,16 +1208,16 @@ <tr> <td> <pre class="lines"> -183 -184 -185</pre> +104 +105 +106</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 183</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 104</span> <span class='kw'>def</span> <span class='id identifier rubyid_key_agreement?'>key_agreement?</span> <span class='lparen'>(</span><span class='ivar'>@key_agreement</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -1220,16 +1260,16 @@ <tr> <td> <pre class="lines"> -187 -188 -189</pre> +108 +109 +110</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 187</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 108</span> <span class='kw'>def</span> <span class='id identifier rubyid_key_cert_sign?'>key_cert_sign?</span> <span class='lparen'>(</span><span class='ivar'>@key_cert_sign</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -1272,16 +1312,16 @@ <tr> <td> <pre class="lines"> -175 -176 -177</pre> +96 +97 +98</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 175</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 96</span> <span class='kw'>def</span> <span class='id identifier rubyid_key_encipherment?'>key_encipherment?</span> <span class='lparen'>(</span><span class='ivar'>@key_encipherment</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -1324,32 +1364,142 @@ <tr> <td> <pre class="lines"> -171 -172 -173</pre> +92 +93 +94</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 171</span> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 92</span> <span class='kw'>def</span> <span class='id identifier rubyid_non_repudiation?'>non_repudiation?</span> <span class='lparen'>(</span><span class='ivar'>@non_repudiation</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </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"> + + +125 +126 +127 +128 +129 +130</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 125</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span> + <span class='lbrace'>{</span> + <span class='symbol'>:value</span> <span class='op'>=&gt;</span> <span class='ivar'>@allowed_uses</span><span class='comma'>,</span> + <span class='symbol'>:critical</span> <span class='op'>=&gt;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_critical?'>critical?</span> + <span class='rbrace'>}</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> </div> + + <div class="method_details "> + <h3 class="signature " id="to_yaml-instance_method"> + + - (<tt>YAML</tt>) <strong>to_yaml</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>YAML</tt>)</span> + + + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +133 +134 +135</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/key_usage.rb', line 133</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_to_yaml'>to_yaml</span> + <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span><span class='period'>.</span><span class='id identifier rubyid_to_yaml'>to_yaml</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + </div> + +</div> + <div id="footer"> - Generated on Tue Apr 23 10:46:06 2013 by + Generated on Sun Jan 26 13:37:27 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