Red Hat Bugzilla – Bug 479767
Calls to OBJ_txt2nid for a non-registered objects adds bogus "first num too large" errors from a2d_ASN1_OBJECT
Last modified: 2009-06-30 06:49:30 EDT
Description of problem:
Calls to OBJ_txt2nid for a non-registered objects adds bogus "first num too large" errors from a2d_ASN1_OBJECT.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Compile and run the attached test as follows
2. g++ -o openssltest openssltest.cpp -lssl
first num too large
These versions do not have this issue:
It looks like the problems was introduced when transitioning from 0.9.8a to 0.9.8b.
Created attachment 328798 [details]
Is the bug present in the latest upstream (namely 0.9.8j) ?
If so, could you please report it through the upstream bug tracker by sending e-mail to firstname.lastname@example.org .
Compiling the test program against the 0.9.8j version compiled from the source tarball shows the same issue.
Reported upstream as requested:
It was caused by this checkin http://cvs.openssl.org/chngview?cn=14633
Namely there is commented out ERR_clear_error() call now in OBJ_txt2obj().
Thinking more about the problem. The error is not quite bogus, although the error description is not accurate. The OBJ_txt2nid is not supposed to be called on unregistered objects so the zero return value indicates an error. You might as well call ERR_clear_error() in that case.