summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-05-11 12:17:25 -0700
committerKenny Root <kroot@google.com>2015-05-13 11:28:38 -0700
commitf2392997221777282197127c5febf65d8cc699ea (patch)
tree4655417466a6eb9bb74835d4a021b534c169c9cb
parent768b73e1500d7db318bed1c3fb326d84f9fe150e (diff)
downloadextras-f2392997221777282197127c5febf65d8cc699ea.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. (cherry picked from commit a83adf6354f3073a1938ffcd6cadd5c357856de5) Bug: 21085331 Change-Id: I9e4c9e4d459c2e31f74180b3a3b2ab139ab76e80
-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>