summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-04-01 11:29:03 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-04-02 00:54:07 +0000
commit9978e0aa0069697816a38c7dcc6a81be5975cab7 (patch)
treec0c10132781c0a7bce5a26b70eb28beea8e97c73 /host
parentb5a439241fee558631d466cfa5203dd447504427 (diff)
downloadvboot-9978e0aa0069697816a38c7dcc6a81be5975cab7.tar.gz
vboot: fix name-collision with OpenSSL.stabilize-6946.55.Bstabilize-6937.Brelease-R43-6946.B
vboot currently uses the |SHA256_CTX| name, which is claimed by OpenSSL. To work around this, it defines OPENSSL_NO_SHA, but that can't be done at compile time: The OPENSSL_NO_* defines are set by OpenSSL to reflect the configuration that it was built with so that users of OpenSSL can disable features as needed. They can affect the contents of structures any thus the ABI of the library. If these defines are set outside of OpenSSL, then the library and the code that uses it will have incompatible ABIs. At that point it's only functioning by blind luck. This change renames the name-collisions so that this hack isn't needed. This is the same change as was made internally in cl/85758149. BUG=none BRANCH=none TEST=emerge-samus coreboot; make runtests Change-Id: I709da2507f341896d89d50129ce30ffb111a20d1 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/263506 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/lib/host_key.c1
-rw-r--r--host/lib/host_signature.c1
-rw-r--r--host/lib/signature_digest.c1
-rw-r--r--host/lib/util_misc.c2
-rw-r--r--host/lib21/host_key.c1
-rw-r--r--host/lib21/host_signature.c1
6 files changed, 1 insertions, 6 deletions
diff --git a/host/lib/host_key.c b/host/lib/host_key.c
index 067a188e..fed579a2 100644
--- a/host/lib/host_key.c
+++ b/host/lib/host_key.c
@@ -7,7 +7,6 @@
/* TODO: change all 'return 0', 'return 1' into meaningful return codes */
-#define OPENSSL_NO_SHA
#include <openssl/pem.h>
#include <stdio.h>
diff --git a/host/lib/host_signature.c b/host/lib/host_signature.c
index 43766cfa..68eba295 100644
--- a/host/lib/host_signature.c
+++ b/host/lib/host_signature.c
@@ -7,7 +7,6 @@
/* TODO: change all 'return 0', 'return 1' into meaningful return codes */
-#define OPENSSL_NO_SHA
#include <openssl/rsa.h>
#include <stdio.h>
diff --git a/host/lib/signature_digest.c b/host/lib/signature_digest.c
index c9e721e4..dcc2cf26 100644
--- a/host/lib/signature_digest.c
+++ b/host/lib/signature_digest.c
@@ -3,7 +3,6 @@
* found in the LICENSE file.
*/
-#define OPENSSL_NO_SHA
#include <openssl/pem.h>
#include <stdio.h>
diff --git a/host/lib/util_misc.c b/host/lib/util_misc.c
index ecaf8ea3..03ec683f 100644
--- a/host/lib/util_misc.c
+++ b/host/lib/util_misc.c
@@ -5,7 +5,7 @@
* Miscellaneous functions for userspace vboot utilities.
*/
-#define OPENSSL_NO_SHA
+#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <stdio.h>
diff --git a/host/lib21/host_key.c b/host/lib21/host_key.c
index b18d018c..f7ea1622 100644
--- a/host/lib21/host_key.c
+++ b/host/lib21/host_key.c
@@ -7,7 +7,6 @@
#include <stdio.h>
-#define OPENSSL_NO_SHA
#include <openssl/pem.h>
#include "2sysincludes.h"
diff --git a/host/lib21/host_signature.c b/host/lib21/host_signature.c
index 50cc8f0a..539a74bc 100644
--- a/host/lib21/host_signature.c
+++ b/host/lib21/host_signature.c
@@ -5,7 +5,6 @@
* Host functions for signatures.
*/
-#define OPENSSL_NO_SHA
#include <openssl/rsa.h>
#include "2sysincludes.h"