summaryrefslogtreecommitdiff
path: root/verity
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-05-11 12:17:25 -0700
committerAdam Langley <agl@google.com>2015-05-11 13:28:00 -0700
commita83adf6354f3073a1938ffcd6cadd5c357856de5 (patch)
treeee382e3cee244d00cc87722d251e117fa31753cb /verity
parent3d59e00f74fa6b866aba09628416555ce06f2bfe (diff)
downloadextras-a83adf6354f3073a1938ffcd6cadd5c357856de5.tar.gz
system/extra: include more of what you use.
This is a reland of aa24bc89b78a5981df7618bdef78b7b49ffad14d which was reverted in 291e20dab39783c7074191ff2d2de9b86465c10f because it broke the git_master-gpl builder. This version of the change uses crypto.h as a proxy for mem.h because it'll work in both BoringSSL and OpenSSL. Change-Id: I9e4c9e4d459c2e31f74180b3a3b2ab139ab76e80
Diffstat (limited to 'verity')
-rw-r--r--verity/generate_verity_key.c5
-rw-r--r--verity/verify_boot_signature.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/verity/generate_verity_key.c b/verity/generate_verity_key.c
index a55600cd..0da978fc 100644
--- a/verity/generate_verity_key.c
+++ b/verity/generate_verity_key.c
@@ -14,10 +14,13 @@
* limitations under the License.
*/
+#define _GNU_SOURCE /* needed for asprintf */
+
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <unistd.h>
/* HACK: we need the RSAPublicKey struct
diff --git a/verity/verify_boot_signature.c b/verity/verify_boot_signature.c
index 55591aaf..58b7a194 100644
--- a/verity/verify_boot_signature.c
+++ b/verity/verify_boot_signature.c
@@ -19,6 +19,7 @@
#include <endian.h>
#include <stddef.h>
#include <stdint.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -28,6 +29,7 @@
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
+#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>