charon-nm: Add dependencies to CERT_DECODE and PRIVKEY plugin features
authorTobias Brunner <tobias@strongswan.org>
Tue, 26 Feb 2013 14:43:30 +0000 (15:43 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 19 Mar 2013 15:25:26 +0000 (16:25 +0100)
This ensures the NM-specific credential set is unloaded before any
implementation of certificate/key objects, which causes a segmentation
fault during shutdown.

src/charon-nm/nm/nm_backend.c

index 5bb2ed9..c18bf99 100644 (file)
@@ -173,6 +173,10 @@ void nm_backend_register()
                PLUGIN_CALLBACK((plugin_feature_callback_t)nm_backend_cb, NULL),
                        PLUGIN_PROVIDE(CUSTOM, "NetworkManager backend"),
                                PLUGIN_DEPENDS(CUSTOM, "libcharon"),
+                               PLUGIN_SDEPEND(PRIVKEY, KEY_RSA),
+                               PLUGIN_SDEPEND(PRIVKEY, KEY_ECDSA),
+                               PLUGIN_SDEPEND(CERT_DECODE, CERT_ANY),
+                               PLUGIN_SDEPEND(CERT_DECODE, CERT_X509),
        };
        lib->plugins->add_static_features(lib->plugins, "nm-backend", features,
                                                                          countof(features), TRUE);