From: Fabian Keil Date: Mon, 18 Jan 2021 00:59:40 +0000 (+0100) Subject: mbedTLS ssl_crt_verify_info(): Ditch trailing new line X-Git-Tag: v_3_0_30~90 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=08a9e6314693f8137b1163e2c56b41904d4b3da7;hp=0c0869279f7cc3152b9dbb04d4183914b3c8155e mbedTLS ssl_crt_verify_info(): Ditch trailing new line It's not needed for the certificate-error page and it messed up the "Crunch:" message by splitting it in two. While at it, remove the leading space which serves no obvious purpose. --- diff --git a/ssl.c b/ssl.c index ebcac3f2..abc7df68 100644 --- a/ssl.c +++ b/ssl.c @@ -1881,7 +1881,16 @@ extern int ssl_base64_encode(unsigned char *dst, size_t dlen, size_t *olen, *********************************************************************/ extern void ssl_crt_verify_info(char *buf, size_t size, struct client_state *csp) { - mbedtls_x509_crt_verify_info(buf, size, " ", csp->server_cert_verification_result); + char *last_byte; + + mbedtls_x509_crt_verify_info(buf, size, "", + csp->server_cert_verification_result); + last_byte = buf + strlen(buf)-1; + if (*last_byte == '\n') + { + /* Overwrite trailing new line character */ + *last_byte = '\0'; + } }