diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-10-17 21:16:54 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-10-17 21:16:54 +0900 |
commit | 0c12273a7174d300bad342a053186ae172d2952d (patch) | |
tree | bdc64bc3164b5d534717c7272a8d309a60021a76 /OpenSSL/Timestamp/Response.html | |
parent | ad2abc0cd93977a35565178a3b4b4e50edbd8f0b (diff) | |
download | ruby-openssl-0c12273a7174d300bad342a053186ae172d2952d.tar.gz |
Sync with v2.2.1
Diffstat (limited to 'OpenSSL/Timestamp/Response.html')
-rw-r--r-- | OpenSSL/Timestamp/Response.html | 196 |
1 files changed, 14 insertions, 182 deletions
diff --git a/OpenSSL/Timestamp/Response.html b/OpenSSL/Timestamp/Response.html index e24542c8..166a9a74 100644 --- a/OpenSSL/Timestamp/Response.html +++ b/OpenSSL/Timestamp/Response.html @@ -21,8 +21,6 @@ <link href="../../css/rdoc.css" rel="stylesheet"> - - <body id="top" role="document" class="class"> <nav role="navigation"> <div id="project-navigation"> @@ -59,40 +57,30 @@ <div id="class-metadata"> - <div id="parent-class-section" class="nav-section"> + +<div id="parent-class-section" class="nav-section"> <h3>Parent</h3> - <p class="link">Object - </div> - <!-- Method Quickref --> + +<!-- Method Quickref --> <div id="method-list-section" class="nav-section"> <h3>Methods</h3> <ul class="link-list" role="directory"> - <li ><a href="#method-c-new">::new</a> - <li ><a href="#method-i-failure_info">#failure_info</a> - <li ><a href="#method-i-status">#status</a> - <li ><a href="#method-i-status_text">#status_text</a> - <li ><a href="#method-i-to_der">#to_der</a> - <li ><a href="#method-i-token">#token</a> - <li ><a href="#method-i-token_info">#token_info</a> - <li ><a href="#method-i-tsa_certificate">#tsa_certificate</a> - <li ><a href="#method-i-verify">#verify</a> - </ul> </div> @@ -110,90 +98,52 @@ </section> - <section id="5Buntitled-5D" class="documentation-section"> - - - <section class="constants-list"> <header> <h3>Constants</h3> </header> <dl> - <dt id="GRANTED">GRANTED - <dd><p>Indicates a successful response. Equal to <code>0</code>.</p> - - <dt id="GRANTED_WITH_MODS">GRANTED_WITH_MODS - <dd><p>Indicates a successful response that probably contains modifications from the initial request. Equal to <code>1</code>.</p> - - <dt id="REJECTION">REJECTION - <dd><p>Indicates a failure. No timestamp token was created. Equal to <code>2</code>.</p> - - <dt id="REVOCATION_NOTIFICATION">REVOCATION_NOTIFICATION - <dd><p>Indicates a failure. No timestamp token was created. A certificate has been revoked. Equal to <code>5</code>.</p> - - <dt id="REVOCATION_WARNING">REVOCATION_WARNING - <dd><p>Indicates a failure. No timestamp token was created. Revocation of a certificate is imminent. Equal to <code>4</code>.</p> - - <dt id="WAITING">WAITING - <dd><p>Indicates a failure. No timestamp token was created. Equal to <code>3</code>.</p> - - </dl> </section> - - - + <section id="public-class-5Buntitled-5D-method-details" class="method-section"> <header> <h3>Public Class Methods</h3> </header> - <div id="method-c-new" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> OpenSSL::Timestamp::Response.new(file) → response </span> - <span class="method-click-advice">click to toggle source</span> - </div> - <div class="method-heading"> <span class="method-callseq"> OpenSSL::Timestamp::Response.new(string) → response </span> - </div> - - <div class="method-description"> - - <p>Creates a <a href="Response.html"><code>Response</code></a> from a <code>File</code> or <code>string</code> parameter, the corresponding <code>File</code> or <code>string</code> must be DER-encoded. Please note that <a href="Response.html"><code>Response</code></a> is an immutable read-only class. If you'd like to create timestamps please refer to <a href="Factory.html"><code>Factory</code></a> instead.</p> - - + <p>Creates a <a href="Response.html"><code>Response</code></a> from a <code>File</code> or <code>string</code> parameter, the corresponding <code>File</code> or <code>string</code> must be DER-encoded. Please note that <a href="Response.html"><code>Response</code></a> is an immutable read-only class. If you’d like to create timestamps please refer to <a href="Factory.html"><code>Factory</code></a> instead.</p> - <div class="method-source-code" id="new-source"> <pre>static VALUE ossl_ts_resp_initialize(VALUE self, VALUE der) @@ -205,46 +155,36 @@ ossl_ts_resp_initialize(VALUE self, VALUE der) in = ossl_obj2bio(&der); ts_resp = d2i_TS_RESP_bio(in, &ts_resp); BIO_free(in); - if (!ts_resp) + if (!ts_resp) { + DATA_PTR(self) = NULL; ossl_raise(eTimestampError, "Error when decoding the timestamp response"); + } DATA_PTR(self) = ts_resp; return self; }</pre> </div> - </div> - - </div> - </section> - + <section id="public-instance-5Buntitled-5D-method-details" class="method-section"> <header> <h3>Public Instance Methods</h3> </header> - <div id="method-i-failure_info" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> failure_info → nil or symbol </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>In cases no timestamp token has been created, this field contains further info about the reason why response creation failed. The method returns either nil (the request was successful and a timestamp token was created) or one of the following:</p> <ul><li> <p>:BAD_ALG - Indicates that the timestamp server rejects the message imprint algorithm used in the <a href="Request.html"><code>Request</code></a></p> @@ -263,10 +203,7 @@ ossl_ts_resp_initialize(VALUE self, VALUE der) </li><li> <p>:SYSTEM_FAILURE - <a href="../Timestamp.html"><code>Timestamp</code></a> creation failed due to an internal error that occurred on the timestamp server</p> </li></ul> - - - <div class="method-source-code" id="failure_info-source"> <pre>static VALUE ossl_ts_resp_get_failure_info(VALUE self) @@ -307,36 +244,22 @@ ossl_ts_resp_get_failure_info(VALUE self) ossl_raise(eTimestampError, "Unrecognized failure info."); }</pre> </div> - </div> - - </div> - <div id="method-i-status" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> status → BN (never nil) </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>Returns one of <a href="Response.html#GRANTED"><code>GRANTED</code></a>, <a href="Response.html#GRANTED_WITH_MODS"><code>GRANTED_WITH_MODS</code></a>, <a href="Response.html#REJECTION"><code>REJECTION</code></a>, <a href="Response.html#WAITING"><code>WAITING</code></a>, <a href="Response.html#REVOCATION_WARNING"><code>REVOCATION_WARNING</code></a> or <a href="Response.html#REVOCATION_NOTIFICATION"><code>REVOCATION_NOTIFICATION</code></a>. A timestamp token has been created only in case <code>status</code> is equal to <a href="Response.html#GRANTED"><code>GRANTED</code></a> or <a href="Response.html#GRANTED_WITH_MODS"><code>GRANTED_WITH_MODS</code></a>.</p> - - - <div class="method-source-code" id="status-source"> <pre>static VALUE ossl_ts_resp_get_status(VALUE self) @@ -352,36 +275,22 @@ ossl_ts_resp_get_status(VALUE self) return asn1integer_to_num(st); }</pre> </div> - </div> - - </div> - <div id="method-i-status_text" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> status_text → Array of strings or nil </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>In cases of failure this field may contain an array of strings further describing the origin of the failure.</p> - - - <div class="method-source-code" id="status_text-source"> <pre>static VALUE ossl_ts_resp_get_status_text(VALUE self) @@ -405,36 +314,22 @@ ossl_ts_resp_get_status_text(VALUE self) return ret; }</pre> </div> - </div> - - </div> - <div id="method-i-to_der" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> to_der → string </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>Returns the <a href="Response.html"><code>Response</code></a> in DER-encoded form.</p> - - - <div class="method-source-code" id="to_der-source"> <pre>static VALUE ossl_ts_resp_to_der(VALUE self) @@ -445,36 +340,22 @@ ossl_ts_resp_to_der(VALUE self) return asn1_to_der((void *)resp, (int (*)(void *, unsigned char **))i2d_TS_RESP); }</pre> </div> - </div> - - </div> - <div id="method-i-token" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> token → nil or OpenSSL::PKCS7 </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>If a timestamp token is present, this returns it in the form of a <a href="../PKCS7.html"><code>OpenSSL::PKCS7</code></a>.</p> - - - <div class="method-source-code" id="token-source"> <pre>static VALUE ossl_ts_resp_get_token(VALUE self) @@ -497,36 +378,22 @@ ossl_ts_resp_get_token(VALUE self) return obj; }</pre> </div> - </div> - - </div> - <div id="method-i-token_info" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> token_info → nil or OpenSSL::Timestamp::TokenInfo </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - <p>Get the response's token info if present.</p> - - + <p>Get the response’s token info if present.</p> - <div class="method-source-code" id="token_info-source"> <pre>static VALUE ossl_ts_resp_get_token_info(VALUE self) @@ -549,36 +416,22 @@ ossl_ts_resp_get_token_info(VALUE self) return obj; }</pre> </div> - </div> - - </div> - <div id="method-i-tsa_certificate" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> tsa_certificate → OpenSSL::X509::Certificate or nil </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>If the <a href="Request.html"><code>Request</code></a> specified to request the TSA certificate (Request#cert_requested = true), then this field contains the certificate of the timestamp authority.</p> - - - <div class="method-source-code" id="tsa_certificate-source"> <pre>static VALUE ossl_ts_resp_get_tsa_certificate(VALUE self) @@ -598,52 +451,36 @@ ossl_ts_resp_get_tsa_certificate(VALUE self) return ossl_x509_new(cert); }</pre> </div> - </div> - - </div> - <div id="method-i-verify" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> verify(Request, root_store) → Response </span> - <span class="method-click-advice">click to toggle source</span> - </div> - <div class="method-heading"> <span class="method-callseq"> verify(Request, root_store, [intermediate_cert]) → Response </span> - </div> - - <div class="method-description"> - <p>Verifies a timestamp token by checking the signature, validating the certificate chain implied by <a href="Response.html#method-i-tsa_certificate"><code>tsa_certificate</code></a> and by checking conformance to a given <a href="Request.html"><code>Request</code></a>. Mandatory parameters are the <a href="Request.html"><code>Request</code></a> associated to this <a href="Response.html"><code>Response</code></a>, and an <a href="../X509/Store.html"><code>OpenSSL::X509::Store</code></a> of trusted roots.</p> <p>Intermediate certificates can optionally be supplied for creating the certificate chain. These intermediate certificates must all be instances of <a href="../X509/Certificate.html"><code>OpenSSL::X509::Certificate</code></a>.</p> <p>If validation fails, several kinds of exceptions can be raised:</p> <ul><li> -<p>TypeError if types don't fit</p> +<p>TypeError if types don’t fit</p> </li><li> <p><a href="TimestampError.html"><code>TimestampError</code></a> if something is wrong with the timestamp token itself, if it is not conformant to the <a href="Request.html"><code>Request</code></a>, or if validation of the timestamp certificate chain fails.</p> </li></ul> - - - <div class="method-source-code" id="verify-source"> <pre>static VALUE ossl_ts_resp_verify(int argc, VALUE *argv, VALUE self) @@ -715,25 +552,20 @@ ossl_ts_resp_verify(int argc, VALUE *argv, VALUE self) return self; }</pre> </div> - </div> - - </div> - </section> - - </section> + </section> </main> <footer id="validator-badges" role="contentinfo"> <p><a href="https://validator.w3.org/check/referer">Validate</a> - <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1. + <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.2. <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>. </footer> |