polhenarejos / pycvc

Card Verifiable Certificates (CVC) tools for Python
https://www.picokeys.com
GNU General Public License v3.0
12 stars 3 forks source link

cvc-print: verification fails for RSA certificates #2

Closed rathorearvind19 closed 1 year ago

rathorearvind19 commented 1 year ago

Thanks for fixing the issue I reported earlier. We have similar issue with RSA certificate verification. Data types expected and provided are different. Could you fix this one as well? Thanks.

Command: cvc-print -d certs ZZATCVCA00001.cvcert Traceback: below

_Traceback (most recent call last): File "\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "\Anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "\Anaconda3\Scripts\cvc-print.exe__main__.py", line 7, in File "\Anaconda3\lib\site-packages\cvc\tools\cvc_print.py", line 125, in run main(args) File \Anaconda3\lib\site-packages\cvc\tools\cvc_print.py", line 88, in main if (CVC().decode(cdata).verify(cert_dir=cert_dir, dica=cdata if isreq else None)): File "\Anaconda3\lib\site-packages\cvc\certificates.py", line 188, in verify pubkey = rsa.RSAPublicNumbers(ASN1().decode(puk).find(0x82).data(), ASN1().decode(puk).find(0x81).data()).publickey() File "*\Anaconda3\lib\site-packages\cryptography\hazmat\primitives\asymmetric\rsa.py", line 395, in init raise TypeError("RSAPublicNumbers arguments must be integers.") TypeError: RSAPublicNumbers arguments must be integers.

polhenarejos commented 1 year ago

Should be fixed in v1.2.4.