EAP-TLS server: Fix EMSK derivation with TLS v1.3
The new label string for TLS-Exporter was taken into use for MSK derivation, but it was missed from EMSK deriation in the server side implementation. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f8aed720e4
commit
2d26434ac7
1 changed files with 5 additions and 1 deletions
|
@ -330,11 +330,15 @@ static u8 * eap_tls_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
|
||||||
{
|
{
|
||||||
struct eap_tls_data *data = priv;
|
struct eap_tls_data *data = priv;
|
||||||
u8 *eapKeyData, *emsk;
|
u8 *eapKeyData, *emsk;
|
||||||
const char *label = "client EAP encryption";
|
const char *label;
|
||||||
|
|
||||||
if (data->state != SUCCESS)
|
if (data->state != SUCCESS)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (data->ssl.tls_v13)
|
||||||
|
label = "EXPORTER_EAP_TLS_Key_Material";
|
||||||
|
else
|
||||||
|
label = "client EAP encryption";
|
||||||
eapKeyData = eap_server_tls_derive_key(sm, &data->ssl, label,
|
eapKeyData = eap_server_tls_derive_key(sm, &data->ssl, label,
|
||||||
EAP_TLS_KEY_LEN + EAP_EMSK_LEN);
|
EAP_TLS_KEY_LEN + EAP_EMSK_LEN);
|
||||||
if (eapKeyData) {
|
if (eapKeyData) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue