mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
eap-tls, ttls, peap: Update for private key API changes
This commit is contained in:
parent
007d972046
commit
299af7fc39
@ -953,12 +953,10 @@ static int eap_peap_check_settings(struct l_settings *settings,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
|
struct l_key *priv_key;
|
||||||
bool encrypted;
|
bool encrypted;
|
||||||
uint8_t *priv_key;
|
|
||||||
size_t size;
|
|
||||||
|
|
||||||
priv_key = l_pem_load_private_key(path, passphrase,
|
priv_key = l_pem_load_private_key(path, passphrase, &encrypted);
|
||||||
&encrypted, &size);
|
|
||||||
if (!priv_key) {
|
if (!priv_key) {
|
||||||
if (!encrypted) {
|
if (!encrypted) {
|
||||||
l_error("Error loading client private key %s",
|
l_error("Error loading client private key %s",
|
||||||
@ -982,8 +980,7 @@ static int eap_peap_check_settings(struct l_settings *settings,
|
|||||||
passphrase_entry, NULL, path,
|
passphrase_entry, NULL, path,
|
||||||
EAP_CACHE_TEMPORARY);
|
EAP_CACHE_TEMPORARY);
|
||||||
} else {
|
} else {
|
||||||
memset(priv_key, 0, size);
|
l_key_free(priv_key);
|
||||||
l_free(priv_key);
|
|
||||||
|
|
||||||
if (passphrase && !encrypted) {
|
if (passphrase && !encrypted) {
|
||||||
l_error("%s present but client private "
|
l_error("%s present but client private "
|
||||||
|
@ -459,12 +459,10 @@ static int eap_tls_check_settings(struct l_settings *settings,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
|
struct l_key *priv_key;
|
||||||
bool encrypted;
|
bool encrypted;
|
||||||
uint8_t *priv_key;
|
|
||||||
size_t size;
|
|
||||||
|
|
||||||
priv_key = l_pem_load_private_key(path, passphrase,
|
priv_key = l_pem_load_private_key(path, passphrase, &encrypted);
|
||||||
&encrypted, &size);
|
|
||||||
if (!priv_key) {
|
if (!priv_key) {
|
||||||
if (!encrypted) {
|
if (!encrypted) {
|
||||||
l_error("Error loading client private key %s",
|
l_error("Error loading client private key %s",
|
||||||
@ -488,8 +486,7 @@ static int eap_tls_check_settings(struct l_settings *settings,
|
|||||||
passphrase_setting, NULL, path,
|
passphrase_setting, NULL, path,
|
||||||
EAP_CACHE_TEMPORARY);
|
EAP_CACHE_TEMPORARY);
|
||||||
} else {
|
} else {
|
||||||
memset(priv_key, 0, size);
|
l_key_free(priv_key);
|
||||||
l_free(priv_key);
|
|
||||||
|
|
||||||
if (passphrase && !encrypted) {
|
if (passphrase && !encrypted) {
|
||||||
l_error("%s present but client private "
|
l_error("%s present but client private "
|
||||||
|
@ -1221,12 +1221,10 @@ static int eap_ttls_check_settings(struct l_settings *settings,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
|
struct l_key *priv_key;
|
||||||
bool encrypted;
|
bool encrypted;
|
||||||
uint8_t *priv_key;
|
|
||||||
size_t size;
|
|
||||||
|
|
||||||
priv_key = l_pem_load_private_key(path, passphrase,
|
priv_key = l_pem_load_private_key(path, passphrase, &encrypted);
|
||||||
&encrypted, &size);
|
|
||||||
if (!priv_key) {
|
if (!priv_key) {
|
||||||
if (!encrypted) {
|
if (!encrypted) {
|
||||||
l_error("Error loading client private key %s",
|
l_error("Error loading client private key %s",
|
||||||
@ -1250,8 +1248,7 @@ static int eap_ttls_check_settings(struct l_settings *settings,
|
|||||||
passphrase_setting, NULL, path,
|
passphrase_setting, NULL, path,
|
||||||
EAP_CACHE_TEMPORARY);
|
EAP_CACHE_TEMPORARY);
|
||||||
} else {
|
} else {
|
||||||
memset(priv_key, 0, size);
|
l_key_free(priv_key);
|
||||||
l_free(priv_key);
|
|
||||||
|
|
||||||
if (passphrase && !encrypted) {
|
if (passphrase && !encrypted) {
|
||||||
l_error("%s present but client private "
|
l_error("%s present but client private "
|
||||||
|
Loading…
Reference in New Issue
Block a user