mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 09:25:38 +00:00
Make PBE-related parts of PKCS12 depend on MBEDTLS_ASN1_PARSE_C
This commit is contained in:
parent
cb9debda6b
commit
8a89f9fcd2
|
@ -46,6 +46,8 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_ASN1_PARSE_C)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief PKCS12 Password Based function (encryption / decryption)
|
* \brief PKCS12 Password Based function (encryption / decryption)
|
||||||
* for pbeWithSHAAnd128BitRC4
|
* for pbeWithSHAAnd128BitRC4
|
||||||
|
@ -87,6 +89,8 @@ int mbedtls_pkcs12_pbe( mbedtls_asn1_buf *pbe_params, int mode,
|
||||||
const unsigned char *input, size_t len,
|
const unsigned char *input, size_t len,
|
||||||
unsigned char *output );
|
unsigned char *output );
|
||||||
|
|
||||||
|
#endif /* MBEDTLS_ASN1_PARSE_C */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief The PKCS#12 derivation function uses a password and a salt
|
* \brief The PKCS#12 derivation function uses a password and a salt
|
||||||
* to produce pseudo-random bits for a particular "purpose".
|
* to produce pseudo-random bits for a particular "purpose".
|
||||||
|
|
|
@ -48,6 +48,8 @@
|
||||||
#include "mbedtls/des.h"
|
#include "mbedtls/des.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_ASN1_PARSE_C)
|
||||||
|
|
||||||
static int pkcs12_parse_pbe_params( mbedtls_asn1_buf *params,
|
static int pkcs12_parse_pbe_params( mbedtls_asn1_buf *params,
|
||||||
mbedtls_asn1_buf *salt, int *iterations )
|
mbedtls_asn1_buf *salt, int *iterations )
|
||||||
{
|
{
|
||||||
|
@ -226,6 +228,8 @@ exit:
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* MBEDTLS_ASN1_PARSE_C */
|
||||||
|
|
||||||
static void pkcs12_fill_buffer( unsigned char *data, size_t data_len,
|
static void pkcs12_fill_buffer( unsigned char *data, size_t data_len,
|
||||||
const unsigned char *filler, size_t fill_len )
|
const unsigned char *filler, size_t fill_len )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue