From bbd60a96ecd0e190625c68bedca4e46928ee2b4d Mon Sep 17 00:00:00 2001 From: Simon Chopin Date: Tue, 30 Nov 2021 13:56:56 +0100 Subject: fish: enable the legacy provider if build against OpenSSL3 OpenSSL 3.0 disables a number of "legacy" algorithms by default, and we need to enable them manually using their provider system. Note that explicitly loading a provider will disable the implicit default provider, which is why we need to load it explicitly. Closes #2629 Signed-off-by: Simon Chopin V2: * use a local OSSL_LIB_CTX to avoid leaking the legacy algorithms into the main SSL context. * Simplify the fish_init() error paths by calling fish_deinit() --- plugins/fishlim/plugin_hexchat.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/fishlim/plugin_hexchat.c') diff --git a/plugins/fishlim/plugin_hexchat.c b/plugins/fishlim/plugin_hexchat.c index 93e28487..a8b127f2 100644 --- a/plugins/fishlim/plugin_hexchat.c +++ b/plugins/fishlim/plugin_hexchat.c @@ -815,6 +815,9 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle, hexchat_hook_server_attrs(ph, "TOPIC", HEXCHAT_PRI_NORM, handle_incoming, NULL); hexchat_hook_server_attrs(ph, "332", HEXCHAT_PRI_NORM, handle_incoming, NULL); + if (!fish_init()) + return 0; + if (!dh1080_init()) return 0; @@ -828,6 +831,7 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle, int hexchat_plugin_deinit(void) { g_clear_pointer(&pending_exchanges, g_hash_table_destroy); dh1080_deinit(); + fish_deinit(); hexchat_printf(ph, "%s plugin unloaded\n", plugin_name); return 1; -- cgit 1.4.1