boringssl/crypto/obj/CMakeLists.txt
David Benjamin dc9194f78b Fix a bug in obj_dat.pl and add basic crypto/obj tests.
It's not possible to encode an OID with only one component, so some of
the NIDs do not have encodings. The logic to actually encode OIDs checks
for this (before calling der_it), but not the logic to compute the
sorted OID list.

Without this, OBJ_obj2nid, when given an empty OID, returns something
arbitrary based on the binary search implementation instead of
NID_undef.

Change-Id: Ib68bae349f66eff3d193616eb26491b6668d4b0a
Reviewed-on: https://boringssl-review.googlesource.com/7752
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2016-04-26 15:19:26 +00:00

22 lines
245 B
CMake

include_directories(../../include)
add_library(
obj
OBJECT
obj.c
obj_xref.c
)
add_executable(
obj_test
obj_test.cc
$<TARGET_OBJECTS:test_support>
)
target_link_libraries(obj_test crypto)
add_dependencies(all_tests obj_test)