[Privoxy-commits] [privoxy] 22/26: mbedTLS ssl_crt_verify_info(): Ditch trailing new line
    User Git 
    git at git.privoxy.org
       
    Mon Jan 18 13:32:30 UTC 2021
    
    
  
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit 08a9e6314693f8137b1163e2c56b41904d4b3da7
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Mon Jan 18 01:59:40 2021 +0100
    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.
---
 ssl.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
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';
+   }
 }
 
 
-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
    
    
More information about the Privoxy-commits
mailing list