boringssl/crypto/obj/README
David Benjamin 5d38f78e29 Rename obj_mac.h to nid.h and make it a multiply-includable header.
obj_mac.h is missing #include guards, so one cannot use NIDs without
pulling in the OBJ_* functions which depend on the giant OID table. Give
it #include guards, tidy up the style slightly, and also rename it to
nid.h which is a much more reasonable name.

obj_mac.h is kept as a forwarding header as, despite it being a little
screwy, some code #includes it anyway.

BUG=chromium:499653

Change-Id: Iec0b3f186c02e208ff1f7437bf27ee3a5ad004b7
Reviewed-on: https://boringssl-review.googlesource.com/7562
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2016-03-31 20:45:35 +00:00

38 lines
1.6 KiB
Plaintext

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/nid.h
perl obj_dat.pl ../../include/openssl/nid.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 nid.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. nid.h is the header which defines macros for all the
built-in OIDs in C.
nid.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 |
nid.h obj_mac.num obj_xref.txt
| \ /
V V V
[obj_dat.pl] [obj_xref.pl]
| |
V V
obj_dat.h obj_xref.h