boringssl/crypto/obj
David Benjamin 47b8f00fdc Reimplement OBJ_txt2obj and add a lower-level function.
OBJ_txt2obj is currently implemented using BIGNUMs which is absurd. It
also depends on the giant OID table, which is undesirable. Write a new
one and expose the low-level function so Chromium can use it without the
OID table.

Bug: chromium:706445
Change-Id: I61ff750a914194f8776cb8d81ba5d3eb5eaa3c3d
Reviewed-on: https://boringssl-review.googlesource.com/23364
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Steven Valdez <svaldez@google.com>
2017-11-27 21:29:00 +00:00
..
CMakeLists.txt Convert obj_tests to gtest 2017-06-07 17:35:56 +00:00
obj_dat.h Add OpenSSL 1.1.0's cipher property functions. 2017-08-11 02:08:58 +00:00
obj_mac.num Add OpenSSL 1.1.0's cipher property functions. 2017-08-11 02:08:58 +00:00
obj_test.cc Convert obj_tests to gtest 2017-06-07 17:35:56 +00:00
obj_xref.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
obj.c Reimplement OBJ_txt2obj and add a lower-level function. 2017-11-27 21:29:00 +00:00
objects.go Reimplement objects.pl in Go. 2016-12-21 22:14:13 +00:00
objects.txt Add OpenSSL 1.1.0's cipher property functions. 2017-08-11 02:08:58 +00:00
README Reimplement objects.pl in Go. 2016-12-21 22:14:13 +00:00

The files nid.h, obj_mac.num, and obj_dat.h are generated from objects.txt and
obj_mac.num. To regenerate them, run:

    go run objects.go

objects.txt contains the list of all built-in OIDs. It is processed by
objects.go to output obj_mac.num, obj_dat.h, and nid.h.

obj_mac.num is the list of NID values for each OID. This is an input/output
file so NID values are stable across regenerations.

nid.h is the header which defines macros for all the built-in OIDs in C.

obj_dat.h contains the ASN1_OBJECTs corresponding to built-in OIDs themselves
along with lookup tables for search by short name, OID, etc.