aboutsummaryrefslogtreecommitdiffstats
path: root/ossl.c
diff options
context:
space:
mode:
authorMichal Rokos <m.rokos@sh.cvut.cz>2002-07-09 16:15:13 +0000
committerMichal Rokos <m.rokos@sh.cvut.cz>2002-07-09 16:15:13 +0000
commit22a76c4b995c9bc5df10fc6f3493ddf4e8263365 (patch)
tree50ecd0f752baa9f32ca6296d6c4e7ea7a492e04a /ossl.c
parent3d2cb9ce8241f8891d89e5f2247d065342661f13 (diff)
downloadruby-openssl-history-22a76c4b995c9bc5df10fc6f3493ddf4e8263365.tar.gz
Minor cleanups (use RSTRING after StringValue)
Diffstat (limited to 'ossl.c')
-rw-r--r--ossl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ossl.c b/ossl.c
index c276dd5..0b20b99 100644
--- a/ossl.c
+++ b/ossl.c
@@ -56,7 +56,7 @@ asn1time_to_time(ASN1_TIME *time)
struct tm tm;
if (!time) {
- rb_bug("ASN1_TIME is NULL!");
+ ossl_raise(rb_eTypeError, "ASN1_TIME is NULL!");
}
memset(&tm, 0, sizeof(struct tm));
@@ -102,7 +102,7 @@ string2hex(char *buf, int buf_len, char **hexbuf, int *hexbuf_len)
if (buf_len < 0 || len < buf_len) { /* PARANOIA? */
return -1;
}
- if (!hexbuf) {
+ if (!hexbuf) { /* if no buf, return calculated len */
if (hexbuf_len) {
*hexbuf_len = len;
}
@@ -162,6 +162,7 @@ ossl_raise(VALUE exc, const char *fmt, ...)
* Debug
*/
VALUE dOSSL;
+
#if defined(NT)
void ossl_debug(const char *fmt, ...)
{