29b186736c
Previously, error strings were kept in arrays for each subdirectory and err.c would iterate over them all and insert them at init time to a hash table. This means that, even if you have a shared library and lots of processes using that, each process has ~30KB of private memory from building that hash table. This this change, all the error strings are built into a sorted list and are thus static data. This means that processes can share the error information and it actually saves binary space because of all the pointer overhead in the old scheme. Also it saves the time taken building the hash table at startup. This removes support for externally-supplied error string data. Change-Id: Ifca04f335c673a048e1a3e76ff2b69c7264635be |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
obj_dat.h | ||
obj_dat.pl | ||
obj_mac.num | ||
obj_xref.c | ||
obj_xref.h | ||
obj_xref.pl | ||
obj_xref.txt | ||
obj.c | ||
objects.pl | ||
objects.txt | ||
README |
OID information is generated via a series of perl scripts. In order, the full list of commands to run are: perl objects.pl objects.txt obj_mac.num ../../include/openssl/obj_mac.h perl obj_dat.pl ../../include/openssl/obj_mac.h obj_dat.h perl obj_xref.pl obj_mac.num obj_xref.txt > obj_xref.h objects.txt contains the list of all built-in OIDs. It is processed by objects.pl to output obj_mac.num and obj_mac.h. obj_mac.num is the list of NID values for each OID. This is an input/output parameter so NID values are stable across regenerations. obj_mac.h is the header which defines macros for all the built-in OIDs in C. obj_mac.h is read by obj_dat.pl to generate obj_dat.h. obj_dat.h contains the ASN1_OBJECTs corresponding to built-in OIDs themselves along with lookup tables for search by short name, OID, etc. obj_mac.num and obj_xref.txt are read by obj_xref.pl to generate obj_xref.h. obj_xref.txt links signature OIDs to corresponding public key algorithms and digests. obj_xref.h contains lookup tables for querying this information in both directions. Dependency graph: objects.txt | V [objects.pl] <--+ / \ | V V | obj_mac.h obj_mac.num obj_xref.txt | \ / V V V [obj_dat.pl] [obj_xref.pl] | | V V obj_dat.h obj_xref.h