Enable the ability to use an external PSK for sending early_data
[openssl.git] / ssl / tls13_enc.c
index ac5d06c..1a6ed98 100644 (file)
@@ -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;