[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Tue Jul 18 16:05:39 UTC 2017


The branch master has been updated
       via  00848ea842f911dac4e10bb39a08bb4b6de9e66a (commit)
      from  6b84e6bf19f5afad338f22a1a6d71a75d2d95fbf (commit)


- Log -----------------------------------------------------------------
commit 00848ea842f911dac4e10bb39a08bb4b6de9e66a
Author: Matt Caswell <matt at openssl.org>
Date:   Tue Jul 18 16:11:20 2017 +0100

    Tolerate a zero length ticket nonce
    
    TLSv1.3 draft-21 requires the ticket nonce to be at least 1 byte in length.
    However NSS sends a zero length nonce. This is actually ok because the next
    draft will allow zero length nonces anyway, so we should tolerate this.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3957)

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

Summary of changes:
 ssl/statem/extensions.c  | 4 ----
 ssl/statem/statem_clnt.c | 1 -
 2 files changed, 5 deletions(-)

diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c
index 9e25a3e..ab9f0d3 100644
--- a/ssl/statem/extensions.c
+++ b/ssl/statem/extensions.c
@@ -1259,10 +1259,6 @@ int tls_psk_do_binder(SSL *s, const EVP_MD *md, const unsigned char *msgstart,
     if (external) {
         psk = sess->master_key;
     } else {
-        if (sess->ext.tick_nonce == NULL) {
-            SSLerr(SSL_F_TLS_PSK_DO_BINDER, SSL_R_BAD_PSK);
-            goto err;
-        }
         psk = tmppsk;
         if (!tls13_hkdf_expand(s, md, sess->master_key,
                                (const unsigned char *)nonce_label,
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index ed9bd5c..cef0df8 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -2429,7 +2429,6 @@ MSG_PROCESS_RETURN tls_process_new_session_ticket(SSL *s, PACKET *pkt)
         || (SSL_IS_TLS13(s)
             && (!PACKET_get_net_4(pkt, &age_add)
                 || !PACKET_get_length_prefixed_1(pkt, &nonce)
-                || PACKET_remaining(&nonce) == 0
                 || !PACKET_memdup(&nonce, &s->session->ext.tick_nonce,
                                   &s->session->ext.tick_nonce_len)))
         || !PACKET_get_net_2(pkt, &ticklen)


More information about the openssl-commits mailing list