aboutsummaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2017-02-16 01:29:14 +0000
committerDr. Stephen Henson <steve@openssl.org>2017-02-16 01:44:28 +0000
commit7b3a4d610731929d4fde15411f9be9b883974980 (patch)
treeb9b1c8d9682a059283830d4061c0400b02f040ee /ssl
parentaf7e05c7c60b87723efccc01f6d03ebc07cdd93c (diff)
downloadopenssl-7b3a4d610731929d4fde15411f9be9b883974980.tar.gz
Fix warning
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2644)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/t1_lib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index 6aa4decfe1..787f487e4c 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -2320,7 +2320,7 @@ int ssl_security_cert_chain(SSL *s, STACK_OF(X509) *sk, X509 *x, int vfy)
*/
int tls_choose_sigalg(SSL *s, int *al)
{
- int idx;
+ int idx = -1;
const SIGALG_LOOKUP *lu = NULL;
if (SSL_IS_TLS13(s)) {
@@ -2443,6 +2443,11 @@ int tls_choose_sigalg(SSL *s, int *al)
}
}
}
+ if (idx == -1) {
+ *al = SSL_AD_INTERNAL_ERROR;
+ SSLerr(SSL_F_TLS_CHOOSE_SIGALG, ERR_R_INTERNAL_ERROR);
+ return 0;
+ }
s->s3->tmp.cert = &s->cert->pkeys[idx];
s->cert->key = s->s3->tmp.cert;
s->s3->tmp.sigalg = lu;