pvmfw: Call CRYPTO_library_init before using BSSL
The library expects to have been initialized before being used. It is a
noop if BORINGSSL_NO_STATIC_INITIALIZER is not set i.e. if static
initializers are being used.
Test: atest MicrodroidTests
Change-Id: I35f486015a0c18224dec702fd0e1b11dc42a5e34
diff --git a/pvmfw/src/entry.rs b/pvmfw/src/entry.rs
index 8219882..ffbc4a8 100644
--- a/pvmfw/src/entry.rs
+++ b/pvmfw/src/entry.rs
@@ -15,6 +15,7 @@
//! Low-level entry and exit points of pvmfw.
use crate::config;
+use crate::crypto;
use crate::debug_policy::{handle_debug_policy, DebugPolicyError};
use crate::fdt;
use crate::heap;
@@ -192,6 +193,8 @@
RebootReason::InternalError
})?;
+ crypto::init();
+
// SAFETY - We only get the appended payload from here, once. It is mapped and the linker
// script prevents it from overlapping with other objects.
let appended_data = unsafe { get_appended_data_slice() };