mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
eap-tls-common: Update to private key API changes
This commit is contained in:
parent
299af7fc39
commit
e609981b61
@ -176,12 +176,10 @@ int eap_tls_common_settings_check(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",
|
||||||
@ -205,8 +203,7 @@ int eap_tls_common_settings_check(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