doc/R509/Ocsp/Helper/ResponseSigner.html in r509-ocsp-responder-0.3.1 vs doc/R509/Ocsp/Helper/ResponseSigner.html in r509-ocsp-responder-0.3.2

- old
+ new

@@ -2,19 +2,19 @@ "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::Ocsp::Helper::ResponseSigner + Class: R509::OCSP::Helper::ResponseSigner - &mdash; Documentation by YARD 0.8.2.1 + &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); @@ -30,11 +30,11 @@ <body> <div id="header"> <div id="menu"> <a href="../../../_index.html">Index (R)</a> &raquo; - <span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Ocsp.html" title="R509::Ocsp (module)">Ocsp</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Helper.html" title="R509::Ocsp::Helper (module)">Helper</a></span></span> + <span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../OCSP.html" title="R509::OCSP (module)">OCSP</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Helper.html" title="R509::OCSP::Helper (module)">Helper</a></span></span> &raquo; <span class="title">ResponseSigner</span> <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> @@ -61,11 +61,11 @@ <div class="clear"></div> </div> <iframe id="search_frame"></iframe> - <div id="content"><h1>Class: R509::Ocsp::Helper::ResponseSigner + <div id="content"><h1>Class: R509::OCSP::Helper::ResponseSigner </h1> @@ -76,11 +76,11 @@ <span class="inheritName">Object</span> <ul class="fullTree"> <li>Object</li> - <li class="next">R509::Ocsp::Helper::ResponseSigner</li> + <li class="next">R509::OCSP::Helper::ResponseSigner</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> @@ -207,11 +207,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::Ocsp::Helper::ResponseSigner (class)">ResponseSigner</a></span></tt>) <strong>initialize</strong>(options) + - (<tt><span class='object_link'><a href="" title="R509::OCSP::Helper::ResponseSigner (class)">ResponseSigner</a></span></tt>) <strong>initialize</strong>(options) @@ -280,15 +280,15 @@ </td> <td> <pre class="code"><span class="info file"># File 'lib/r509/ocsp/signer.rb', line 172</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> - <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:copy_nonce</span><span class='rparen'>)</span> - <span class='ivar'>@copy_nonce</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:copy_nonce</span><span class='rbracket'>]</span> - <span class='kw'>else</span> - <span class='ivar'>@copy_nonce</span> <span class='op'>=</span> <span class='kw'>false</span> - <span class='kw'>end</span> + <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:copy_nonce</span><span class='rparen'>)</span> + <span class='ivar'>@copy_nonce</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:copy_nonce</span><span class='rbracket'>]</span> + <span class='kw'>else</span> + <span class='ivar'>@copy_nonce</span> <span class='op'>=</span> <span class='kw'>false</span> + <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -312,11 +312,11 @@ </h3><div class="docstring"> <div class="discussion"> <p>It is UNWISE to call this method directly because it assumes that the request is validated. You probably want to take a look at -R509::Ocsp::Signer#handle_request</p> +R509::OCSP::Signer#handle_request</p> </div> </div> <div class="tags"> @@ -343,11 +343,11 @@ &mdash; <div class='inline'> -<p>hash from R509::Ocsp::Helper::RequestChecker#check_statuses</p> +<p>hash from R509::OCSP::Helper::RequestChecker#check_statuses</p> </div> </li> </ul> @@ -405,38 +405,38 @@ </td> <td> <pre class="code"><span class="info file"># File 'lib/r509/ocsp/signer.rb', line 186</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_basic_response'>create_basic_response</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span><span class='id identifier rubyid_statuses'>statuses</span><span class='rparen'>)</span> - <span class='id identifier rubyid_basic_response'>basic_response</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>BasicResponse</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> + <span class='id identifier rubyid_basic_response'>basic_response</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>BasicResponse</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> - <span class='id identifier rubyid_basic_response'>basic_response</span><span class='period'>.</span><span class='id identifier rubyid_copy_nonce'>copy_nonce</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@copy_nonce</span> + <span class='id identifier rubyid_basic_response'>basic_response</span><span class='period'>.</span><span class='id identifier rubyid_copy_nonce'>copy_nonce</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@copy_nonce</span> - <span class='id identifier rubyid_statuses'>statuses</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_status'>status</span><span class='op'>|</span> - <span class='comment'>#revocation time is retarded and is relative to now, so -</span> <span class='comment'>#let's figure out what that is. -</span> <span class='kw'>if</span> <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>V_CERTSTATUS_REVOKED</span> - <span class='id identifier rubyid_revocation_time'>revocation_time</span> <span class='op'>=</span> <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:revocation_time</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>-</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> - <span class='kw'>end</span> - <span class='id identifier rubyid_basic_response'>basic_response</span><span class='period'>.</span><span class='id identifier rubyid_add_status'>add_status</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:certid</span><span class='rbracket'>]</span><span class='comma'>,</span> - <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span><span class='comma'>,</span> - <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:revocation_reason</span><span class='rbracket'>]</span><span class='comma'>,</span> - <span class='id identifier rubyid_revocation_time'>revocation_time</span><span class='comma'>,</span> - <span class='op'>-</span><span class='int'>1</span><span class='op'>*</span><span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:config</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_start_skew_seconds'>ocsp_start_skew_seconds</span><span class='comma'>,</span> - <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:config</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_validity_hours'>ocsp_validity_hours</span><span class='op'>*</span><span class='int'>3600</span><span class='comma'>,</span> - <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='comment'>#array of OpenSSL::X509::Extensions -</span> <span class='rparen'>)</span> + <span class='id identifier rubyid_statuses'>statuses</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_status'>status</span><span class='op'>|</span> + <span class='comment'>#revocation time is retarded and is relative to now, so +</span> <span class='comment'>#let's figure out what that is. +</span> <span class='kw'>if</span> <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>V_CERTSTATUS_REVOKED</span> + <span class='id identifier rubyid_revocation_time'>revocation_time</span> <span class='op'>=</span> <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:revocation_time</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>-</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>end</span> + <span class='id identifier rubyid_basic_response'>basic_response</span><span class='period'>.</span><span class='id identifier rubyid_add_status'>add_status</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:certid</span><span class='rbracket'>]</span><span class='comma'>,</span> + <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span><span class='comma'>,</span> + <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:revocation_reason</span><span class='rbracket'>]</span><span class='comma'>,</span> + <span class='id identifier rubyid_revocation_time'>revocation_time</span><span class='comma'>,</span> + <span class='op'>-</span><span class='int'>1</span><span class='op'>*</span><span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:config</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_start_skew_seconds'>ocsp_start_skew_seconds</span><span class='comma'>,</span> + <span class='id identifier rubyid_status'>status</span><span class='lbracket'>[</span><span class='symbol'>:config</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_validity_hours'>ocsp_validity_hours</span><span class='op'>*</span><span class='int'>3600</span><span class='comma'>,</span> + <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='comment'>#array of OpenSSL::X509::Extensions +</span> <span class='rparen'>)</span> + <span class='kw'>end</span> - <span class='comment'>#this method assumes the request data is validated by validate_request so all configs will be the same and -</span> <span class='comment'>#we can choose to use the first one safely -</span> <span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_statuses'>statuses</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:config</span><span class='rbracket'>]</span> + <span class='comment'>#this method assumes the request data is validated by validate_request so all configs will be the same and +</span> <span class='comment'>#we can choose to use the first one safely +</span> <span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_statuses'>statuses</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:config</span><span class='rbracket'>]</span> - <span class='comment'>#confusing, but R509::Cert contains R509::PrivateKey under #key. PrivateKey#key gives the OpenSSL object -</span> <span class='comment'>#turns out BasicResponse#sign can take up to 4 params -</span> <span class='comment'>#cert, key, array of OpenSSL::X509::Certificates, flags (not sure what the enumeration of those are) -</span> <span class='id identifier rubyid_basic_response'>basic_response</span><span class='period'>.</span><span class='id identifier rubyid_sign'>sign</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span><span class='period'>.</span><span class='id identifier rubyid_cert'>cert</span><span class='comma'>,</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_chain'>ocsp_chain</span><span class='rparen'>)</span> + <span class='comment'>#confusing, but R509::Cert contains R509::PrivateKey under #key. PrivateKey#key gives the OpenSSL object +</span> <span class='comment'>#turns out BasicResponse#sign can take up to 4 params +</span> <span class='comment'>#cert, key, array of OpenSSL::X509::Certificates, flags (not sure what the enumeration of those are) +</span> <span class='id identifier rubyid_basic_response'>basic_response</span><span class='period'>.</span><span class='id identifier rubyid_sign'>sign</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span><span class='period'>.</span><span class='id identifier rubyid_cert'>cert</span><span class='comma'>,</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_ocsp_chain'>ocsp_chain</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -544,27 +544,27 @@ <td> <pre class="code"><span class="info file"># File 'lib/r509/ocsp/signer.rb', line 223</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_response'>create_response</span><span class='lparen'>(</span><span class='id identifier rubyid_response_status'>response_status</span><span class='comma'>,</span><span class='id identifier rubyid_basic_response'>basic_response</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span> - <span class='comment'># first arg is the response status code, comes from this list -</span> <span class='comment'># these can also be enumerated via OpenSSL::OCSP::RESPONSE_STATUS_* -</span> <span class='comment'>#OCSPResponseStatus ::= ENUMERATED { -</span> <span class='comment'># successful (0), --Response has valid confirmations -</span> <span class='comment'># malformedRequest (1), --Illegal confirmation request -</span> <span class='comment'># internalError (2), --Internal error in issuer -</span> <span class='comment'># tryLater (3), --Try again later -</span> <span class='comment'># --(4) is not used -</span> <span class='comment'># sigRequired (5), --Must sign the request -</span> <span class='comment'># unauthorized (6) --Request unauthorized -</span> <span class='comment'>#} -</span> <span class='comment'># -</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Ocsp</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> - <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span> - <span class='id identifier rubyid_response_status'>response_status</span><span class='comma'>,</span> <span class='id identifier rubyid_basic_response'>basic_response</span> - <span class='rparen'>)</span> + <span class='comment'># first arg is the response status code, comes from this list +</span> <span class='comment'># these can also be enumerated via OpenSSL::OCSP::RESPONSE_STATUS_* +</span> <span class='comment'>#OCSPResponseStatus ::= ENUMERATED { +</span> <span class='comment'># successful (0), --Response has valid confirmations +</span> <span class='comment'># malformedRequest (1), --Illegal confirmation request +</span> <span class='comment'># internalError (2), --Internal error in issuer +</span> <span class='comment'># tryLater (3), --Try again later +</span> <span class='comment'># --(4) is not used +</span> <span class='comment'># sigRequired (5), --Must sign the request +</span> <span class='comment'># unauthorized (6) --Request unauthorized +</span> <span class='comment'>#} +</span> <span class='comment'># +</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> + <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span> + <span class='id identifier rubyid_response_status'>response_status</span><span class='comma'>,</span> <span class='id identifier rubyid_basic_response'>basic_response</span> <span class='rparen'>)</span> + <span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -572,12 +572,12 @@ </div> </div> <div id="footer"> - Generated on Thu Nov 8 14:33:53 2012 by + Generated on Tue Apr 16 13:57:17 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.6.1 (ruby-1.9.3). </div> </body> </html> \ No newline at end of file