From 07e5b3ea6012ec26ec6c9f4c01040e3b60640c8a Mon Sep 17 00:00:00 2001 From: MAntoniak <47522782+MAntoniak@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:54:45 +0100 Subject: [PATCH] mbedtls: fix building when MBEDTLS_X509_REMOVE_INFO flag is defined Closes #12904 --- lib/vtls/mbedtls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index 7d70de53bd..d6c9bce25c 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -775,6 +775,7 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data) peercert = mbedtls_ssl_get_peer_cert(&backend->ssl); if(peercert && data->set.verbose) { +#ifndef MBEDTLS_X509_REMOVE_INFO const size_t bufsize = 16384; char *buffer = malloc(bufsize); @@ -787,6 +788,9 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data) infof(data, "Unable to dump certificate information"); free(buffer); +#else + infof(data, "Unable to dump certificate information"); +#endif } if(pinnedpubkey) {