Skip to content

Commit 8a89f9f

Browse files
author
Hanno Becker
committed
Make PBE-related parts of PKCS12 depend on MBEDTLS_ASN1_PARSE_C
1 parent cb9debd commit 8a89f9f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

include/mbedtls/pkcs12.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
extern "C" {
4747
#endif
4848

49+
#if defined(MBEDTLS_ASN1_PARSE_C)
50+
4951
/**
5052
* \brief PKCS12 Password Based function (encryption / decryption)
5153
* for pbeWithSHAAnd128BitRC4
@@ -87,6 +89,8 @@ int mbedtls_pkcs12_pbe( mbedtls_asn1_buf *pbe_params, int mode,
8789
const unsigned char *input, size_t len,
8890
unsigned char *output );
8991

92+
#endif /* MBEDTLS_ASN1_PARSE_C */
93+
9094
/**
9195
* \brief The PKCS#12 derivation function uses a password and a salt
9296
* to produce pseudo-random bits for a particular "purpose".

library/pkcs12.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
#include "mbedtls/des.h"
4949
#endif
5050

51+
#if defined(MBEDTLS_ASN1_PARSE_C)
52+
5153
static int pkcs12_parse_pbe_params( mbedtls_asn1_buf *params,
5254
mbedtls_asn1_buf *salt, int *iterations )
5355
{
@@ -226,6 +228,8 @@ int mbedtls_pkcs12_pbe( mbedtls_asn1_buf *pbe_params, int mode,
226228
return( ret );
227229
}
228230

231+
#endif /* MBEDTLS_ASN1_PARSE_C */
232+
229233
static void pkcs12_fill_buffer( unsigned char *data, size_t data_len,
230234
const unsigned char *filler, size_t fill_len )
231235
{

0 commit comments

Comments
 (0)