The branch master has been updated
       via  71a64af3312d4dfdff2597a979868d2bdd7e3642 (commit)
       via  9076bd25bfad9c661cad928331295bd5ec9b5af3 (commit)
      from  c69ce9351336f5b4a8b33890756b3fd185528210 (commit)


- Log -----------------------------------------------------------------
commit 71a64af3312d4dfdff2597a979868d2bdd7e3642
Author: Dr. Stephen Henson <[email protected]>
Date:   Sat Sep 12 03:53:40 2015 +0100

    Skip PSK tests for no-psk
    
    Reviewed-by: Matt Caswell <[email protected]>

commit 9076bd25bfad9c661cad928331295bd5ec9b5af3
Author: Dr. Stephen Henson <[email protected]>
Date:   Fri Sep 11 17:08:11 2015 +0100

    Make no-psk compile without warnings.
    
    PR#4035
    
    Reviewed-by: Matt Caswell <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 apps/s_server.c            |  4 ----
 ssl/s3_lib.c               |  3 ++-
 ssl/ssl_cert.c             |  4 ++--
 test/recipes/80-test_ssl.t | 16 ++++++++++++----
 4 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/apps/s_server.c b/apps/s_server.c
index f705393..aa43541 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -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:
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 4b11e60..5e7b618 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -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);
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index 7571095..1caa3c8 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -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:
diff --git a/test/recipes/80-test_ssl.t b/test/recipes/80-test_ssl.t
index f84425d..6e5e22e 100644
--- a/test/recipes/80-test_ssl.t
+++ b/test/recipes/80-test_ssl.t
@@ -468,11 +468,19 @@ sub testssl {
                 'test tlsv1 with 1024bit RSA, 1024bit DHE, multiple 
handshakes');
            }
        }
-       ok(run(test([@ssltest, "-tls1", "-cipher", "PSK", "-psk", "abc123", 
@extra])),
-          'test tls1 with PSK');
+    {
+        SKIP: {
+               skip "skipping PSK tests", 2
+               if ($no_psk);
+
+               ok(run(test([@ssltest, "-tls1", "-cipher", "PSK", "-psk", 
"abc123", @extra])),
+               'test tls1 with PSK');
+
+               ok(run(test([@ssltest, "-bio_pair", "-tls1", "-cipher", "PSK", 
"-psk", "abc123", @extra])),
+               'test tls1 with PSK via BIO pair');
+        }
+    }
 
-       ok(run(test([@ssltest, "-bio_pair", "-tls1", "-cipher", "PSK", "-psk", 
"abc123", @extra])),
-          'test tls1 with PSK via BIO pair');
     };
 
     subtest 'Next Protocol Negotiation Tests' => sub {
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to