summaryrefslogtreecommitdiffstats
path: root/ssl/tls13_enc.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-07-05 20:53:03 +0100
committerMatt Caswell <matt@openssl.org>2017-08-31 15:02:22 +0100
commitadd8d0e9e0bb80728f4b89d15573bf2e70596ceb (patch)
tree6cae02f58f6a3996a1288bedf14183d6a408dec8 /ssl/tls13_enc.c
parent177503752b24299cc97ccf07062a3b79c4f28899 (diff)
Enable the ability to use an external PSK for sending early_data
Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
Diffstat (limited to 'ssl/tls13_enc.c')
-rw-r--r--ssl/tls13_enc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c
index ac5d06cf58..1a6ed98d10 100644
--- a/ssl/tls13_enc.c
+++ b/ssl/tls13_enc.c
@@ -404,6 +404,9 @@ int tls13_change_cipher_state(SSL *s, int which)
SSL_R_BAD_HANDSHAKE_LENGTH);
goto err;
}
+
+ if (sslcipher == NULL && s->psksession != NULL)
+ sslcipher = SSL_SESSION_get0_cipher(s->psksession);
if (sslcipher == NULL) {
SSLerr(SSL_F_TLS13_CHANGE_CIPHER_STATE, ERR_R_INTERNAL_ERROR);
goto err;