diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-01 01:52:13 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-01 01:52:13 +0000 |
| commit | 46cc47ac774645edff721ab891d708c747136dc6 (patch) | |
| tree | 61fadfcf208ec07aa871ee247086ac7a446b804b /ext | |
| parent | ea15086782120615af50c8e29ce051956ec0b7cf (diff) | |
| download | ruby-46cc47ac774645edff721ab891d708c747136dc6.tar.gz ruby-46cc47ac774645edff721ab891d708c747136dc6.tar.xz ruby-46cc47ac774645edff721ab891d708c747136dc6.zip | |
* ext/openssl/extconf.rb: should check ERR_peek_last_error().
[ruby-dev:27597]
* ext/openssl/ossl.c (ossl_raise): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/openssl/extconf.rb | 1 | ||||
| -rw-r--r-- | ext/openssl/ossl.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index 2ced7f62c..f2fe9a40f 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -62,6 +62,7 @@ unless have_header("openssl/conf_api.h") end message "=== Checking for OpenSSL features... ===\n" +have_func("ERR_peek_last_error") have_func("BN_mod_add") have_func("BN_mod_sqr") have_func("BN_mod_sub") diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index b7eb79f05..a98f2641c 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -278,9 +278,14 @@ ossl_raise(VALUE exc, const char *fmt, ...) va_list args; char buf[BUFSIZ]; const char *msg; - long e = ERR_peek_last_error(); + long e; int len = 0; +#ifdef HAVE_ERR_PEEK_LAST_ERROR + e = ERR_peek_last_error(); +#else + e = ERR_peek_error(); +#endif if (fmt) { va_start(args, fmt); len = vsnprintf(buf, BUFSIZ, fmt, args); |
