charon-nm: Add dependencies to CERT_DECODE and PRIVKEY plugin features

This ensures the NM-specific credential set is unloaded before any
implementation of certificate/key objects, which causes a segmentation
fault during shutdown.
This commit is contained in:
Tobias Brunner 2013-02-26 15:43:30 +01:00
parent 3651c8dcd5
commit 1b33e6c4ca

View 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);