This issue was solved with changeset r32076.
Akio, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
My guess was that some uncleared error caused this
when several tests are run in sequence.
I briefly checked and there are still fallback scenarios
in Ruby OpenSSL code where something is first interpreted
as PEM and then as DER or the other way round. This way
such an error as described is put into OpenSSL's own error
queue. Most C code now uses
BIO_reset(bio);
ERR_get_error();
in conjunction now. For the those places and the remaining
code that does not yet I'd propose to expose this functionality
as a public macro and I would use it where appropriate. This
would prevent test failures as described here in the future.
What do you think?
Regards,
Martin
PS: I opened a new issue for this (http://redmine.ruby-lang.org/issues/4885)
so that the others are also aware and can intervene should they have any
doubts or objections.
My guess was that some uncleared error caused this
when several tests are run in sequence.
I briefly checked and there are still fallback scenarios
in Ruby OpenSSL code where something is first interpreted
as PEM and then as DER or the other way round. This way
such an error as described is put into OpenSSL's own error
queue. Most C code now uses
BIO_reset(bio);
ERR_get_error();
in conjunction now. For the those places and the remaining
code that does not yet I'd propose to expose this functionality
as a public macro and I would use it where appropriate. This
would prevent test failures as described here in the future.
What do you think?
I agree with it, such way is suitable than my hack.
I just committed the fix for http://redmine.ruby-lang.org/issues/4885
in revision 32199.
This should solve the issue that was discovered here, and I was also
able to run the tests without Yui's fix.
Could you please confirm that it works for you, too?