12#ifndef MBEDTLS_PKCS11_H
13#define MBEDTLS_PKCS11_H
15#if !defined(MBEDTLS_CONFIG_FILE)
18#include MBEDTLS_CONFIG_FILE
21#if defined(MBEDTLS_PKCS11_C)
25#include <pkcs11-helper-1.0/pkcs11h-certificate.h>
27#if (defined(__ARMCC_VERSION) || defined(_MSC_VER)) && \
28 !defined(inline) && !defined(__cplusplus)
29#define inline __inline
36#if defined(MBEDTLS_DEPRECATED_REMOVED)
41typedef struct mbedtls_pkcs11_context {
42 pkcs11h_certificate_t pkcs11h_cert;
44} mbedtls_pkcs11_context;
46#if defined(MBEDTLS_DEPRECATED_WARNING)
47#define MBEDTLS_DEPRECATED __attribute__((deprecated))
49#define MBEDTLS_DEPRECATED
73 pkcs11h_certificate_t pkcs11h_cert);
89 mbedtls_pkcs11_context *priv_key,
90 pkcs11h_certificate_t pkcs11_cert);
102 mbedtls_pkcs11_context *priv_key);
125 int mode,
size_t *olen,
126 const unsigned char *input,
127 unsigned char *output,
128 size_t output_max_len);
152 unsigned int hashlen,
153 const unsigned char *hash,
165 const unsigned char *input,
166 unsigned char *output,
167 size_t output_max_len)
169 return mbedtls_pkcs11_decrypt((mbedtls_pkcs11_context *) ctx, mode, olen, input, output,
206 unsigned int hashlen,
207 const unsigned char *hash,
212 return mbedtls_pkcs11_sign((mbedtls_pkcs11_context *) ctx, mode, md_alg,
228 return ((mbedtls_pkcs11_context *) ctx)->len;
231#undef MBEDTLS_DEPRECATED
#define MBEDTLS_DEPRECATED
Configuration options (set of defines)
mbedtls_md_type_t
Supported message digests.
X.509 certificate parsing and writing.