Fix no-psk
authorMatt Caswell <matt@openssl.org>
Mon, 14 May 2018 13:28:06 +0000 (14:28 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 14 May 2018 16:43:19 +0000 (17:43 +0100)
Fixes #6239

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6253)

ssl/s3_lib.c

index c5f22359d52680de62c2eb74e63b11afb3291025..354769b0c107a6bc38b441fce8870584d9866038 100644 (file)
@@ -4192,6 +4192,7 @@ const SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
     }
 
     if (SSL_IS_TLS13(s)) {
+#ifndef OPENSSL_NO_PSK
         int j;
 
         /*
@@ -4208,6 +4209,7 @@ const SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
                 prefer_sha256 = 1;
             }
         }
+#endif
     } else {
         tls1_set_cert_validity(s);
         ssl_set_masks(s);