23 #ifndef WOLF_CRYPT_PKCS12_H 24 #define WOLF_CRYPT_PKCS12_H 32 #ifndef WOLFSSL_TYPES_DEFINED 33 typedef struct WC_PKCS12 WC_PKCS12;
44 WC_PKCS12_ITT_DEFAULT = 2048,
45 WC_PKCS12_VERSION_DEFAULT = 3,
46 WC_PKCS12_MAC_DEFAULT = 1,
49 WOLFSSL_API WC_PKCS12* wc_PKCS12_new(
void);
50 WOLFSSL_API
void wc_PKCS12_free(WC_PKCS12* pkcs12);
51 WOLFSSL_API
int wc_d2i_PKCS12(
const byte* der, word32 derSz, WC_PKCS12* pkcs12);
52 WOLFSSL_API
int wc_i2d_PKCS12(WC_PKCS12* pkcs12, byte** der,
int* derSz);
53 WOLFSSL_API
int wc_PKCS12_parse(WC_PKCS12* pkcs12,
const char* psw,
54 byte** pkey, word32* pkeySz, byte** cert, word32* certSz,
56 WOLFSSL_API WC_PKCS12* wc_PKCS12_create(
char* pass, word32 passSz,
57 char* name, byte* key, word32 keySz, byte* cert, word32 certSz,
58 WC_DerCertList* ca,
int nidKey,
int nidCert,
int iter,
int macIter,
59 int keyType,
void* heap);
62 WOLFSSL_LOCAL
int wc_PKCS12_SetHeap(WC_PKCS12* pkcs12,
void* heap);
63 WOLFSSL_LOCAL
void* wc_PKCS12_GetHeap(WC_PKCS12* pkcs12);
65 WOLFSSL_LOCAL
void wc_FreeCertList(
WC_DerCertList* list,
void* heap);