Commit Graph

5 Commits

Author SHA1 Message Date
Andrzej Kurek
b23b04d177 pkcs11: zeroize buffer earlier on failure
Change the buffer zeroization so that it happens earlier
2018-03-20 05:02:29 -04:00
Andrzej Kurek
686a05e90c Documentation fix
Added more elaborate descriptions, fixed minor issues.
2018-03-02 17:11:39 -05:00
Andrzej Kurek
79f4e0e91d pkcs11_client: implement RSA sign/verify
Make mbedtls_rsa_emsa_pkcs1_v15_encode_digestinfo from rsa.c public,
and use it in the pkcs11_client module.

pkcs11_client: refactor pkcs11_sign and pkcs11_verify to simplify
memory managmement. Implement these functions for RSA.
2018-01-24 08:15:51 -05:00
Andrzej Kurek
f1a4164b55 Change key type when getting CKA_EC_PARAMS 2018-01-23 09:25:37 -05:00
Andrzej Kurek
753b86c5fd New module: pkcs11_client
New module pkcs11_client.c, defining an opaque pk engine whose backend
is a PKCS#11 token (cryptographic module using the Cryptoki API).

New config option PKCS11_CLIENT_C. Requires pkcs11.h to compile and a
pkcs11 library to link.

Test setup meant to be used with the SoftHSM v2 library (libsofthsm2).
The test setup is not yet integrated with the Mbed TLS test framework.
Before running tests involving PKCS#11, you need to run

    cd tests && scripts/pkcs11-client-test.sh init
2018-01-23 08:56:17 -05:00