Commit 76b8b693 authored by Cristian Stoica's avatar Cristian Stoica Committed by Richard Levitte
Browse files

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: default avatarCristian Stoica <cristian.stoica@nxp.com>

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6087)
parent aadcf069
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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: