3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

eap-tls, ttls, peap: Update for private key API changes

This commit is contained in:
Andrew Zaborowski 2018-11-21 16:14:03 +01:00 committed by Denis Kenzior
parent 007d972046
commit 299af7fc39
3 changed files with 9 additions and 18 deletions

View File

@ -953,12 +953,10 @@ static int eap_peap_check_settings(struct l_settings *settings,
}
if (path) {
struct l_key *priv_key;
bool encrypted;
uint8_t *priv_key;
size_t size;
priv_key = l_pem_load_private_key(path, passphrase,
&encrypted, &size);
priv_key = l_pem_load_private_key(path, passphrase, &encrypted);
if (!priv_key) {
if (!encrypted) {
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,
EAP_CACHE_TEMPORARY);
} else {
memset(priv_key, 0, size);
l_free(priv_key);
l_key_free(priv_key);
if (passphrase && !encrypted) {
l_error("%s present but client private "

View File

@ -459,12 +459,10 @@ static int eap_tls_check_settings(struct l_settings *settings,
}
if (path) {
struct l_key *priv_key;
bool encrypted;
uint8_t *priv_key;
size_t size;
priv_key = l_pem_load_private_key(path, passphrase,
&encrypted, &size);
priv_key = l_pem_load_private_key(path, passphrase, &encrypted);
if (!priv_key) {
if (!encrypted) {
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,
EAP_CACHE_TEMPORARY);
} else {
memset(priv_key, 0, size);
l_free(priv_key);
l_key_free(priv_key);
if (passphrase && !encrypted) {
l_error("%s present but client private "

View File

@ -1221,12 +1221,10 @@ static int eap_ttls_check_settings(struct l_settings *settings,
}
if (path) {
struct l_key *priv_key;
bool encrypted;
uint8_t *priv_key;
size_t size;
priv_key = l_pem_load_private_key(path, passphrase,
&encrypted, &size);
priv_key = l_pem_load_private_key(path, passphrase, &encrypted);
if (!priv_key) {
if (!encrypted) {
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,
EAP_CACHE_TEMPORARY);
} else {
memset(priv_key, 0, size);
l_free(priv_key);
l_key_free(priv_key);
if (passphrase && !encrypted) {
l_error("%s present but client private "