From 429cb532b5186c6caa5b64fe3345676c19bf6262 Mon Sep 17 00:00:00 2001 From: Sergi Delgado Segura Date: Fri, 21 Feb 2020 13:22:26 +0100 Subject: [PATCH] Updates e2e tests signature verification --- test/pisa/e2e/test_basic_e2e.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/pisa/e2e/test_basic_e2e.py b/test/pisa/e2e/test_basic_e2e.py index 96ceed8..82f5c05 100644 --- a/test/pisa/e2e/test_basic_e2e.py +++ b/test/pisa/e2e/test_basic_e2e.py @@ -34,7 +34,7 @@ pisad_process = run_pisad() def get_pisa_pk(): pisa_sk = Cryptographer.load_private_key_der(Cryptographer.load_key_file(config.get("PISA_SECRET_KEY"))) - pisa_pk = pisa_sk.public_key() + pisa_pk = pisa_sk.public_key return pisa_pk @@ -159,7 +159,8 @@ def test_appointment_wrong_key(bitcoin_cli, create_txs): # Check that the server has accepted the appointment signature = response_json.get("signature") assert signature is not None - assert Cryptographer.verify(appointment.serialize(), signature, pisa_pk) is True + rpk = Cryptographer.recover_pk(appointment.serialize(), signature) + assert Cryptographer.verify_rpk(pisa_pk, rpk) is True assert response_json.get("locator") == appointment.locator # Trigger the appointment