Fix TLSv1.3 exporter
[openssl.git] / ssl / tls13_enc.c
index 55e68c60db1178d517e2023ddeafc5a156bbd846..92b1f198ab6bba0af097406c5b144d5ce71de778 100644 (file)
@@ -622,7 +622,7 @@ int tls13_export_keying_material(SSL *s, unsigned char *out, size_t olen,
             || EVP_DigestFinal_ex(ctx, hash, &hashsize) <= 0
             || !tls13_hkdf_expand(s, md, s->exporter_master_secret,
                                   (const unsigned char *)label, llen, NULL,
-                                  exportsecret, 0)
+                                  exportsecret, hashsize)
             || !tls13_hkdf_expand(s, md, exportsecret, exporterlabel,
                                   sizeof(exporterlabel) - 1, hash, out, olen))
         goto err;