mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
830c3a1409
* ext/openssl/ossl_ocsp.c (ossl_ocspbres_add_status): Allow specifying the times (thisUpdate, nextUpdate and revocationTime) with Time objects. Currently they accepts only relative seconds from the current time. This is inconvenience, especially for revocationTime. When Integer is passed, they are still treated as relative times. Since the type check is currently done with rb_Integer(), this is a slightly incompatible change. Hope no one passes a relative time as String or Time object... Also, allow passing nil as nextUpdate. It is optional. * ext/openssl/ruby_missing.h: Define RB_INTEGER_TYPE_P() if not defined. openssl gem will be released before Ruby 2.4.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
32 lines
747 B
C
32 lines
747 B
C
/*
|
|
* 'OpenSSL for Ruby' project
|
|
* Copyright (C) 2001-2003 Michal Rokos <m.rokos@sh.cvut.cz>
|
|
* All rights reserved.
|
|
*/
|
|
/*
|
|
* This program is licensed under the same licence as Ruby.
|
|
* (See the file 'LICENCE'.)
|
|
*/
|
|
#if !defined(_OSSL_RUBY_MISSING_H_)
|
|
#define _OSSL_RUBY_MISSING_H_
|
|
|
|
#define rb_define_copy_func(klass, func) \
|
|
rb_define_method((klass), "initialize_copy", (func), 1)
|
|
|
|
|
|
#ifndef GetReadFile
|
|
#define FPTR_TO_FD(fptr) ((fptr)->fd)
|
|
#else
|
|
#define FPTR_TO_FD(fptr) (fileno(GetReadFile(fptr)))
|
|
#endif
|
|
|
|
#ifndef HAVE_RB_IO_T
|
|
#define rb_io_t OpenFile
|
|
#endif
|
|
|
|
#ifndef RB_INTEGER_TYPE_P
|
|
/* for Ruby 2.3 compatibility */
|
|
#define RB_INTEGER_TYPE_P(obj) (RB_FIXNUM_P(obj) || RB_TYPE_P(obj, T_BIGNUM))
|
|
#endif
|
|
|
|
#endif /* _OSSL_RUBY_MISSING_H_ */
|