summaryrefslogtreecommitdiff
path: root/verity
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-03-17 14:08:40 -0700
committerAdam Langley <agl@google.com>2015-03-17 14:08:40 -0700
commite3ec11c2d95cc03be01426d13ea87fc8edb3daad (patch)
tree8da909325f2a7e7e3c7e879c837f077005ff901c /verity
parent79522851f014d82768d7d27d5676bdf98cbb595a (diff)
downloadextras-e3ec11c2d95cc03be01426d13ea87fc8edb3daad.tar.gz
system/extras/verity: BoringSSL fix.
In BoringSSL, the functions that references BIOs have been moved out of ERR in order to have some reasonable layering of the code. A recent addition here referenced ERR_print_errors, which is now BIO_print_errors in BoringSSL for that reason. Additionally, the BoringSSL headers don't #include so many standard headers for you so an explicit #include of errno.h is needed here. Change-Id: Iebcc353b1354bd85d432deebeb7873aae46b0d2a
Diffstat (limited to 'verity')
-rw-r--r--verity/verify_boot_signature.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/verity/verify_boot_signature.c b/verity/verify_boot_signature.c
index 2274291b..55591aaf 100644
--- a/verity/verify_boot_signature.c
+++ b/verity/verify_boot_signature.c
@@ -24,6 +24,7 @@
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
+#include <errno.h>
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
@@ -69,6 +70,14 @@ IMPLEMENT_ASN1_FUNCTIONS(BootSignature)
static BIO *g_error = NULL;
+#if defined(OPENSSL_IS_BORINGSSL)
+/* In BoringSSL, ERR_print_errors has been moved to the BIO functions in order
+ * to avoid the incorrect dependency of ERR on BIO. */
+static void ERR_print_errors(BIO *bio) {
+ BIO_print_errors(bio);
+}
+#endif
+
/**
* Rounds n up to the nearest multiple of page_size
* @param n The value to round