From d499d274551c8e43001f107410cf9d7508f0835c Mon Sep 17 00:00:00 2001 From: Helder Eijs Date: Mon, 30 Sep 2024 19:34:42 +0200 Subject: [PATCH] Decrypt PKCS#8 key even if the password is empty --- lib/Crypto/IO/PKCS8.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Crypto/IO/PKCS8.py b/lib/Crypto/IO/PKCS8.py index 0747dfc1..c1b79a28 100644 --- a/lib/Crypto/IO/PKCS8.py +++ b/lib/Crypto/IO/PKCS8.py @@ -148,7 +148,7 @@ def unwrap(p8_private_key, passphrase=None): ValueError : if decoding fails """ - if passphrase: + if passphrase is not None: passphrase = tobytes(passphrase) found = False