mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_x509store.c (ossl_x509stctx_set_time): should
not set internal flag directry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2530fa50e9
commit
313799a022
2 changed files with 12 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat May 28 05:15:44 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* ext/openssl/ossl_x509store.c (ossl_x509stctx_set_time): should
|
||||
not set internal flag directry.
|
||||
|
||||
Sat May 28 02:00:11 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line):
|
||||
|
|
|
@ -358,7 +358,7 @@ static VALUE ossl_x509stctx_set_time(VALUE, VALUE);
|
|||
static VALUE
|
||||
ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
VALUE store, cert, chain;
|
||||
VALUE store, cert, chain, t;
|
||||
X509_STORE_CTX *ctx;
|
||||
X509_STORE *x509st;
|
||||
X509 *x509 = NULL;
|
||||
|
@ -380,7 +380,8 @@ ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self)
|
|||
ossl_x509stctx_set_purpose(self, rb_iv_get(store, "@purpose"));
|
||||
ossl_x509stctx_set_trust(self, rb_iv_get(store, "@trust"));
|
||||
#endif
|
||||
ossl_x509stctx_set_time(self, rb_iv_get(store, "@time"));
|
||||
if (!NIL_P(t = rb_iv_get(store, "@time")))
|
||||
ossl_x509stctx_set_time(self, t);
|
||||
rb_iv_set(self, "@verify_callback", rb_iv_get(store, "@verify_callback"));
|
||||
rb_iv_set(self, "@cert", cert);
|
||||
|
||||
|
@ -546,17 +547,11 @@ static VALUE
|
|||
ossl_x509stctx_set_time(VALUE self, VALUE time)
|
||||
{
|
||||
X509_STORE_CTX *store;
|
||||
long t;
|
||||
|
||||
if(NIL_P(time)) {
|
||||
GetX509StCtx(self, store);
|
||||
store->flags &= ~X509_V_FLAG_USE_CHECK_TIME;
|
||||
}
|
||||
else {
|
||||
long t = NUM2LONG(rb_Integer(time));
|
||||
|
||||
GetX509StCtx(self, store);
|
||||
X509_STORE_CTX_set_time(store, 0, t);
|
||||
}
|
||||
t = NUM2LONG(rb_Integer(time));
|
||||
GetX509StCtx(self, store);
|
||||
X509_STORE_CTX_set_time(store, 0, t);
|
||||
|
||||
return time;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue