Commit Graph

3 Commits

Author SHA1 Message Date
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