diff options
author | Michal Rokos <m.rokos@sh.cvut.cz> | 2001-11-18 19:00:06 +0000 |
---|---|---|
committer | Michal Rokos <m.rokos@sh.cvut.cz> | 2001-11-18 19:00:06 +0000 |
commit | dd5dc9508d397e96ee4aa849f411567e78b49e32 (patch) | |
tree | da9f0f10e1cb9c0c4533b7fd28a071ff82c22154 /ossl.c | |
parent | 48053b2987e812c63e1c5dd1d60d311886767ee3 (diff) | |
download | ruby-openssl-history-dd5dc9508d397e96ee4aa849f411567e78b49e32.tar.gz |
Released as 0.0.9
Diffstat (limited to 'ossl.c')
-rw-r--r-- | ossl.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -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? */ } /* |