mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 04:02:15 +02:00
cliopthelper: Extend support for encrypted EC private keys
The ClientAPI::EvalConfig::privateKeyPasswordRequired bool flag was not set correctly when the private key was an encrypted EC key. This flag is set in EvalConfig by OpenVPNClient::parse_config() when it calls ParseClientConfig::privateKeyPasswordRequired(). Signed-off-by: David Sommerseth <davids@openvpn.net>
This commit is contained in:
parent
acec6e80ee
commit
1668f1cd9b
@ -215,6 +215,7 @@ namespace openvpn {
|
||||
const std::string& key_txt = o->get(1, Option::MULTILINE);
|
||||
privateKeyPasswordRequired_ = (
|
||||
key_txt.find("-----BEGIN RSA PRIVATE KEY-----\nProc-Type: 4,ENCRYPTED\n") != std::string::npos
|
||||
|| key_txt.find("-----BEGIN EC PRIVATE KEY-----\nProc-Type: 4,ENCRYPTED\n") != std::string::npos
|
||||
|| key_txt.find("-----BEGIN ENCRYPTED PRIVATE KEY-----") != std::string::npos
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user