summaryrefslogtreecommitdiff
path: root/payload_signer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'payload_signer.cc')
-rw-r--r--payload_signer.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/payload_signer.cc b/payload_signer.cc
index 15c2b329..3d09737c 100644
--- a/payload_signer.cc
+++ b/payload_signer.cc
@@ -230,6 +230,10 @@ bool PayloadSigner::SignHash(const vector<char>& hash,
cmd[cmd.size() - 3] = hash_path;
cmd[cmd.size() - 1] = sig_path;
+ // When running unittests, we need to use the openssl version from the
+ // SYSROOT instead of the one on the $PATH (host).
+ cmd[0] = utils::GetPathOnBoard("openssl");
+
int return_code = 0;
TEST_AND_RETURN_FALSE(Subprocess::SynchronousExec(cmd, &return_code, NULL));
TEST_AND_RETURN_FALSE(return_code == 0);