From f650d85aace1fd01ffd01fc9f8a1807962037ffc Mon Sep 17 00:00:00 2001 From: Matthias Valvekens Date: Tue, 30 Jan 2024 13:11:57 +0900 Subject: [PATCH] Deal with API compat issue in pyca_cryptography See pyca/cryptography#10294. --- pyhanko/pdf_utils/crypt/pubkey.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyhanko/pdf_utils/crypt/pubkey.py b/pyhanko/pdf_utils/crypt/pubkey.py index 8aaaf398..e567ac15 100644 --- a/pyhanko/pdf_utils/crypt/pubkey.py +++ b/pyhanko/pdf_utils/crypt/pubkey.py @@ -967,9 +967,7 @@ def decrypt_with_exchange( or originator_pub_key.curve.name != priv_key.curve.name ): raise ValueError(mismatch_msg) - ecdh_value = priv_key.exchange( - ECDH(), peer_public_key=originator_pub_key - ) + ecdh_value = priv_key.exchange(ECDH(), originator_pub_key) elif isinstance(priv_key, X25519PrivateKey): if not isinstance(originator_pub_key, X25519PublicKey): raise ValueError(mismatch_msg)