Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
48ac88d
Fix `GError` handling
sjaeckel Oct 9, 2025
2fb56b8
Fix some more untyped APIs
sjaeckel Oct 9, 2025
1aeb19a
Print PID in debug logs.
sjaeckel Oct 10, 2025
79ff9ba
Fix OMEMO startup
sjaeckel Oct 10, 2025
24c3b5d
Add new command `/changes`
sjaeckel Nov 3, 2025
7f5ae43
Fix more memleaks
sjaeckel Nov 3, 2025
ad82a6e
Prepare to use SHA256 fingerprints of certs.
sjaeckel Nov 4, 2025
1c335e4
Retrieve and save new fingerprints from libstrophe.
sjaeckel Nov 4, 2025
b7f4c24
Use the stronger certificate fingerprint.
sjaeckel Nov 4, 2025
532b9d6
Free in reverse order.
sjaeckel Nov 4, 2025
a6510c7
Simplify `conf_string_list_{add,remove}()` implementations.
sjaeckel Nov 12, 2025
5fc8925
Use `gboolean` consistently.
sjaeckel Nov 12, 2025
ff35cb0
Refactor tlscerts.
sjaeckel Nov 12, 2025
f7a0990
Minor improvements.
sjaeckel Nov 12, 2025
b19d92e
Minor improve theme
sjaeckel Nov 14, 2025
d06bf74
Fix overwriting new accounts when running multiple instances.
sjaeckel Nov 14, 2025
ac68978
Simplify `accounts_get_account()`.
sjaeckel Nov 14, 2025
950bb0e
Consistency please.
sjaeckel Nov 14, 2025
93d6beb
When renaming an account, copy all existing keys.
sjaeckel Nov 14, 2025
61cb167
Fix reconnect when no account has been set up yet.
sjaeckel Nov 14, 2025
337409a
Minor fixes of accounts.
sjaeckel Nov 14, 2025
91b5818
Fix invalid free after `/omemo gen`
sjaeckel Nov 14, 2025
aa1e22f
Fix memory leaks when OMEMO keys have not been generated yet.
sjaeckel Nov 14, 2025
57ec5c8
Don't publish keys if the server doesn't support pubsub.
sjaeckel Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
# if this check fails, you have to update the number of auto types known and the list of auto types in the check below
- name: Check auto types are up-to-date
run: |
[[ "$(find src -type f -name '*.[ch]' -exec awk '/^#define auto_[\W]*/ {print $2}' '{}' \; | sort -u | wc -l)" == "8" ]] || exit -1
[[ "$(find src -type f -name '*.[ch]' -exec awk '/^#define auto_[\W]*/ {print $2}' '{}' \; | sort -u | wc -l)" == "9" ]] || exit -1
- name: Check auto types are initialized
run: |
grep -P 'auto_(char|gchar|gcharv|guchar|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
grep -P 'auto_(char|gchar|gcharv|gerror|guchar|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
- name: Run clang-format
uses: jidicula/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ endif

TESTS = tests/unittests/unittests
check_PROGRAMS = tests/unittests/unittests
tests_unittests_unittests_CPPFLAGS = -Itests/
tests_unittests_unittests_CPPFLAGS = -I$(srcdir)/tests/
tests_unittests_unittests_SOURCES = $(unittest_sources)
tests_unittests_unittests_LDADD = -lcmocka

Expand Down Expand Up @@ -348,7 +348,7 @@ endif

.PHONY: my-prof.supp
my-prof.supp:
@sed '/^# AUTO-GENERATED START/q' prof.supp > $@
@sed '/^# AUTO-GENERATED START/q' $(srcdir)/prof.supp > $@
@printf "\n\n# glib\n" >> $@
@cat /usr/share/glib-2.0/valgrind/glib.supp >> $@
@printf "\n\n# Python\n" >> $@
Expand Down
13 changes: 13 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,19 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([[
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([libstrophe is broken, check config.log for details])])

AC_MSG_CHECKING([whether libstrophe has XMPP_CERT_PUBKEY_FINGERPRINT_SHA256 support])
AC_LINK_IFELSE([AC_LANG_SOURCE([[
#include <strophe.h>

int main() {
xmpp_tlscert_get_string(NULL, XMPP_CERT_PUBKEY_FINGERPRINT_SHA256);
return 1;
}
]])],
[AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_XMPP_CERT_PUBKEY_FINGERPRINT_SHA256], [1], [Have XMPP_CERT_PUBKEY_FINGERPRINT_SHA256])],
[AC_MSG_RESULT(no)])

