From cdf2ee08c12fb3b53cea5c83fdf0f094d950f911 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Thu, 27 Jan 2022 15:56:16 +0100 Subject: [PATCH] chg: [FIPS] no clean way to support OpenSSL hashlib interface for FIPS --- pymisp/mispevent.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index 2ca42d9..549a926 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -353,10 +353,7 @@ class MISPAttribute(AbstractMISP): if '|' in self.type or self.type == 'malware-sample': hashes = [] for v in self.value.split('|'): - try: - h = hashlib.new(algorithm, usedforsecurity=False) - except: - h = hashlib.new(algorithm) + h = hashlib.new(algorithm) h.update(v.encode("utf-8")) hashes.append(h.hexdigest()) return hashes