mbedtls_x509_crt_parse_der_with_ext_cb enhancement
added make_copy parameter as suggested in
https://github.com/ARMmbed/mbedtls/pull/3243#discussion_r431233555
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com>
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 6fdee95..2e2fb24 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -1392,9 +1392,10 @@
int mbedtls_x509_crt_parse_der_with_ext_cb( mbedtls_x509_crt *chain,
const unsigned char *buf,
size_t buflen,
+ int make_copy,
mbedtls_x509_crt_ext_cb_t cb )
{
- return( mbedtls_x509_crt_parse_der_internal( chain, buf, buflen, 1, cb ) );
+ return( mbedtls_x509_crt_parse_der_internal( chain, buf, buflen, make_copy, cb ) );
}
int mbedtls_x509_crt_parse_der( mbedtls_x509_crt *chain,