49#ifndef MBEDTLS_PKCS12_H
50#define MBEDTLS_PKCS12_H
52#if !defined(MBEDTLS_CONFIG_FILE)
55#include MBEDTLS_CONFIG_FILE
64#define MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA -0x1F80
65#define MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE -0x1F00
66#define MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT -0x1E80
67#define MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH -0x1E00
69#define MBEDTLS_PKCS12_DERIVE_KEY 1
70#define MBEDTLS_PKCS12_DERIVE_IV 2
71#define MBEDTLS_PKCS12_DERIVE_MAC_KEY 3
73#define MBEDTLS_PKCS12_PBE_DECRYPT 0
74#define MBEDTLS_PKCS12_PBE_ENCRYPT 1
80#if defined(MBEDTLS_ASN1_PARSE_C)
97 const unsigned char *
pwd,
size_t pwdlen,
98 const unsigned char *
input,
size_t len,
99 unsigned char *output );
119 const unsigned char *
pwd,
size_t pwdlen,
120 const unsigned char *
input,
size_t len,
121 unsigned char *output );
147 const unsigned char *
pwd,
size_t pwdlen,
148 const unsigned char *salt,
size_t saltlen,
void pwd(int argc, const char *argv[])
This file contains an abstraction interface for use with the cipher primitives provided by the librar...
mbedtls_cipher_type_t
Supported {cipher type, cipher mode} pairs.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLenum GLenum input
int const JOCTET unsigned int datalen
This file contains the generic message-digest wrapper.
mbedtls_md_type_t
Supported message digests.
int mbedtls_md(const mbedtls_md_info_t *md_info, const unsigned char *input, size_t ilen, unsigned char *output)
This function calculates the message-digest of a buffer, with respect to a configurable message-diges...
int mbedtls_pkcs12_derivation(unsigned char *data, size_t datalen, const unsigned char *pwd, size_t pwdlen, const unsigned char *salt, size_t saltlen, mbedtls_md_type_t mbedtls_md, int id, int iterations)
The PKCS#12 derivation function uses a password and a salt to produce pseudo-random bits for a partic...
int mbedtls_pkcs12_pbe(mbedtls_asn1_buf *pbe_params, int mode, mbedtls_cipher_type_t cipher_type, mbedtls_md_type_t md_type, const unsigned char *pwd, size_t pwdlen, const unsigned char *input, size_t len, unsigned char *output)
PKCS12 Password Based function (encryption / decryption) for cipher-based and mbedtls_md-based PBE's.
int mbedtls_pkcs12_pbe_sha1_rc4_128(mbedtls_asn1_buf *pbe_params, int mode, const unsigned char *pwd, size_t pwdlen, const unsigned char *input, size_t len, unsigned char *output)
PKCS12 Password Based function (encryption / decryption) for pbeWithSHAAnd128BitRC4.