aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_ssl_session.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-13 07:45:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-13 07:45:35 +0000
commit1f46af14e48e2bcd86e02ac015b985f9841d1189 (patch)
tree6502f50561c7f56eee434fe105ccdc8efc53019b /ext/openssl/ossl_ssl_session.c
parent9300355bec6c21ae165be18ad116ce8651f95e8e (diff)
downloadruby-1f46af14e48e2bcd86e02ac015b985f9841d1189.tar.gz
* ext/openssl/openssl_missing.h (i2d_of_void): cast for callbacks.
[ruby-core:22860] * ext/openssl/ossl_engine.c (ossl_engine_s_by_id): suppress a warning. * ext/openssl/ossl_ssl.c (ossl_sslctx_flush_sessions): time_t may be larger than long. * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_get_time), (ossl_ssl_session_get_timeout): use TIMET2NUM() to convert time_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_ssl_session.c')
-rw-r--r--ext/openssl/ossl_ssl_session.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl_ssl_session.c b/ext/openssl/ossl_ssl_session.c
index b236e4d5f6..d5fdba6aed 100644
--- a/ext/openssl/ossl_ssl_session.c
+++ b/ext/openssl/ossl_ssl_session.c
@@ -107,7 +107,7 @@ static VALUE ossl_ssl_session_get_time(VALUE self)
if (t == 0)
return Qnil;
- return rb_funcall(rb_cTime, rb_intern("at"), 1, LONG2NUM(t));
+ return rb_funcall(rb_cTime, rb_intern("at"), 1, TIMET2NUM(t));
}
/*
@@ -126,14 +126,14 @@ static VALUE ossl_ssl_session_get_timeout(VALUE self)
t = SSL_SESSION_get_timeout(ctx);
- return ULONG2NUM(t);
+ return TIMET2NUM(t);
}
#define SSLSESSION_SET_TIME(func) \
static VALUE ossl_ssl_session_set_##func(VALUE self, VALUE time_v) \
{ \
SSL_SESSION *ctx; \
- time_t t; \
+ unsigned long t; \
\
GetSSLSession(self, ctx); \
\