Class/Module Index [+]



Public Instance Methods

check_validity(issuer_cert = nil, time = click to toggle source

Check the validity of this certificate.

               # File rubygems/gem_openssl.rb, line 51
def check_validity(issuer_cert = nil, time =
  ret = if @not_before && @not_before > time
          [false, :expired, "not valid before '#@not_before'"]
        elsif @not_after && @not_after < time
          [false, :expired, "not valid after '#@not_after'"]
        elsif issuer_cert && !verify(issuer_cert.public_key)
          [false, :issuer, "#{issuer_cert.subject} is not issuer"]
          [true, :ok, 'Valid certificate']

  # return hash
  { :is_valid => ret[0], :error => ret[1], :desc => ret[2] }

Commenting is here to help enhance the documentation. For example, sample code, or clarification of the documentation.

If you are posting code samples in your comments, please wrap them in "<pre><code class="ruby" > ... </code></pre>" markup in order to get syntax highlighting.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file a bug report so that it can be corrected for the next release. Thank you.

blog comments powered by Disqus