diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-14 21:46:08 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-14 21:46:08 +0000 |
commit | fb7a337e97db438d11dd48a33e9fd75483eefed8 (patch) | |
tree | ccc5f089cd1731d9e5d416266070bd6bb0bfbb08 /ext/openssl | |
parent | 54e1affd1639943531cad80cb0db1f83c2acec35 (diff) | |
download | ruby-fb7a337e97db438d11dd48a33e9fd75483eefed8.tar.gz |
* etc/openssl/ossl_ssl.c (ossl_ssl_get_cert): raise exception if
pointer is invalid. Thanks Ippei Obayashi! [ruby-dev:42573]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/ossl_ssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index a690202258..ea6e04b55a 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -1337,7 +1337,7 @@ ossl_ssl_get_cert(VALUE self) X509 *cert = NULL; Data_Get_Struct(self, SSL, ssl); - if (ssl) { + if (!ssl) { rb_warning("SSL session is not started yet."); return Qnil; } |