mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-06-25 07:19:24 +00:00
Compare commits
9 Commits
flatpak-fl
...
b8e03ff6c1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8e03ff6c1 | ||
| 54b1703d67 | |||
| 15d647a0ec | |||
|
|
353558ddb3 | ||
|
|
9f58d30050 | ||
|
|
4f0632cdf1 | ||
|
|
ff8ba71948 | ||
|
|
a367591327 | ||
|
|
c91925fbc2 |
@@ -91,27 +91,13 @@ static const signed char fish_unbase64[256] = {
|
|||||||
#include <openssl/provider.h>
|
#include <openssl/provider.h>
|
||||||
static OSSL_PROVIDER *legacy_provider;
|
static OSSL_PROVIDER *legacy_provider;
|
||||||
static OSSL_PROVIDER *default_provider;
|
static OSSL_PROVIDER *default_provider;
|
||||||
static OSSL_LIB_CTX *ossl_ctx;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int fish_init(void)
|
int fish_init(void)
|
||||||
{
|
{
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||||
ossl_ctx = OSSL_LIB_CTX_new();
|
legacy_provider = OSSL_PROVIDER_load(NULL, "legacy");
|
||||||
if (!ossl_ctx)
|
default_provider = OSSL_PROVIDER_load(NULL, "default");
|
||||||
return 0;
|
|
||||||
|
|
||||||
legacy_provider = OSSL_PROVIDER_load(ossl_ctx, "legacy");
|
|
||||||
if (!legacy_provider) {
|
|
||||||
fish_deinit();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
default_provider = OSSL_PROVIDER_load(ossl_ctx, "default");
|
|
||||||
if (!default_provider) {
|
|
||||||
fish_deinit();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -129,10 +115,6 @@ void fish_deinit(void)
|
|||||||
default_provider = NULL;
|
default_provider = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ossl_ctx) {
|
|
||||||
OSSL_LIB_CTX_free(ossl_ctx);
|
|
||||||
ossl_ctx = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,7 +260,9 @@ char *fish_cipher(const char *plaintext, size_t plaintext_len, const char *key,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||||
cipher = EVP_CIPHER_fetch(ossl_ctx, "BF-CBC", NULL);
|
cipher = EVP_CIPHER_fetch(NULL, "BF-CBC", NULL);
|
||||||
|
if (!cipher)
|
||||||
|
cipher = (EVP_CIPHER *) EVP_bf_cbc();
|
||||||
#else
|
#else
|
||||||
cipher = (EVP_CIPHER *) EVP_bf_cbc();
|
cipher = (EVP_CIPHER *) EVP_bf_cbc();
|
||||||
#endif
|
#endif
|
||||||
@@ -286,7 +270,9 @@ char *fish_cipher(const char *plaintext, size_t plaintext_len, const char *key,
|
|||||||
} else if (mode == EVP_CIPH_ECB_MODE) {
|
} else if (mode == EVP_CIPH_ECB_MODE) {
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||||
cipher = EVP_CIPHER_fetch(ossl_ctx, "BF-ECB", NULL);
|
cipher = EVP_CIPHER_fetch(NULL, "BF-ECB", NULL);
|
||||||
|
if (!cipher)
|
||||||
|
cipher = (EVP_CIPHER *) EVP_bf_ecb();
|
||||||
#else
|
#else
|
||||||
cipher = (EVP_CIPHER *) EVP_bf_ecb();
|
cipher = (EVP_CIPHER *) EVP_bf_ecb();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
zoitechat_commandf(ph, "quote NOTICE %s :DH1080_FINISH %s%s", sender, pub_key, (mode == FISH_CBC_MODE) ? " CBC" : "");
|
zoitechat_commandf(ph, "quote NOTICE %s :DH1080_FINISH %s%s", sender, pub_key, (mode == FISH_CBC_MODE) ? " CBC" : "");
|
||||||
g_free(pub_key);
|
g_free(pub_key);
|
||||||
} else {
|
} else {
|
||||||
zoitechat_print(ph, "Failed to generate keys");
|
zoitechat_printf(ph, "Failed to generate keys");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
} else if (!strcmp (dh_message, "DH1080_FINISH")) {
|
} else if (!strcmp (dh_message, "DH1080_FINISH")) {
|
||||||
@@ -446,7 +446,7 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
zoitechat_printf(ph, "Stored new key for %s (%s)", sender, fish_modes[mode]);
|
zoitechat_printf(ph, "Stored new key for %s (%s)", sender, fish_modes[mode]);
|
||||||
g_free(secret_key);
|
g_free(secret_key);
|
||||||
} else {
|
} else {
|
||||||
zoitechat_print(ph, "Failed to create secret key!");
|
zoitechat_printf(ph, "Failed to create secret key!");
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@@ -548,7 +548,7 @@ static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((query_ctx && ctx_type != 3) || (!query_ctx && !irc_is_query(target))) {
|
if ((query_ctx && ctx_type != 3) || (!query_ctx && !irc_is_query(target))) {
|
||||||
zoitechat_print(ph, "You can only exchange keys with individuals");
|
zoitechat_printf(ph, "You can only exchange keys with individuals");
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -560,7 +560,7 @@ static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
|
|||||||
|
|
||||||
g_free(pub_key);
|
g_free(pub_key);
|
||||||
} else {
|
} else {
|
||||||
zoitechat_print(ph, "Failed to generate keys");
|
zoitechat_printf(ph, "Failed to generate keys");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
@@ -577,7 +577,7 @@ static int handle_crypt_topic(char *word[], char *word_eol[], void *userdata) {
|
|||||||
GSList *encrypted_list;
|
GSList *encrypted_list;
|
||||||
|
|
||||||
if (!*topic) {
|
if (!*topic) {
|
||||||
zoitechat_print(ph, usage_topic);
|
zoitechat_printf(ph, "%s", usage_topic);
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -624,7 +624,7 @@ static int handle_crypt_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
GSList *encrypted_list, *encrypted_item;
|
GSList *encrypted_list, *encrypted_item;
|
||||||
|
|
||||||
if (!*target || !*notice) {
|
if (!*target || !*notice) {
|
||||||
zoitechat_print(ph, usage_notice);
|
zoitechat_printf(ph, "%s", usage_notice);
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -676,7 +676,7 @@ static int handle_crypt_msg(char *word[], char *word_eol[], void *userdata) {
|
|||||||
GSList *encrypted_list, *encrypted_item;
|
GSList *encrypted_list, *encrypted_item;
|
||||||
|
|
||||||
if (!*target || !*message) {
|
if (!*target || !*message) {
|
||||||
zoitechat_print(ph, usage_msg);
|
zoitechat_printf(ph, "%s", usage_msg);
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -805,11 +805,15 @@ int zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
|
|||||||
zoitechat_hook_server_attrs(ph, "TOPIC", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
zoitechat_hook_server_attrs(ph, "TOPIC", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
||||||
zoitechat_hook_server_attrs(ph, "332", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
zoitechat_hook_server_attrs(ph, "332", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
||||||
|
|
||||||
if (!fish_init())
|
if (!fish_init()) {
|
||||||
|
zoitechat_printf(ph, "FiSHLiM failed to initialize crypto backend");
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!dh1080_init())
|
if (!dh1080_init()) {
|
||||||
|
zoitechat_printf(ph, "FiSHLiM failed to initialize DH1080");
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
pending_exchanges = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
|
pending_exchanges = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
|
||||||
|
|
||||||
|
|||||||
17
readme.md
17
readme.md
@@ -31,12 +31,19 @@
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
ZoiteChat is an HexChat based IRC client for Windows and UNIX-like operating systems.
|
ZoiteChat is a GTK3 IRC client based on HexChat, available for Windows and UNIX-like operating systems.
|
||||||
See [IRCHelp.org](http://irchelp.org) for information about IRC in general.
|
|
||||||
For more information on ZoiteChat please read our [documentation](https://docs.zoitechat.org/):
|
|
||||||
- [Downloads](https://zoitechat.org/download)
|
|
||||||
|
|
||||||
- [Troubleshooting](troubleshooting.md)
|
Features include HexChat-compatible Python, Perl and Lua scripting support, a plugin API,
|
||||||
|
multiple server/channel windows, spell checking, multiple authentication methods including SASL,
|
||||||
|
and customizable notifications.
|
||||||
|
|
||||||
|
See [IRCHelp.org](http://irchelp.org) for information about IRC in general.
|
||||||
|
|
||||||
|
For more information on ZoiteChat:
|
||||||
|
|
||||||
|
- [Main Documentation](https://docs.zoitechat.org/) and [FAQ](https://docs.zoitechat.org/en/latest/faq.html)
|
||||||
|
|
||||||
|
- [Downloads](https://zoitechat.org/download.php)
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -2705,7 +2705,6 @@ mg_changui_destroy (session *sess)
|
|||||||
/* it fixes: Gdk-CRITICAL **: gdk_colormap_get_screen: */
|
/* it fixes: Gdk-CRITICAL **: gdk_colormap_get_screen: */
|
||||||
/* assertion `GDK_IS_COLORMAP (cmap)' failed */
|
/* assertion `GDK_IS_COLORMAP (cmap)' failed */
|
||||||
ret = sess->gui->window;
|
ret = sess->gui->window;
|
||||||
g_free (sess->gui);
|
|
||||||
sess->gui = NULL;
|
sess->gui = NULL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -2727,13 +2726,17 @@ mg_link_irctab (session *sess, int focus)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
session_gui *old_gui;
|
||||||
|
|
||||||
mg_unpopulate (sess);
|
mg_unpopulate (sess);
|
||||||
|
old_gui = sess->gui;
|
||||||
win = mg_changui_destroy (sess);
|
win = mg_changui_destroy (sess);
|
||||||
mg_changui_new (sess, sess->res, 1, focus);
|
mg_changui_new (sess, sess->res, 1, focus);
|
||||||
/* the buffer is now attached to a different widget */
|
/* the buffer is now attached to a different widget */
|
||||||
((xtext_buffer *)sess->res->buffer)->xtext = (GtkXText *)sess->gui->xtext;
|
((xtext_buffer *)sess->res->buffer)->xtext = (GtkXText *)sess->gui->xtext;
|
||||||
if (win)
|
if (win)
|
||||||
gtk_widget_destroy (win);
|
gtk_widget_destroy (win);
|
||||||
|
g_free (old_gui);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user