]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
charon-nm: Parse any type of private key in need_secrets
authorSC Lee <lsc@lv6.tw>
Mon, 9 Jul 2018 09:54:25 +0000 (17:54 +0800)
committerTobias Brunner <tobias@strongswan.org>
Mon, 9 Jul 2018 10:21:43 +0000 (12:21 +0200)
Previously, when the user supplied an ECDSA key for public key authentication,
the user was always asked to provide a password, even if the key was not
encrypted.

Related: 954f73ea6e7e ("charon-nm: Parse any type of private key not only RSA")
Closes strongswan/strongswan#108.

src/charon-nm/nm/nm_service.c

index a12f008a7520f46f3b5c2431e1efa31b81282d8a..fb9044d29aa8e37fd519eb4d163869f86f9dc5f2 100644 (file)
@@ -698,7 +698,7 @@ static gboolean need_secrets(NMVpnServicePlugin *plugin, NMConnection *connectio
 
                                /* try to load/decrypt the private key */
                                key = lib->creds->create(lib->creds, CRED_PRIVATE_KEY,
-                                                               KEY_RSA, BUILD_FROM_FILE, path, BUILD_END);
+                                                               KEY_ANY, BUILD_FROM_FILE, path, BUILD_END);
                                if (key)
                                {
                                        key->destroy(key);