From 37eb7db2dc892148c4406d6dc8c717503df71e39 Mon Sep 17 00:00:00 2001 From: "Diaz de Grenu, Jose" Date: Tue, 12 Jul 2016 17:49:07 +0200 Subject: [PATCH] meta-digi-arm: trustfence-cst: use /dev/urandom This is needed in order to avoid indefinitely blocking. Signed-off-by: Diaz de Grenu, Jose --- ...elper-use-dev-urandom-as-seed-source.patch | 22 +++++++++++++++++++ .../trustfence-cst/trustfence-cst_2.3.2.bb | 1 + 2 files changed, 23 insertions(+) create mode 100644 meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst-2.3.2/0003-openssl_helper-use-dev-urandom-as-seed-source.patch diff --git a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst-2.3.2/0003-openssl_helper-use-dev-urandom-as-seed-source.patch b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst-2.3.2/0003-openssl_helper-use-dev-urandom-as-seed-source.patch new file mode 100644 index 000000000..24dcbd229 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst-2.3.2/0003-openssl_helper-use-dev-urandom-as-seed-source.patch @@ -0,0 +1,22 @@ +From: "Diaz de Grenu, Jose" +Date: Tue, 12 Jul 2016 17:47:24 +0200 +Subject: [PATCH] openssl_helper: use /dev/urandom as seed source + +This is needed in order to avoid indefinitely blocking. + +Signed-off-by: Diaz de Grenu, Jose +--- + code/back_end/src/openssl_helper.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/code/back_end/src/openssl_helper.c b/code/back_end/src/openssl_helper.c +index 3c9c779092c5..f0cd4e06f0dd 100644 +--- a/code/back_end/src/openssl_helper.c ++++ b/code/back_end/src/openssl_helper.c +@@ -486,7 +486,7 @@ void print_version(void) + ---------------------------*/ + uint32_t seed_prng(uint32_t bytes) + { +- return RAND_load_file("/dev/random", bytes); ++ return RAND_load_file("/dev/urandom", bytes); + } diff --git a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_2.3.2.bb b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_2.3.2.bb index 0fc73c323..eb5fd5f39 100644 --- a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_2.3.2.bb +++ b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_2.3.2.bb @@ -11,6 +11,7 @@ SRC_URI = " \ ${@base_conditional('TRUSTFENCE_SIGN', '1', 'file://cst-${PV}.tar.gz', '', d)} \ file://0001-gen_auth_encrypted_data-reuse-existing-DEK-file.patch \ file://0002-hab4_pki_tree.sh-automate-script.patch \ + file://0003-openssl_helper-use-dev-urandom-as-seed-source.patch \ file://Makefile \ "