From ecd91d71c82c159f8d3cd324b3c269fad1ada733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Osztop=C3=A1ni=20Krist=C3=B3f?= Date: Thu, 10 Apr 2025 00:01:47 +0200 Subject: [PATCH] fix: type mismatch for warning check --- rsa/key.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rsa/key.py b/rsa/key.py index fd30447..968a717 100644 --- a/rsa/key.py +++ b/rsa/key.py @@ -600,11 +600,11 @@ def _load_pkcs1_der(cls, keyfile: bytes) -> "PrivateKey": n, e, d, p, q = map(int, priv[1:6]) exp1, exp2, coef = map(int, priv[6:9]) - rs = map(int, priv[9::3]) - ds = map(int, priv[10::3]) - ts = map(int, priv[11::3]) + rs = [int(x) for x in priv[9::3]] + ds = [int(x) for x in priv[10::3]] + ts = [int(x) for x in priv[11::3]] - key = cls(n, e, d, p, q, list(rs)) + key = cls(n, e, d, p, q, rs) if (key.exp1, key.exp2, key.coef, key.rs, key.ds, key.ts) != (exp1, exp2, coef, rs, ds, ts): warnings.warn(