mbedtls: fix building when MBEDTLS_X509_REMOVE_INFO flag is defined

Closes #12904
This commit is contained in:
MAntoniak 2024-02-08 19:54:45 +01:00 committed by Daniel Stenberg
parent d8f01e0985
commit 07e5b3ea60
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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) {