mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:59:22 +01:00
eap-tls-common: Validate successful loading of keys/certs
This commit is contained in:
parent
f1f826ee81
commit
645b72be06
@ -507,16 +507,16 @@ static bool eap_tls_tunnel_init(struct eap_state *eap)
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!l_tls_set_auth_data(eap_tls->tunnel, eap_tls->client_cert,
|
if (!l_tls_set_auth_data(eap_tls->tunnel, eap_tls->client_cert,
|
||||||
eap_tls->client_key,
|
eap_tls->client_key,
|
||||||
eap_tls->passphrase)) {
|
eap_tls->passphrase) ||
|
||||||
l_error("%s: Failed to set authentication data.",
|
(eap_tls->ca_cert &&
|
||||||
|
!l_tls_set_cacert(eap_tls->tunnel,
|
||||||
|
eap_tls->ca_cert))) {
|
||||||
|
l_error("%s: Error loading TLS keys or certificates.",
|
||||||
eap_get_method_name(eap));
|
eap_get_method_name(eap));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eap_tls->ca_cert)
|
|
||||||
l_tls_set_cacert(eap_tls->tunnel, eap_tls->ca_cert);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user