29 #ifndef POLARSSL_PKCS11_H
30 #define POLARSSL_PKCS11_H
34 #if defined(POLARSSL_PKCS11_C)
38 #include <pkcs11-helper-1.0/pkcs11h-certificate.h>
44 pkcs11h_certificate_t pkcs11h_cert;
56 int pkcs11_x509_cert_init(
x509_cert *cert, pkcs11h_certificate_t pkcs11h_cert );
68 int pkcs11_priv_key_init( pkcs11_context *priv_key,
69 pkcs11h_certificate_t pkcs11_cert );
77 void pkcs11_priv_key_free( pkcs11_context *priv_key );
95 int pkcs11_decrypt( pkcs11_context *ctx,
96 int mode,
size_t *olen,
97 const unsigned char *input,
98 unsigned char *output,
99 unsigned int output_max_len );
117 int pkcs11_sign( pkcs11_context *ctx,
120 unsigned int hashlen,
121 const unsigned char *hash,
122 unsigned char *sig );