Fix the max psk len for TLSv1.3
authorMatt Caswell <matt@openssl.org>
Wed, 19 Sep 2018 09:09:39 +0000 (10:09 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 21 Sep 2018 16:56:57 +0000 (17:56 +0100)
If using an old style TLSv1.2 PSK callback then the maximum possible PSK
len is PSK_MAX_PSK_LEN (256) - not 64.

Fixes #7261

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7267)

(cherry picked from commit f39a02c68abc8936db24499cb3cfcba206a2e7eb)

ssl/ssl_locl.h

index 8afb117372b035ec96a35b81e20bc7d01ef20cc8..440a5d6c19d8f2473d23026295517af5ff3f2d29 100644 (file)
@@ -471,7 +471,7 @@ struct ssl_method_st {
     long (*ssl_ctx_callback_ctrl) (SSL_CTX *s, int cb_id, void (*fp) (void));
 };
 
-# define TLS13_MAX_RESUMPTION_PSK_LENGTH      64
+# define TLS13_MAX_RESUMPTION_PSK_LENGTH      PSK_MAX_PSK_LEN
 
 /*-
  * Lets make this into an ASN.1 type structure as follows