diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-04 00:21:31 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-04 00:21:31 +0000 |
commit | 7d6e215393998909178ee92c4733d33f83306cb7 (patch) | |
tree | 6d33595e38c71b1cadf2f00cc2944004cb143653 /ext/openssl/ossl_asn1.c | |
parent | 8e1714488ae78589741991ba7cc72b1c9e3e4028 (diff) | |
download | ruby-7d6e215393998909178ee92c4733d33f83306cb7.tar.gz |
* ext/openssl/ossl_asn1.c (asn1time_to_time): should check that
the underlying value of ASN1_TIME isn't NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_asn1.c')
-rw-r--r-- | ext/openssl/ossl_asn1.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c index 02d2f2cafb..f0d8dda9b8 100644 --- a/ext/openssl/ossl_asn1.c +++ b/ext/openssl/ossl_asn1.c @@ -28,9 +28,7 @@ asn1time_to_time(ASN1_TIME *time) struct tm tm; VALUE argv[6]; - if (!time) { - ossl_raise(rb_eTypeError, "ASN1_TIME is NULL!"); - } + if (!time || !time->data) return Qnil; memset(&tm, 0, sizeof(struct tm)); switch (time->type) { |