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): 0.9.8b-14.fc6 0.9.8b-15.fc7 0.9.8b-17.fc8 0.9.8g-9.12.fc9 0.9.8g-12.fc10 0.9.8b-8.3.el5 How reproducible: Always Steps to Reproduce: 1. Compile and run the attached test as follows 2. g++ -o openssltest openssltest.cpp -lssl 3. ./openssltest Actual results: OBJ_txt2nid: 17 OBJ_txt2nid: 0 first num too large a2d_ASN1_OBJECT Expected results: OBJ_txt2nid: 17 OBJ_txt2nid: 0 Additional info: These versions do not have this issue: 0.9.7a-20.6.legacy (RH9) 0.9.7a-33.13.legacy (FC1) 0.9.7a-35.2.legacy (FC2) 0.9.7a-42.2 (FC3) 0.9.7f-7.10 (FC4) 0.9.8a-5.4 (FC5) 0.9.7a-33.23 (RHEL3) 0.9.7a-43.17.el4_6.1 It looks like the problems was introduced when transitioning from 0.9.8a to 0.9.8b.
Created attachment 328798 [details] Test program
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 rt .
Compiling the test program against the 0.9.8j version compiled from the source tarball shows the same issue. Reported upstream as requested: http://rt.openssl.org/Ticket/Display.html?id=1819
Great, thanks.
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.