From: Cristian Stoica Date: Wed, 29 Jun 2016 15:30:58 +0000 (+0300) Subject: fix warning unused-but-set-variable 'nostrict' (no-dh and no-ec) X-Git-Tag: OpenSSL_1_0_2p~72 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=76b8b6932d17414b460f72e15ba8050d609ce768;p=oweals%2Fopenssl.git fix warning unused-but-set-variable 'nostrict' (no-dh and no-ec) This patch fixes the following warning when OpenSSL is configured with no-dh and no-ec: ./Configure no-ec no-dh linux-x86_64 ... s3_lib.c:4231:9: warning: variable 'nostrict' set but not used [-Wunused-but-set-variable] int nostrict = 1; ^ CLA: trivial Signed-off-by: Cristian Stoica Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/6087) --- diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 7e27dae35b..45b84a86e5 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -4228,7 +4228,9 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p) #ifndef OPENSSL_NO_ECDSA int have_ecdsa_sign = 0; #endif +#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ECDH) int nostrict = 1; +#endif unsigned long alg_k; /* If we have custom certificate types set, use them */ @@ -4238,8 +4240,10 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p) } /* get configured sigalgs */ siglen = tls12_get_psigalgs(s, 1, &sig); +#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ECDH) if (s->cert->cert_flags & SSL_CERT_FLAGS_CHECK_TLS_STRICT) nostrict = 0; +#endif for (i = 0; i < siglen; i += 2, sig += 2) { switch (sig[1]) { case TLSEXT_signature_rsa: