Commit Graph

57 Commits

Author SHA1 Message Date
Martin Dosch
ce89cd94b9
Improve file name for private ox keys. 2024-02-21 20:01:51 +01:00
Martin Dosch
55e16b417d
Make comment more precise. 2024-02-17 12:57:47 +01:00
Martin Dosch
ae4a727cef
Use human readable file name for private Ox keys. 2024-02-17 12:46:27 +01:00
Martin Dosch
fc1342ab29
Update go modules. 2024-01-10 16:21:39 +01:00
Martin Dosch
802f57d404
[gofumpt]: Improve formatting. 2023-11-25 19:52:55 +01:00
Martin Dosch
d482347310
Switch back to upstream go-xmpp library. 2023-11-11 14:30:23 +01:00
Martin Dosch
7dbbcf45e7
Add support for SCRAM PLUS variants and mechanism pinning. 2023-11-02 21:29:07 +01:00
Martin Dosch
a034a8e501
Temporarily switch to go-xmpp fork. 2023-11-02 21:05:16 +01:00
Martin Dosch
b004015e18
Don't unwrap errors when checking errors. 2023-08-16 08:49:43 +02:00
Martin Dosch
5f8f8e019c
Fix typo. 2023-06-07 22:46:51 +02:00
Martin Dosch
aad725b721
Unbreak function heads. 2023-06-07 22:33:43 +02:00
Martin Dosch
a912408d16
Wrap and unwrap errors. 2023-06-07 22:28:01 +02:00
Martin Dosch
61027844d2
[golangci-lint]: Don't use magic numbers. 2023-06-06 10:47:41 +02:00
Martin Dosch
b8c7876b77
Remove unused iqc. 2023-06-06 10:47:41 +02:00
Martin Dosch
8a52c0ca44
Rename delete to del. 2023-06-06 10:47:41 +02:00
Martin Dosch
620130aded
gofumpt 2023-06-06 10:47:40 +02:00
Martin Dosch
b9610c81a4
[golangci-lint]: Check for errors on file.Close(). 2023-06-04 16:39:00 +02:00
Martin Dosch
fd3d9f0d9f
[golangci-lint]: regexp: Simplify code. 2023-06-04 16:00:16 +02:00
Martin Dosch
a0b6c045c7
[golangci-lint]: Use constant for result. 2023-06-04 15:57:23 +02:00
Martin Dosch
d85cf8fee7
[golangci-lint]: Use constant for error. 2023-06-04 15:55:31 +02:00
Martin Dosch
437cd7eec6
Remove copyright years. 2023-05-11 20:06:23 +02:00
Martin Dosch
e381942708
Use single quotes for stanzas created by beevik/etree.
Squashed commit of the following:

commit 8e33952869831f620fa289f1bc997128a40eaee3
Author: Martin Dosch <martin@mdosch.de>
Date:   Tue May 9 21:22:40 2023 +0200

    Clean go.mod

commit 11bb88fca2d4bb76557e912f46f726e675e0b0cb
Merge: 8d45413 b01ed4b
Author: Martin Dosch <martin@mdosch.de>
Date:   Tue May 9 21:21:48 2023 +0200

    Merge branch 'master' into singlequotes

commit 8d45413f05
Author: Martin Dosch <martin@mdosch.de>
Date:   Tue May 2 09:39:54 2023 +0200

    Add more singlequotes. :)

commit c496e2596a
Author: Martin Dosch <martin@mdosch.de>
Date:   Tue May 2 09:35:12 2023 +0200

    Use single quotes.

commit e4556759d8
Author: Martin Dosch <martin@mdosch.de>
Date:   Tue May 2 07:25:09 2023 +0200

    Use single quotes for XML attributes.
2023-05-09 21:23:29 +02:00
Martin Dosch
8819c4f13d
Don't capitalize error messages. 2023-04-09 14:56:22 +02:00
Martin Dosch
dd9566eaee
Move string validation into own helper function. 2022-11-05 12:40:40 +01:00
Martin Dosch
cb033bbf59
Improve error handling in XML parsing. 2022-09-02 11:05:42 +02:00
Martin Dosch
ce8f783301 Ox: Don't encrypt empty messages. 2022-07-04 16:20:17 +02:00
Martin Dosch
25d73bbe07 Ox: Improve log messages. 2022-05-05 15:56:53 +02:00
Martin Dosch
e340828cb5 Improve deleting pubkeys. 2022-05-04 12:12:10 +02:00
Martin Dosch
4d38661174 Ox: Improve private key import. 2022-05-04 11:42:42 +02:00
Martin Dosch
f26a91d965 Add possibility to delete Ox nodes. 2022-05-04 11:18:24 +02:00
Martin Dosch
52adb579d8 Don't capitalize error strings (staticcheck). 2022-05-03 14:20:32 +02:00
Martin Dosch
2f2a2fd4fd Rework receiving stanzas.
Calling client.Recv() multiple times caused messages not appear
in `--listen` mode as calling Recv() for receiving IQs (e.g. for
receiving Ox keys) also received the messages so they were no longer
available for the Recv in the listening function.
2022-05-03 12:25:43 +02:00
Martin Dosch
0e852f6b2c Ox: Improve time stamp parsing. 2022-05-02 16:35:25 +02:00
Martin Dosch
a196856f76 Ox: Improve stability of decrypting.
Accept all allowed time stamps and remove invalid xml chars from
decrypted messages.
2022-04-30 13:27:44 +02:00
Martin Dosch
10c9986e7d Ox: Add support for receiving and decrypting Ox messages. 2022-04-30 13:06:04 +02:00
Martin Dosch
6556ab1188 Ox: Change rpad from random length to length dependent on message length
The length of message + the length of the rpad will always be a
total length of a multiple of 100.
2022-04-29 11:36:41 +02:00
Martin Dosch
23b2437ad1 Ox: Also publish pubkey for imported privkeys
Check whether the public key is already in pubsub,
if not publish it.
2022-04-28 11:35:14 +02:00
Martin Dosch
b092039ac3 Ox: Allow also RSA key generation. 2022-04-26 19:47:22 +02:00
Martin Dosch
b25ba60415 Don't set email for Ox private key.
Prior to this commit [1] it was necessary to provide a
name and an email address for key generation. So the
UID of the key had the format `xmpp:user@example.com
<xmpp:user@example.com>` whereas XEP-0373 defines the
UID in the format `xmpp:user@example.com`.

[1] 74905cd51f
2022-04-26 19:14:08 +02:00
Martin Dosch
07d3491c2a Just create key file if key generation is requested. 2022-04-25 22:50:31 +02:00
Martin Dosch
bfb5e28a03 Change variable names and error strings [golint]. 2022-04-25 21:29:14 +02:00
Martin Dosch
8aab6810d2 Change from encoding/xml to etree. 2022-04-24 01:20:39 +02:00
Martin Dosch
8764f03eec Change from encoding/xml to etree. 2022-04-24 00:56:44 +02:00
Martin Dosch
dd4a9c9bed Fix Ox encryption. 2022-04-24 00:33:17 +02:00
Martin Dosch
28c5884044 Change from encoding/xml to etree. 2022-04-23 23:59:19 +02:00
Martin Dosch
11cf616e99 Change from encoding/xml to etree. 2022-04-23 23:34:03 +02:00
Martin Dosch
5d36173be7 Use proper variable names for etree xml. 2022-04-23 13:19:42 +02:00
Martin Dosch
aa8e79aa88 Ox: Add store hint. 2022-04-22 13:22:37 +02:00
Martin Dosch
33066fea8a Ox: Remove from
The server will add it anyway so don't perform
unnecessary tasks, also it's not in XEP-0373
examples.
2022-04-21 19:06:16 +02:00
Martin Dosch
19dee4b8fd Ox: (Hopefully) support multiple pubkeys in result.
See https://xmpp.org/extensions/xep-0373.html#discover-pubkey
2022-04-21 17:28:59 +02:00