From 443e899b6f15ca5d7fd42174921faacb2059944a Mon Sep 17 00:00:00 2001 From: Eyal Ronen Date: Tue, 23 Feb 2021 18:11:18 +0200 Subject: now printing Details of the Green Pass --- verify.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/verify.py b/verify.py index 2336d70..0caa13a 100644 --- a/verify.py +++ b/verify.py @@ -1,4 +1,5 @@ import base64 +import json from cryptography.hazmat.primitives import hashes, serialization from cryptography.hazmat.primitives.asymmetric import padding @@ -21,3 +22,8 @@ with open("certs/RamzorQRPubKey.pem", "rb") as f: padding.PKCS1v15(), hashes.SHA256(), ) + +json_data = json.loads(payload) +print('Israeli ID Number ', json_data['p'][0]['idl']) +print('ID valid by ', json_data['p'][0]['e']) +print('Cert Unique ID =', json_data['id']) \ No newline at end of file -- cgit v1.3.1