24 #ifndef MBEDTLS_PKCS11_H 25 #define MBEDTLS_PKCS11_H 27 #if !defined(MBEDTLS_CONFIG_FILE) 30 #include MBEDTLS_CONFIG_FILE 33 #if defined(MBEDTLS_PKCS11_C) 37 #include <pkcs11-helper-1.0/pkcs11h-certificate.h> 39 #if (defined(__ARMCC_VERSION) || defined(_MSC_VER)) && \ 40 !defined(inline) && !defined(__cplusplus) 41 #define inline __inline 48 #if defined(MBEDTLS_DEPRECATED_REMOVED) 53 typedef struct mbedtls_pkcs11_context {
54 pkcs11h_certificate_t pkcs11h_cert;
56 } mbedtls_pkcs11_context;
58 #if defined(MBEDTLS_DEPRECATED_WARNING) 59 #define MBEDTLS_DEPRECATED __attribute__((deprecated)) 61 #define MBEDTLS_DEPRECATED 85 pkcs11h_certificate_t pkcs11h_cert);
101 mbedtls_pkcs11_context *priv_key,
102 pkcs11h_certificate_t pkcs11_cert);
114 mbedtls_pkcs11_context *priv_key);
137 int mode,
size_t *olen,
138 const unsigned char *input,
139 unsigned char *output,
140 size_t output_max_len);
164 unsigned int hashlen,
165 const unsigned char *hash,
177 const unsigned char *input,
178 unsigned char *output,
179 size_t output_max_len)
181 return mbedtls_pkcs11_decrypt((mbedtls_pkcs11_context *) ctx, mode, olen, input, output,
218 unsigned int hashlen,
219 const unsigned char *hash,
224 return mbedtls_pkcs11_sign((mbedtls_pkcs11_context *) ctx, mode, md_alg,
240 return ((mbedtls_pkcs11_context *) ctx)->len;
243 #undef MBEDTLS_DEPRECATED #define MBEDTLS_DEPRECATED
Configuration options (set of defines)
X.509 certificate parsing and writing.
mbedtls_md_type_t
Supported message digests.