diff options
Diffstat (limited to 'OpenSSL/X509/StoreContext.html')
-rw-r--r-- | OpenSSL/X509/StoreContext.html | 256 |
1 files changed, 23 insertions, 233 deletions
diff --git a/OpenSSL/X509/StoreContext.html b/OpenSSL/X509/StoreContext.html index e5f33ea2..2ed03771 100644 --- a/OpenSSL/X509/StoreContext.html +++ b/OpenSSL/X509/StoreContext.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,50 +57,35 @@ <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-chain">#chain</a> - <li ><a href="#method-i-cleanup">#cleanup</a> - <li ><a href="#method-i-current_cert">#current_cert</a> - <li ><a href="#method-i-current_crl">#current_crl</a> - <li ><a href="#method-i-error">#error</a> - <li ><a href="#method-i-error-3D">#error=</a> - <li ><a href="#method-i-error_depth">#error_depth</a> - <li ><a href="#method-i-error_string">#error_string</a> - <li ><a href="#method-i-flags-3D">#flags=</a> - <li ><a href="#method-i-purpose-3D">#purpose=</a> - <li ><a href="#method-i-time-3D">#time=</a> - <li ><a href="#method-i-trust-3D">#trust=</a> - <li ><a href="#method-i-verify">#verify</a> - </ul> </div> @@ -120,44 +103,28 @@ </section> - <section id="5Buntitled-5D" class="documentation-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"> - new(store, cert = nil, chain = nil) + new(store, cert = nil, untrusted = nil) </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - - - + <p>Sets up a <a href="StoreContext.html"><code>StoreContext</code></a> for a verification of the X.509 certificate <em>cert</em>.</p> - <div class="method-source-code" id="new-source"> <pre>static VALUE ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self) @@ -167,15 +134,24 @@ ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self) X509_STORE *x509st; X509 *x509 = NULL; STACK_OF(X509) *x509s = NULL; + int state; rb_scan_args(argc, argv, "12", &store, &cert, &chain); GetX509StCtx(self, ctx); GetX509Store(store, x509st); - if(!NIL_P(cert)) x509 = DupX509CertPtr(cert); /* NEED TO DUP */ - if(!NIL_P(chain)) x509s = ossl_x509_ary2sk(chain); - if(X509_STORE_CTX_init(ctx, x509st, x509, x509s) != 1){ + if (!NIL_P(cert)) + x509 = DupX509CertPtr(cert); /* NEED TO DUP */ + if (!NIL_P(chain)) { + x509s = ossl_protect_x509_ary2sk(chain, &state); + if (state) { + X509_free(x509); + rb_jump_tag(state); + } + } + if (X509_STORE_CTX_init(ctx, x509st, x509, x509s) != 1){ + X509_free(x509); sk_X509_pop_free(x509s, X509_free); - ossl_raise(eX509StoreError, NULL); + ossl_raise(eX509StoreError, "X509_STORE_CTX_init"); } if (!NIL_P(t = rb_iv_get(store, "@time"))) ossl_x509stctx_set_time(self, t); @@ -185,44 +161,29 @@ ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self) 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-chain" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> chain → Array of X509::Certificate </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - - - <div class="method-source-code" id="chain-source"> <pre>static VALUE ossl_x509stctx_get_chain(VALUE self) @@ -250,69 +211,43 @@ ossl_x509stctx_get_chain(VALUE self) return ary; }</pre> </div> - </div> - - </div> - <div id="method-i-cleanup" class="method-detail "> - <div class="method-heading"> <span class="method-name">cleanup</span><span class="method-args">()</span> - <span class="method-click-advice">click to toggle source</span> - </div> - <div class="method-description"> - - - - <div class="method-source-code" id="cleanup-source"> <pre><span class="ruby-comment"># File lib/openssl/x509.rb, line 319</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cleanup</span> <span class="ruby-identifier">warn</span> <span class="ruby-node">"(#{caller.first}) OpenSSL::X509::StoreContext#cleanup is deprecated with no replacement"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">$VERBOSE</span> <span class="ruby-keyword">end</span></pre> </div> - </div> - - </div> - <div id="method-i-current_cert" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> current_cert → X509::Certificate </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - - - <div class="method-source-code" id="current_cert-source"> <pre>static VALUE ossl_x509stctx_get_curr_cert(VALUE self) @@ -324,36 +259,22 @@ ossl_x509stctx_get_curr_cert(VALUE self) return ossl_x509_new(X509_STORE_CTX_get_current_cert(ctx)); }</pre> </div> - </div> - - </div> - <div id="method-i-current_crl" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> current_crl → X509::CRL </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - - - <div class="method-source-code" id="current_crl-source"> <pre>static VALUE ossl_x509stctx_get_curr_crl(VALUE self) @@ -369,36 +290,22 @@ ossl_x509stctx_get_curr_crl(VALUE self) return ossl_x509crl_new(crl); }</pre> </div> - </div> - - </div> - <div id="method-i-error" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> error → Integer </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - - - <div class="method-source-code" id="error-source"> <pre>static VALUE ossl_x509stctx_get_err(VALUE self) @@ -410,36 +317,22 @@ ossl_x509stctx_get_err(VALUE self) return INT2NUM(X509_STORE_CTX_get_error(ctx)); }</pre> </div> - </div> - - </div> - <div id="method-i-error-3D" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> error = error_code </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - - - <div class="method-source-code" id="error-3D-source"> <pre>static VALUE ossl_x509stctx_set_error(VALUE self, VALUE err) @@ -452,36 +345,22 @@ ossl_x509stctx_set_error(VALUE self, VALUE err) return err; }</pre> </div> - </div> - - </div> - <div id="method-i-error_depth" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> error_depth → Integer </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - - - <div class="method-source-code" id="error_depth-source"> <pre>static VALUE ossl_x509stctx_get_err_depth(VALUE self) @@ -493,36 +372,22 @@ ossl_x509stctx_get_err_depth(VALUE self) return INT2NUM(X509_STORE_CTX_get_error_depth(ctx)); }</pre> </div> - </div> - - </div> - <div id="method-i-error_string" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> error_string → String </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>Returns the error string corresponding to the error code retrieved by <a href="StoreContext.html#method-i-error"><code>error</code></a>.</p> - - - <div class="method-source-code" id="error_string-source"> <pre>static VALUE ossl_x509stctx_get_err_string(VALUE self) @@ -536,36 +401,22 @@ ossl_x509stctx_get_err_string(VALUE self) return rb_str_new2(X509_verify_cert_error_string(err)); }</pre> </div> - </div> - - </div> - <div id="method-i-flags-3D" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> flags = flags </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>Sets the verification flags to the context. See <a href="Store.html#method-i-flags-3D"><code>Store#flags=</code></a>.</p> - - - <div class="method-source-code" id="flags-3D-source"> <pre>static VALUE ossl_x509stctx_set_flags(VALUE self, VALUE flags) @@ -579,36 +430,22 @@ ossl_x509stctx_set_flags(VALUE self, VALUE flags) return flags; }</pre> </div> - </div> - - </div> - <div id="method-i-purpose-3D" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> purpose = purpose </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>Sets the purpose of the context. See <a href="Store.html#method-i-purpose-3D"><code>Store#purpose=</code></a>.</p> - - - <div class="method-source-code" id="purpose-3D-source"> <pre>static VALUE ossl_x509stctx_set_purpose(VALUE self, VALUE purpose) @@ -622,36 +459,22 @@ ossl_x509stctx_set_purpose(VALUE self, VALUE purpose) return purpose; }</pre> </div> - </div> - - </div> - <div id="method-i-time-3D" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> time = time </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - <p>Sets the time used in the verification. If not set, the current time is used.</p> - - - <div class="method-source-code" id="time-3D-source"> <pre>static VALUE ossl_x509stctx_set_time(VALUE self, VALUE time) @@ -666,36 +489,22 @@ ossl_x509stctx_set_time(VALUE self, VALUE time) return time; }</pre> </div> - </div> - - </div> - <div id="method-i-trust-3D" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> trust = trust </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - - - <div class="method-source-code" id="trust-3D-source"> <pre>static VALUE ossl_x509stctx_set_trust(VALUE self, VALUE trust) @@ -709,36 +518,22 @@ ossl_x509stctx_set_trust(VALUE self, VALUE trust) return trust; }</pre> </div> - </div> - - </div> - <div id="method-i-verify" class="method-detail "> - - <div class="method-heading"> <span class="method-callseq"> verify → true | false </span> - <span class="method-click-advice">click to toggle source</span> - </div> - - <div class="method-description"> - - - - <div class="method-source-code" id="verify-source"> <pre>static VALUE ossl_x509stctx_verify(VALUE self) @@ -760,25 +555,20 @@ ossl_x509stctx_verify(VALUE 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> |