From 8fd19b20beca97a2ef804058f099cf54f12f7614 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 10 Feb 2017 04:22:18 +0000 Subject: [PATCH] Check index >= 0 as 0 is a valid index. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/2587) --- ssl/t1_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 43340d4d49..d6a841a82f 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1601,7 +1601,7 @@ int tls1_process_sigalgs(SSL *s) if (SSL_IS_TLS13(s) && sigptr->sig == EVP_PKEY_RSA) continue; idx = tls12_get_pkey_idx(sigptr->sig); - if (idx > 0 && pmd[idx] == NULL) { + if (idx >= 0 && pmd[idx] == NULL) { md = ssl_md(sigptr->hash_idx); pmd[idx] = md; pvalid[idx] = CERT_PKEY_EXPLICIT_SIGN; -- 2.25.1