## Check for curses library
PKG_CHECK_MODULES([ncursesw], [ncursesw],
[NCURSES_CFLAGS="$ncursesw_CFLAGS"; NCURSES_LIBS="$ncursesw_LIBS"; CURSES="ncursesw"],
Expand Down
3 changes: 2 additions & 1 deletion src/command/cmd_ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,9 @@ cmd_ac_init(void)
autocomplete_add(tls_property_ac, "force");
autocomplete_add(tls_property_ac, "allow");
autocomplete_add(tls_property_ac, "trust");
autocomplete_add(tls_property_ac, "legacy");
autocomplete_add(tls_property_ac, "direct");
autocomplete_add(tls_property_ac, "disable");
autocomplete_add(tls_property_ac, "legacy");
Comment on lines +856 to +858
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about that? I plan to add a similar flag to libstrophe.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!


autocomplete_add(auth_property_ac, "default");
autocomplete_add(auth_property_ac, "legacy");
Expand Down
29 changes: 22 additions & 7 deletions src/command/cmd_defs.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ static gboolean _cmd_has_tag(Command* pcmd, const char* const tag);
* Command list
*/

#define CMD_TLS_DIRECT "Use direct TLS for the connection. It means TLS handshake is started right after TCP connection is established."
#define CMD_TLS_LEGACY "Alternative keyword for 'direct', which was created when one still thought that 'STARTTLS' is the future."

// clang-format off
static const struct cmd_t command_defs[] = {
{ CMD_PREAMBLE("/help",
Expand Down Expand Up @@ -146,7 +149,7 @@ static const struct cmd_t command_defs[] = {
CMD_TAG_CONNECTION)
CMD_SYN(
"/connect [<account>]",
"/connect <account> [server <server>] [port <port>] [tls force|allow|trust|legacy|disable] [auth default|legacy]",
"/connect <account> [server <server>] [port <port>] [tls force|allow|trust|direct|disable|legacy] [auth default|legacy]",
"/connect <server>")
CMD_DESC(
"Login to a chat service. "
Expand All @@ -161,8 +164,9 @@ static const struct cmd_t command_defs[] = {
{ "tls force", "Force TLS connection, and fail if one cannot be established, this is default behaviour." },
{ "tls allow", "Use TLS for the connection if it is available." },
{ "tls trust", "Force TLS connection and trust server's certificate." },
{ "tls legacy", "Use legacy TLS for the connection. It means server doesn't support STARTTLS and TLS is forced just after TCP connection is established." },
{ "tls direct", CMD_TLS_DIRECT },
{ "tls disable", "Disable TLS for the connection." },
{ "tls legacy", CMD_TLS_LEGACY },
{ "auth default", "Default authentication process." },
{ "auth legacy", "Allow legacy authentication." })
CMD_EXAMPLES(
Expand Down Expand Up @@ -2070,7 +2074,7 @@ static const struct cmd_t command_defs[] = {
"/account set <account> pgpkeyid <pgpkeyid>",
"/account set <account> startscript <script>",
"/account set <account> clientid \"<name> <version>\"",
"/account set <account> tls force|allow|trust|legacy|disable",
"/account set <account> tls force|allow|trust|direct|disable|legacy",
"/account set <account> auth default|legacy",
"/account set <account> theme <theme>",
"/account set <account> session_alarm <max_sessions>",
Expand Down Expand Up @@ -2116,8 +2120,9 @@ static const struct cmd_t command_defs[] = {
{ "set <account> tls force", "Force TLS connection, and fail if one cannot be established, this is default behaviour." },
{ "set <account> tls allow", "Use TLS for the connection if it is available." },
{ "set <account> tls trust", "Force TLS connection and trust server's certificate." },
{ "set <account> tls legacy", "Use legacy TLS for the connection. It means server doesn't support STARTTLS and TLS is forced just after TCP connection is established." },
{ "set <account> tls direct", CMD_TLS_DIRECT },
{ "set <account> tls disable", "Disable TLS for the connection." },
{ "set <account> tls legacy", CMD_TLS_LEGACY },
{ "set <account> auth default", "Use default authentication process." },
{ "set <account> auth legacy", "Allow legacy authentication." },
{ "set <account> theme <theme>", "Set the UI theme for the account." },
Expand Down Expand Up @@ -2352,6 +2357,15 @@ static const struct cmd_t command_defs[] = {
"/omemo char *")
},

{ CMD_PREAMBLE("/changes",
parse_args, 0, 0, NULL)
CMD_MAINFUNC(cmd_changes)
CMD_SYN(
"/changes")
CMD_DESC(
"Show changes from saved configuration file.")
},

Comment on lines +2360 to +2368
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one? I was sometimes wondering what I've modified at runtime and had no way to find out before

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually a super cool idea!

{ CMD_PREAMBLE("/save",
parse_args, 0, 0, NULL)
CMD_MAINFUNC(cmd_save)
Expand Down Expand Up @@ -2650,7 +2664,7 @@ static const struct cmd_t command_defs[] = {
CMD_TAGS(
CMD_TAG_CONNECTION)
CMD_SYN(
"/register <username> <server> [port <port>] [tls force|allow|trust|legacy|disable]")
"/register <username> <server> [port <port>] [tls force|allow|trust|direct|disable|legacy]")
CMD_DESC(
"Register an account on a server.")
CMD_ARGS(
Expand All @@ -2660,8 +2674,9 @@ static const struct cmd_t command_defs[] = {
{ "tls force", "Force TLS connection, and fail if one cannot be established. This is the default behavior." },
{ "tls allow", "Use TLS for the connection if it is available." },
{ "tls trust", "Force TLS connection and trust the server's certificate." },
{ "tls legacy", "Use legacy TLS for the connection. This forces TLS just after the TCP connection is established. Use when a server doesn't support STARTTLS." },
{ "tls disable", "Disable TLS for the connection." })
{ "tls direct", CMD_TLS_DIRECT },
{ "tls disable", "Disable TLS for the connection." },
{ "tls legacy", CMD_TLS_LEGACY })
CMD_EXAMPLES(
"/register odin valhalla.edda ",
"/register freyr vanaheimr.edda port 5678",
Expand Down
Loading