Commit 137bfe8381 for strongswan.org
commit 137bfe8381bedece30b85bfbd261e57d26e42590
Author: Jarno Mäkelä <jarno.makela@iki.fi>
Date: Sun Oct 11 07:34:15 2026 +0300
charon-nm: Report missing private key to NetworkManager
When cert-source is "file" or "agent" and the corresponding key/socket
is absent, add_auth_cfg_cert() returned FALSE without setting a GError.
NMVpnServicePlugin then called g_dbus_method_invocation_take_error()
with the NULL error, which hit a GLib assertion, so no D-Bus reply
was sent. NetworkManager waited for its call to time out with no
message.
Signed-off-by: Jarno Mäkelä <jarno.makela@iki.fi>
diff --git a/src/charon-nm/nm/nm_service.c b/src/charon-nm/nm/nm_service.c
index e9ebe233ba..a3084ffc10 100644
--- a/src/charon-nm/nm/nm_service.c
+++ b/src/charon-nm/nm/nm_service.c
@@ -692,6 +692,13 @@ static bool add_auth_cfg_cert(NMStrongswanPluginPrivate *priv,
}
else
{
+ if (!*err)
+ {
+ g_set_error(err, NM_VPN_PLUGIN_ERROR,
+ NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
+ agent ? "SSH agent socket is missing."
+ : "Private key file is missing.");
+ }
DESTROY_IF(cert);
return FALSE;
}