Fix "no-ec"
authorRichard Levitte <levitte@openssl.org>
Fri, 3 Feb 2017 12:56:54 +0000 (13:56 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 3 Feb 2017 19:37:23 +0000 (20:37 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2547)

ssl/t1_lib.c

index dd1e86573b842adc3b7f49ca525b0191e25192a9..1534a54f39fab8382fd9de63fde670148b398be3 100644 (file)
@@ -2279,7 +2279,9 @@ int tls_choose_sigalg(SSL *s)
 {
     if (SSL_IS_TLS13(s)) {
         size_t i;
+#ifndef OPENSSL_NO_EC
         int curve = -1;
+#endif
 
         /* Look for a certificate matching shared sigaglgs */
         for (i = 0; i < s->cert->shared_sigalgslen; i++) {
@@ -2305,6 +2307,7 @@ int tls_choose_sigalg(SSL *s)
                     continue;
             }
             if (lu->sig == EVP_PKEY_EC) {
+#ifndef OPENSSL_NO_EC
                 if (curve == -1) {
                     EC_KEY *ec = EVP_PKEY_get0_EC_KEY(c->privatekey);
 
@@ -2312,6 +2315,9 @@ int tls_choose_sigalg(SSL *s)
                 }
                 if (curve != lu->curve)
                     continue;
+#else
+                continue;
+#endif
             }
             s->s3->tmp.sigalg = lu;
             s->s3->tmp.cert_idx = idx;