From: Mark Hatle Date: Tue, 1 Mar 2022 01:37:26 +0000 (-0600) Subject: insane.bbclass: Update insane.bbclass to work on FIPS enabled hosts X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~5020 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f7eb82ce47ede6ec6f50cbcb56cbfbe10e8d20c;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git insane.bbclass: Update insane.bbclass to work on FIPS enabled hosts hashlib.md5() is not permitted on a FIPS enabled host system. This is due to md5 not being an approved hash algorithm. Instead use: hashlib.new('MD5', usedforsecurity=False) This is allowed, as it's clear the hash is used for a non-security purpose. Using an md5 to identify when a license has changed is permitted, as we're not using it for file integrity. Signed-off-by: Mark Hatle Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie --- diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 890e865a8f3..29b9b3d466a 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -549,7 +549,7 @@ python populate_lic_qa_checksum() { import hashlib lineno = 0 license = [] - m = hashlib.md5() + m = hashlib.new('MD5', usedforsecurity=False) for line in f: lineno += 1 if (lineno >= beginline):