From: Martin Bosslet <Martin.Bosslet@...>
Date: 2011-06-14T19:27:21+09:00
Subject: [ruby-core:37134] [Ruby 1.9 - Bug #4885][Assigned] [ext/openssl] Use BIO_reset and ERR_get_error in conjuntion


Issue #4885 has been reported by Martin Bosslet.

----------------------------------------
Bug #4885: [ext/openssl] Use BIO_reset and ERR_get_error in conjuntion
http://redmine.ruby-lang.org/issues/4885

Author: Martin Bosslet
Status: Assigned
Priority: Normal
Assignee: Martin Bosslet
Category: ext
Target version: 1.9.3
ruby -v: trunk


This is related to the bug in http://redmine.ruby-lang.org/issues/4879.

There are still some places in Ruby OpenSSL C code where just BIO_reset
is used but not ERR_get_error if a fallback from PEM to DER is tried or
the other way round. This might cause encoding errors to pile up and
mislead users or cause tests to fail that shouldn't.

I'd like to expose the conjunction of 

BIO_reset(bio);
ERR_get_error();

as a publicly accesible macro (similar to what's in ossl_pkey.c) and
replace existing code by using it where appropriate.

Please let me know if you have any objections!

Regards,
Martin



-- 
http://redmine.ruby-lang.org