Add a reference C implementation for verifying signatures

Due to OEM requests, add a reference implementation for boot/recovery
image signature verification in C. The tool uses OpenSSL for ASN.1 and
crypto routines.

Bug: 18120110
Change-Id: I9f6c59e0b338b68f35ac1c2c4d83c10d31d70cd9
diff --git a/verity/Android.mk b/verity/Android.mk
index 018d40f..f166f9e 100644
--- a/verity/Android.mk
+++ b/verity/Android.mk
@@ -1,6 +1,15 @@
 LOCAL_PATH:= $(call my-dir)
 
 include $(CLEAR_VARS)
+LOCAL_MODULE := verify_boot_signature
+LOCAL_SRC_FILES := verify_boot_signature.c
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_TAGS := optional
+LOCAL_SHARED_LIBRARIES := libcrypto-host
+LOCAL_C_INCLUDES += external/openssl/include system/extras/ext4_utils system/core/mkbootimg
+include $(BUILD_HOST_EXECUTABLE)
+
+include $(CLEAR_VARS)
 LOCAL_MODULE := generate_verity_key
 LOCAL_SRC_FILES := generate_verity_key.c
 LOCAL_MODULE_CLASS := EXECUTABLES