TLS: Add a debug information on unsupported private key format
Provide easier to understand reason for failure to use the old OpenSSL encrypted private key format. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
e670738ae0
commit
e770c497eb
1 changed files with 7 additions and 0 deletions
|
@ -244,10 +244,17 @@ static struct crypto_private_key * tlsv1_set_key_pem(const u8 *key, size_t len)
|
||||||
if (!end)
|
if (!end)
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
|
const u8 *pos2;
|
||||||
pos += os_strlen(pem_key_begin);
|
pos += os_strlen(pem_key_begin);
|
||||||
end = search_tag(pem_key_end, pos, key + len - pos);
|
end = search_tag(pem_key_end, pos, key + len - pos);
|
||||||
if (!end)
|
if (!end)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
pos2 = search_tag("Proc-Type: 4,ENCRYPTED", pos, end - pos);
|
||||||
|
if (pos2) {
|
||||||
|
wpa_printf(MSG_DEBUG, "TLSv1: Unsupported private key "
|
||||||
|
"format (Proc-Type/DEK-Info)");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
der = base64_decode(pos, end - pos, &der_len);
|
der = base64_decode(pos, end - pos, &der_len);
|
||||||
|
|
Loading…
Reference in a new issue