Make no-psk compile without warnings.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 11 Sep 2015 16:08:11 +0000 (17:08 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 11 Oct 2015 12:38:01 +0000 (13:38 +0100)
PR#4035

Reviewed-by: Matt Caswell <matt@openssl.org>
apps/s_server.c
ssl/s3_lib.c
ssl/ssl_cert.c

index f70539301ee1414f328e684f3663d34fd12ee0dc..aa43541501b4eb56c63f4be3f54df4a1173c9480 100644 (file)
@@ -1316,10 +1316,6 @@ int s_server_main(int argc, char *argv[])
                 goto end;
             }
             break;
-#else
-        case OPT_PSK_HINT:
-        case OPT_PSK:
-            break;
 #endif
 #ifndef OPENSSL_NO_SRP
         case OPT_SRPVFILE:
index 4b11e60abd3e1e36297deede532f524e4f15e665..5e7b618e494df543a5f7a401614488583051b122 100644 (file)
@@ -5228,8 +5228,9 @@ int ssl_generate_master_secret(SSL *s, unsigned char *pms, size_t pmslen,
             s->method->ssl3_enc->generate_master_secret(s,
                                                         s->session->master_key,
                                                         pms, pmslen);
-
+#ifndef OPENSSL_NO_PSK
     err:
+#endif
     if (pms) {
         if (free_pms)
             OPENSSL_clear_free(pms, pmslen);
index 7571095932b9072910a043a59a9ce6e2d44f3ad9..1caa3c85e34d4ac46d621441d3ee41c6b03ec156 100644 (file)
@@ -333,13 +333,13 @@ CERT *ssl_cert_dup(CERT *cert)
         goto err;
     if (!custom_exts_copy(&ret->srv_ext, &cert->srv_ext))
         goto err;
-
+#ifndef OPENSSL_NO_PSK
     if (cert->psk_identity_hint) {
         ret->psk_identity_hint = BUF_strdup(cert->psk_identity_hint);
         if (ret->psk_identity_hint == NULL)
             goto err;
     }
-
+#endif
     return (ret);
 
  err: