aboutsummaryrefslogtreecommitdiffstats
path: root/ossl.c
diff options
context:
space:
mode:
authorMichal Rokos <m.rokos@sh.cvut.cz>2001-11-18 19:00:06 +0000
committerMichal Rokos <m.rokos@sh.cvut.cz>2001-11-18 19:00:06 +0000
commitdd5dc9508d397e96ee4aa849f411567e78b49e32 (patch)
treeda9f0f10e1cb9c0c4533b7fd28a071ff82c22154 /ossl.c
parent48053b2987e812c63e1c5dd1d60d311886767ee3 (diff)
downloadruby-openssl-history-dd5dc9508d397e96ee4aa849f411567e78b49e32.tar.gz
Released as 0.0.9
Diffstat (limited to 'ossl.c')
-rw-r--r--ossl.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/ossl.c b/ossl.c
index bb738b6..59a5bef 100644
--- a/ossl.c
+++ b/ossl.c
@@ -19,6 +19,23 @@ void ossl_check_type(VALUE obj, VALUE klass)
}
}
+/*
+ * Debug prints
+#ifdef OSSL_DEBUG
+inline char *ossl_error() {
+ char *ret = NULL, *err = NULL;
+ int err_len = NULL;
+
+ err = ERR_error_string(ERR_get_error(), NULL);
+ ret = malloc(strlen(err)+strlen(__FILE__)+(sizeof(__LINE__)*3)+5);
+ sprintf(ret, "%s [%s:%d]", err, __FILE__, __LINE__);
+
+ return ret;
+}
+#else
+#define ossl_error() ERR_error_string(ERR_get_error(), NULL)
+#endif
+ */
char *ossl_error(void)
{
return ERR_error_string(ERR_get_error(), NULL);
@@ -42,8 +59,8 @@ VALUE asn1time_to_time(ASN1_UTCTIME *time)
default:
rb_raise(rb_eTypeError, "unknown time format");
}
-
- return rb_time_new(mktime(&tm), 0);
+ /*return rb_time_new(mktime(gmtime(mktime(&tm))), 0); /* Is this correct? */
+ return rb_time_new(mktime(&tm), 0); /* or this one? */
}
/*