links

lynx-like text mode web browser
git clone anongit@rnpnr.xyz:links.git
Log | Files | Refs | Feed | README | LICENSE

Commit: a754ebdc1a6a7905d80c4b1ad234958c8b376670
Parent: 7489e152d5952c088b24dd2f8766fe637ff5d746
Author: opask
Date:   Fri, 31 Aug 2018 08:00:02 -0600

https.c: remove unneeded test in verify_ssl_cipher()
SSL_get_version never returns a string containing SSL with libressl

Diffstat:
Mhttps.c | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/https.c b/https.c @@ -136,15 +136,11 @@ int verify_ssl_certificate(links_ssl *ssl, unsigned char *host) int verify_ssl_cipher(links_ssl *ssl) { - const char *method, *cipher; - method = SSL_get_version(ssl->ssl); - if (!strncmp(method, "SSL", 3)) - return S_INSECURE_CIPHER; + const char *cipher; if (SSL_get_cipher_bits(ssl->ssl, NULL) < 112) return S_INSECURE_CIPHER; if ((cipher = SSL_get_cipher_name(ssl->ssl))) - if (strstr(cipher, "RC4") - || strstr(cipher, "NULL")) + if (strstr(cipher, "RC4") || strstr(cipher, "NULL")) return S_INSECURE_CIPHER; return 0; }