1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext
rhe 102815b046 openssl: add OpenSSL::OCSP::SingleResponse
* ext/openssl/ossl_ocsp.c: Add OCSP::SingleResponse that represents an
  OCSP SingleResponse structure. Also add two new methods #responses
  and #find_response to OCSP::BasicResponse. A BasicResponse has one or
  more SingleResponse. We have OCSP::BasicResponse#status that returns
  them as an array of arrays, each containing the content of a
  SingleResponse, but this is not useful. When validating an OCSP
  response, we need to look into the each SingleResponse and check their
  validity but it is not simple. For example, when validating for a
  certificate 'cert', the code would be like:

    # certid_target is an OpenSSL::OCSP::CertificateId for cert
    basic = res.basic
    result = basic.status.any? do |ary|
      ary[0].cmp(certid_target) &&
        ary[4] <= Time.now && (!ary[5] || Time.now <= ary[5])
    end

  Adding OCSP::SingleResponse at the same time allows exposing
  OCSP_check_validity(). With this, the code above can be rewritten as:

    basic = res.basic
    single = basic.find_response(certid_target)
    result = single.check_validity

* test/openssl/test_ocsp.rb: Test this.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-19 12:26:27 +00:00
..
-test- string.c: return reallocated pointer 2016-05-30 07:20:28 +00:00
bigdecimal Integer conversion 2016-06-18 02:25:28 +00:00
cgi/escape cgi/util.rb: remove CGI::Util#_unescape 2016-04-20 08:33:33 +00:00
continuation handle ext/ as r53141 2015-12-16 05:31:54 +00:00
coverage Update dependencies. 2016-04-11 11:50:00 +00:00
date date_core.c: remove assert 2016-06-15 06:26:52 +00:00
dbm remove unnecessary volatiles 2016-05-23 04:31:55 +00:00
digest Update dependencies. 2016-04-11 11:50:00 +00:00
etc etc.c: retry with allocated string buffer 2016-06-02 12:21:42 +00:00
fcntl handle ext/ as r53141 2015-12-16 05:31:54 +00:00
fiber handle ext/ as r53141 2015-12-16 05:31:54 +00:00
fiddle fiddle/import.rb: suppress warnings 2016-04-11 04:28:16 +00:00
gdbm handle ext/ as r53141 2015-12-16 05:31:54 +00:00
io io/console: bump up 2016-04-15 06:15:54 +00:00
json Integer unification macro 2016-06-13 11:34:56 +00:00
mathn handle ext/ as r53141 2015-12-16 05:31:54 +00:00
nkf Update dependencies. 2016-04-11 11:50:00 +00:00
objspace ObjectSpace.dump_all: valid JSON 2016-06-11 05:04:22 +00:00
openssl openssl: add OpenSSL::OCSP::SingleResponse 2016-06-19 12:26:27 +00:00
pathname handle ext/ as r53141 2015-12-16 05:31:54 +00:00
psych stdlib: avoid extra calls to eliminate "\n" from Base64 2016-01-10 00:35:43 +00:00
pty pty.c: dry up 2016-04-30 01:12:52 +00:00
racc/cparse handle ext/ as r53141 2015-12-16 05:31:54 +00:00
rbconfig/sizeof rbconfig/sizeof: calculate at compilation time 2016-04-25 05:39:12 +00:00
readline Update dependencies. 2016-04-11 11:50:00 +00:00
ripper ripper: fix ripper.E 2016-04-25 07:56:06 +00:00
sdbm remove unnecessary volatiles 2016-05-23 04:31:55 +00:00
socket * ext/socket/raddrinfo.c (host_str, port_str): Use StringValueCStr 2016-05-30 15:33:06 +00:00
stringio stringio.c: fix index overflow 2016-06-17 23:52:48 +00:00
strscan Update dependencies. 2016-04-11 11:50:00 +00:00
syslog Update dependencies. 2016-04-11 11:50:00 +00:00
tk tcltklib.c: elimitate dead code 2016-05-23 04:40:43 +00:00
win32 registry.rb: fix API names 2016-04-10 11:54:17 +00:00
win32ole win32ole.c: share the content 2016-05-20 12:17:14 +00:00
zlib Unnecessary checks 2016-06-17 08:45:05 +00:00
.document
extmk.rb Fix static-linked-ext encodings 2016-06-18 01:13:39 +00:00
Setup ext/thread: remove 2016-04-30 02:56:17 +00:00
Setup.atheos cgi/escape: Optimize CGI.escapeHTML 2015-12-20 11:54:54 +00:00
Setup.nacl cgi/escape: Optimize CGI.escapeHTML 2015-12-20 11:54:54 +00:00
Setup.nt cgi/escape: Optimize CGI.escapeHTML 2015-12-20 11:54:54 +00:00