Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CAC Client Application Authentication in Python

I am building a python application to pull data from a website. The application has to authenticate(HTTPS/SSL) with a CAC card and pin in order to make requests.

Am I correct in my assumptions that you can't retrieve the private key from a CAC card, and am therefore stuck using a PKCS #11 Wrapper like PyKCS?

Any tips or resources for going about this?

like image 777
Präriewolf Avatar asked Oct 15 '22 08:10

Präriewolf


1 Answers

Authentication and signature keys are usually generated on the card and are not extractable, unlike encryption keys which can/should be escrowed somewhere.

See Need help using M2Crypto.Engine to access USB Token for an example with M2Crypto that explains how to use a smart card via PKCS#11 for website access in python.

like image 147
Martin Paljak Avatar answered Oct 18 '22 12:10

Martin Paljak