Coder Social home page Coder Social logo

lurch's Introduction

lurch 0.7.0

/lʊʁç/. In German, an Axolotl is a type of Lurch, which simply means 'amphibian'. This plugin brings Axolotl, by now renamed to double ratchet, to libpurple applications such as Pidgin by implementing the XEP-0384: OMEMO Encryption. For a higher-level overview, see the official OMEMO homepage.

(Plus I thought the word sounds funny.)

News

This section is now the changelog.

Table of Contents

  1. Installation
    1. Linux
    2. Windows
    3. MacOS
    4. Additional plugins
  2. Usage
    1. General
    2. Group Chats
  3. Uninstallation
  4. Troubleshooting
  5. FAQ
  6. Caveats

Installation

Linux

1. Install the (submodules') dependencies

Below you can find the command to install the dependencies for popular distribution families. Make sure that you use at least version 2.7 of mxml, and 2.10.10 of libpurple.

Debian, Ubuntu

sudo apt install git cmake libpurple-dev libmxml-dev libxml2-dev libsqlite3-dev libgcrypt20-dev build-essential

ArchLinux, Parabola

sudo pacman -S base-devel git cmake pidgin libpurple mxml libxml2 sqlite libgcrypt

Fedora

sudo dnf install git cmake libpurple-devel mxml-devel libxml2-devel libsqlite3x-devel libgcrypt-devel
2A. EITHER: Build and install from source
git clone https://github.com/gkdr/lurch/
cd lurch
git submodule update --init --recursive
make install-home

If you just pull a newer version (git pull), remember to also update the submodules as they might have changed!

The last command compiles the whole thing and copies the plugin into your local libpurple plugin directory.

The next time you start Pidgin, or another libpurple client, you should be able to activate it in the "Plugins" window.

2B. OR: Install from a community repo

Windows

Thanks to EionRobb, Windows users can use the dlls he compiled and provides here: https://eion.robbmob.com/lurch/

  1. Download the plugin (lurch.dll) and put it in the Program Files (x86)\Pidgin\plugins directory.
  2. Download libgcrypt-20.dll and libgpg-error-0.dll and put them in the Program Files (x86)\Pidgin directory.

These instructions can also be found at the provided link.

MacOS

Homebrew should have all dependencies:

brew install cmake pidgin glib libxml2 libmxml sqlite libgcrypt

This should work on newer versions of MacOS, but if you run into problems check out #8 for some hints. Complete instructions on how to get this running with Pidgin appreciated!

Alternatively, if you use Adium, you should definitely check out shtrom's Lurch4Adium!

Additional plugins

The current version of libpurple's XMPP protocol plugin does not support many XEPs by itself. For more features and compatibility with other clients such as Conversations you can install the pulgins below.

carbons

If you have multiple devices and want messages sent and received by one device show up on all others, XEP-0280: Message Carbons is what you are looking for.

You can find my plugin for it here: https://github.com/gkdr/carbons

pidgin-xmpp-receipts

In order to support the checkmarks for delivered messages, you could install this plugin implementing XEP-0184: Message Delivery Receipts:

https://app.assembla.com/spaces/pidgin-xmpp-receipts/git/source

Usage

General

The first thing you can do to check if this plugin works is enter the /lurch help command in any conversation window. You will receive a list of the other commands you can use. I know this is a bit clunky, but using the command interface for interactions makes the plugin usable in clients that do not have a GUI.

After you have made sure it was installed correctly, you do not have to activate it specifically for each conversation partner you want to use it with, unlike with e.g. OTR. If it detects that the other side is using OMEMO (by the existence of an OMEMO devicelist), the conversation will be encrypted automatically. If you do not want this, you can blacklist the user by typing /lurch blacklist add in the conversation window.

This plugin will set the window title to notify the user if encryption is enabled or not. If it is, it will generally not send plaintext messages. If a plaintext message is received in a chat that is supposed to be encrypted, the user will be warned.

Group Chats

Group chats (via XEP-0045: Multi-User Chat aka MUCs) are not part of the OMEMO specification, but can work under specific circumstances as outlined on the Conversations README. These are:

  • The MUC has to be non-anonymous so the real JID of each participant is visible. The channel owner has to set this property. In Pidgin you can get there by typing /config.
  • Every participant has to be in every other participant's contact list! This is why this really only makes sense for member-only MUCs.

Once you have confirmed these conditions are met, every member has to activate OMEMO him- or herself. Using this plugin it works by typing /lurch enable. Warning messages are displayed if it does not work for every user in the conference, hopefully helping to fix the issue.

It is recommended you confirm the fingerprints look the same on each device, including among your own. To do this, you can e.g. display all fingerprints participating in a conversation using /lurch show fp conv.

Uninstallation

In order to uninstall this plugin, you should call the /lurch uninstall command. It will remove this client from the OMEMO device list, notifying other OMEMO clients that they do not need to encrypt messages for it any longer.

Afterwards, you can just deactivate the plugin in the Tools > Plugins window.

In order to completely remove all data related to this plugin, e.g. for a fresh installation, you will need to delete the following files from your .purple directory:

  • [email protected]_omemo_db.sqlite to delete the device list cache
  • [email protected]_axc_db.sqlite to delete your keypair and all sessions with other devices
  • and finally, lurch.[so|dll] found in the plugins directory

Troubleshooting

If something does not work as expected, don't hesitate to open an issue. You can also reach me on the Pidgin IRC channel (#pidgin on freenode) as riba, or send me an email.

It will usually be helpful (i.e. I will probably ask for it anyway) if you provide me with some information from the debug log, which you can find at Help > Debug Window in Pidgin. There, you will see a scary error from the XML parser every time you receive a message, which you can safely ignore. It is due to the nonstandard namespace used by OMEMO and looks something like this: jabber: XML parser error for JabberStream 0x5631ed678670: Domain 3, code 100, level 1: xmlns: URI eu.siacs.conversations.axolotl is not absolute.

In addition to just reading logs, you can get a bit more active, as again I will probably ask for this anyway. Pidgin comes with an XMPP console, but you have to activate the plugin first (Tools > Plugins). Afterwards you can find it at Tools > XMPP Console and send queries to the server.

If you are having trouble sending or receiving messages, you should look up if you can find the device in the device list. You can do so by pasting the following into the XMPP console, replacing the to attribute with the device's owner's JID:

<iq type='get'
    to='b@localhost'
    id='whatever123'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <items node='eu.siacs.conversations.axolotl.devicelist'/>
  </pubsub>
</iq>

Sometimes, a device might be on the list, but it did not publish a bundle, which is necessary to establish a session. In this case, you can query this bundle by pasting the following, replacing the to attribute as well as the DEVICE_ID suffix of the bundles node:

<iq type='get' 
    to='b@localhost'
    id='whatever456'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <items node='eu.siacs.conversations.axolotl.bundles:DEVICE_ID' max_items='1'/>
  </pubsub>
</iq>

Finally, in case it is more serious and Pidgin crashes, I will have to ask you for a backtrace. You can obtain it in the following way:

  • Open Pidgin in gdb: gdb pidgin
  • Run it: run
  • Do whatever you were doing to make it crash
  • When it does crash, type bt (or backtrace)
  • Copy the whole thing

FAQ

Can it talk to other OMEMO clients?

Yes, it was (briefly) tested with:

See https://omemo.top/ for additional clients.

Does it work with Finch?

It should, but I only tried it briefly.

Caveats

OMEMO is not 'whatever Conversations can do', but a very specific XEP.

For instance, if you don't install the additional plugin mentioned above, this is probably not the right thing to use if you have multiple clients running at the same time, as there is no message carbons support in libpurple as of now.

At the moment, there is no XEP-0313: Message Archive Management aka MAM support in libpurple, so there are no 'offline messages'.

Finally, I can't stress this enough: This plugin is highly experimental, so you should not trust your life on it.

lurch's People

Contributors

adrianheine avatar agx avatar arthurzenika avatar axelsimon avatar craftyguy avatar defanor avatar fortysixandtwo avatar gkdr avatar hasufell avatar jomo avatar lunarthegrey avatar msiism avatar norpol avatar puleglot avatar root-hardenedvault avatar shtrom avatar sledz avatar turion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lurch's Issues

INVALID KEY from libaxolotl when trying to build session from bundle

Since I updated to 0.6.0, the encryption broke again. I made sure to log off of every other account, but that still didn't help.

(4:53:33 PM) There was an error encrypting the message and it was not sent. You can try again, or try to find the problem by looking at the debug log.

(16:53:15) util: Writing file prefs.xml to directory C:\Users\Aladar\AppData\Roaming\.purple
(16:53:15) util: Writing file C:\Users\Aladar\AppData\Roaming\.purple\prefs.xml
(16:53:15) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplea59e1680' to='[email protected]'><composing xmlns='http://jabber.org/protocol/chatstates'/></message>
(16:53:19) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplea59e1681' to='[email protected]'><active xmlns='http://jabber.org/protocol/chatstates'/></message>
(16:53:22) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplea59e1682' to='[email protected]'><composing xmlns='http://jabber.org/protocol/chatstates'/></message>
(16:53:24) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplea59e1683' to='[email protected]'><active xmlns='http://jabber.org/protocol/chatstates'/></message>
(16:53:27) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplea59e1684' to='[email protected]'><composing xmlns='http://jabber.org/protocol/chatstates'/></message>
(16:53:30) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplea59e1685' to='[email protected]'><active xmlns='http://jabber.org/protocol/chatstates'/></message>
(16:53:33) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplea59e1686' to='[email protected]'><composing xmlns='http://jabber.org/protocol/chatstates'/></message>
(16:53:33) lurch: retrieved devicelist for [email protected]:
<publish node="eu.siacs.conversations.axolotl.devicelist"><item><list
xmlns="eu.siacs.conversations.axolotl"><device id="154..." /></list></item></publish>

(16:53:33) lurch: retrieved own devicelist:
<publish node="eu.siacs.conversations.axolotl.devicelist"><item><list
xmlns="eu.siacs.conversations.axolotl"><device id="331..." /><device
id="102¨..." /></list></item></publish>

(16:53:33) lurch: lurch_msg_finalize_encryption: [email protected] has device without session 154..., requesting bundle
(16:53:33) lurch: lurch_bundle_request_do: [email protected]/ is requesting bundle from [email protected]:154...
(16:53:33) jabber: Sending (ssl) ([email protected]/.): <iq type='get' to='[email protected]' id='[email protected]#154...#638...'><pubsub xmlns='http://jabber.org/protocol/pubsub'><items node='eu.siacs.conversations.axolotl.bundles:154...' max_items='1'/></pubsub></iq>
(16:53:33) lurch: lurch_bundle_request_do: ...request sent
(16:53:33) g_log: xmlnode_to_str_helper: assertion `node != NULL' failed
(16:53:33) g_log: jabber_send_raw: assertion `data != NULL' failed
(16:53:33) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplea59e1689' to='[email protected]'><active xmlns='http://jabber.org/protocol/chatstates'/></message>
(16:53:33) jabber: Recv (ssl)(4095): <iq id='[email protected]#154...#638...' type='result' to='[email protected]/.' from='[email protected]'><pubsub xmlns='http://jabber.org/protocol/pubsub'><items node='eu.siacs.conversations.axolotl.bundles:154...'><item id='1'><bundle xmlns='eu.siacs.conversations.axolotl'><signedPreKeyPublic signedPreKeyId='2'>
</signedPreKeyPublic><signedPreKeySignature>
FmEjt6oaBA==
</signedPreKeySignature><identityKey>
</identityKey><prekeys><preKeyPublic 
(16:53:33) jabber: XML parser error for JabberStream 0524BCA8: Domain 3, code 100, level 1: xmlns: URI eu.siacs.conversations.axolotl is not absolute
(16:53:33) jabber: Recv (ssl)(4095): ol
</preKeyPublic><preKeyPublic preKeyId='190'>
(16:53:33) jabber: Recv (ssl)(2): N

(16:53:33) jabber: Recv (ssl)(1398): </preKeyPublic>
</preKeyPublic></prekeys></bundle></item></items></pubsub></iq>
(16:53:33) lurch: lurch_bundle_request_cb: [email protected] received bundle update from [email protected]:154...
(16:53:33) lurch: lurch_bundle_create_session: creating a session between [email protected] and [email protected] from a received bundle
(16:53:33) lurch: lurch_bundle_create_session: bundle's device id is 154...
(16:53:33) lurch: lurch_bundle_create_session: failed to create a session from a bundle (-1002)
(16:53:33) lurch: lurch_bundle_request_cb: failed to create a session (-1002)

"Failed to access axc db" whatever action I try

Hy, I have compiled and activated the plugin in pidgin (2.11.0). If I type /lurch help in a window I just get Failed to access axc db. as a result. I've briefly scanned the code but I cannot locate what could be the problem here. Can you help?

lost messages

I set up Lurch with a buddy, everything works just fine. But when my buddy switch to another XMPP-Client without OMEMO support, all messages i sent get lost without further notification. The windowtitle still says (OMEMO) and it lookls like everything works fine. With Conversations my buddy would get this meesage:

I sent you an OMEMO encrypted message but your client doesn’t seem to support that.
Find more information on https://conversations.im/omemo

It would be great if somehow Lurch could also notify us or our chat partner that somthing went wrong.

Thanks

cc: error: unrecognized command line option ‘-Wpedantic’

getting the following error on make
~/lurch# make make -C "./lib/axc" build/libaxc-nt.a make[1]: Entering directory/root/lurch/lib/axc'
cc -fPIC -I./lib/libsignal-protocol-c/src -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -std=c11 -Wall -Wextra -Wpedantic -Wstrict-overflow -fno-strict-aliasing -funsigned-char -fno-builtin-memset -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -DNO_THREADS -c src/axc.c -o build/axc-nt.o
cc: error: unrecognized command line option ‘-Wpedantic’
make[1]: *** [build/axc-nt.o] Error 1
make[1]: Leaving directory /root/lurch/lib/axc' make: *** [lib/axc/build/libaxc-nt.a] Error 2

Additional empty lines in messages received from multi-login jabber-ids

If logged in from two different computers into the same jabber-id and then sending messages to someone else from either computer he will receive additional line-breaks:

(20:04:03) [...]@jabber.ccc.de/theta: message1

(20:04:05) [...]@jabber.ccc.de/theta: message2

instead of:

(20:04:03) [...]@jabber.ccc.de/theta: message1
(20:04:05) [...]@jabber.ccc.de/theta: message2

Explaination in German for further clarification:
Also man muß mehrmals in den selben Account eingeloggt sein (zum Beispiel mit unterschiedlichen Resourcen von unterschiedlichen Computern), wenn man dann eine Nachricht sendet folgt nach der Nachricht ein zusätzlicher Zeilenumbruch. Irgendwie scheint das eingeloggt sein in einen zweiten Account die Nachrichten die man von dem ersten Account sendet dahingehend zu beeinflussen; und umgekehrt. Wenn man sich aus einem der Accounts ausloggt und dann von dem anderen eine Nachricht an jemanden sendet werden keine Zeilenumbrüche mehr gesendet.

glibc 2.10+ requires _POSIX_C_SOURCE >= 200809L for strnlen

This affects uses in lurch.c.
The correct feature test macros must be used for glibc headers to include the strnlen prototype.
Even if the result still builds and links with glibc (not necessarily with other libc implementations), the missing prototype prevents lightweight buffer overflow checking.

"error encrypting the message"

Hi,
I can' send encrypted messages from Pidgin. My system is Linux Mint 17, the receiver has conversations on his mobile. Conversations to conversations works well.

Here are all Debug Errors i get:
(12:57:43) jabber: XML parser error for JabberStream 0x7fe59bf48ca0: Domain 3, code 100, level 1: xmlns: URI eu.siacs.conversations.axolotl is not absolute

(12:57:43) lurch: lurch_bundle_create_session: failed to create a session from a bundle (-1002)
(12:57:43) lurch: lurch_bundle_request_cb: failed to create a session (-1002)

No OMEMO indication in Adium

I don't get any indication about an encrypted session when using OMEMO – my window title stays the same. My conversation partner (with Pidgin) gets the nice "(OMEMO)" added in his window title.
I'm using the pre-packaged Lurch4Adium from June 8th, so the lurch version should be 0.6.5.

Can't see messages sent from my account but from another device

Hi, I'm getting the following message:

I sent you an OMEMO encrypted message but your client doesn’t seem to support that. Find more information on https://conversations.im/omemo

when sending messages from my account from Conversations on my phone.

It looks like Conversations hasn't properly sent its keys to Pidgin/Lurch, or that Lurch hasn't properly received them.
A /lurch show fp conv shows all my devices, including Conversations' OMEMO keys fingerprint:

The devices participating in this conversation and their fingerprints are as follows:
This device's ([email protected]:1939924165) fingerprint:
5d256630 9975f6e6 5e0c64ee 032741cd da4eab9e 8748ca5a 0ed5de66 xxxxxxxx
[email protected]:75786319's fingerprint:
78c01743 c8f1901a 476de76b 49e885df 010d6106 ae0f85f0 fb1bc50f xxxxxxxx

So Lurch knows of Conversations and has its fingerprint. Strange.

Any ideas?

Thanks

Error sending msg to myself

Hi i have myself in the contactlist for memos to myself, but with this plugin i get an error sending a msg to myself, it says:
"(09:14:54) There was an error decrypting an OMEMO message addressed to this device. See the debug log for details."
Where to find the debug log?
Sending msg'es to other people works.

recipe for target 'build/libomemo-conversations.o' failed

Hi! :)
I'm trying to compile this on Debian, but have been failing to do so. Is there anything I've missed?

System

  • Debian Jessie 8.7 (stable)
  • Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u1 (2017-02-22) x86_64

Installed packages: apt-show-versions | egrep 'libpurple-dev|libmxml-dev|libxml2-dev|libsqlite3-dev|libgcrypt20-dev'

libgcrypt20-dev:amd64/jessie 1.6.3-2+deb8u2 uptodate
libmxml-dev:amd64/jessie 2.6-2 uptodate
libpurple-dev:all/jessie 2.11.0-0+deb8u1 uptodate
libsqlite3-dev:amd64/jessie 3.8.7.1-1+deb8u2 uptodate
libxml2-dev:amd64/jessie 2.9.1+dfsg1-5+deb8u4 uptodate

make errors

I'm seeing some errors saying ‘mxmlGetParent’ undeclared, ‘mxmlGetNextSibling’ undeclared, ‘mxmlGetLastChild’ undeclared...
Check the full make output here

fingerprint verification via GUI

for the less nerdy people you should create something clickable to at least just show known fingerprints.
among other places, a config dialog is where people are used to find such information.
in the long run lurch should store key's verification states and support all the verification options that OTR offered, plus options from other OMEMO implementations like QR code.

Not receiving message when multiple devices are used for the same user

Hi,

First many thanks for your plugin as I am trying to aggregate all my accounts to Pidgin, but XMPP is tricky because of OMEMO support.
I am testing it and it is almost working well but I have an issue I can easily reproduce.
I have Conversation + Pidgin on the same account both with OMEMO.
If I am sending message from Pidgin everything is OK, the messages from my correspondent are received on Conversation and Pidgin.
If I write a message from Conversation, if my correspondent is replying to me I only receive the message on Conversation and nothing on Pidgin.
This situation remains until I decide to write one word on Pidgin and send it and everything is working perfectly again (receiving the message from my correspondent in both devices)

Have you encounter the same issue?

Starting a Conversation with OMEMO partner segfaults pidgin on libpurple 2.10.9

After compile/install of lurch pidgin crashes when trying to start a conversation with a contact with enabled omemo (using conversations on android)

Run on
ubuntu 14.04
pidgin/libpurple 2.10.9-0ubuntu3.3

I'm unexperienced to debugging this, but here is a stacktrace, if I can help you debug further I'm happy to help.

Starting program: /usr/bin/pidgin 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffede0d700 (LWP 5227)]
[New Thread 0x7fffed60c700 (LWP 5228)]
[New Thread 0x7fffde890700 (LWP 5229)]
[New Thread 0x7fffd5b9b700 (LWP 5230)]
[New Thread 0x7fffd539a700 (LWP 5231)]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffdd84ee05 in jabber_send_raw () from /usr/lib/purple-2/libjabber.so.0
(gdb) backtrace
#0  0x00007fffdd84ee05 in jabber_send_raw () from /usr/lib/purple-2/libjabber.so.0
#1  0x00007fffdd84f732 in jabber_send_signal_cb () from /usr/lib/purple-2/libjabber.so.0
#2  0x00007ffff50ba203 in purple_signal_emit_vargs () from /usr/lib/libpurple.so.0
#3  0x00007ffff50ba361 in purple_signal_emit () from /usr/lib/libpurple.so.0
#4  0x00007fffdd84d872 in jabber_send () from /usr/lib/purple-2/libjabber.so.0
#5  0x00007fffdd85edb9 in jabber_message_send () from /usr/lib/purple-2/libjabber.so.0
#6  0x00007fffdd85efeb in jabber_message_send_im () from /usr/lib/purple-2/libjabber.so.0
#7  0x00007ffff50b80b5 in serv_send_im () from /usr/lib/libpurple.so.0
#8  0x00007ffff50885b7 in ?? () from /usr/lib/libpurple.so.0
#9  0x00005555555b1d75 in ?? ()
#10 0x00007ffff56783b8 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff5689fd1 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff5690bf1 in g_signal_emitv ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff6587bed in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x00007ffff6588101 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#15 0x00007ffff658834a in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#16 0x00007ffff65893b7 in gtk_bindings_activate_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#17 0x00007ffff66ecab9 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#18 0x00007ffff6634815 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x00007ffff5678332 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#20 0x00007ffff5689afb in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff56916f9 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff5691ce2 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ffff6744684 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#24 0x00007ffff6757efb in gtk_window_propagate_key_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#25 0x00007ffff675a5fb in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#26 0x00007ffff6634815 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#27 0x00007ffff56783b8 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007ffff5689afb in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007ffff56916f9 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#30 0x00007ffff5691ce2 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#31 0x00007ffff6744684 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#32 0x00007ffff6633097 in gtk_propagate_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#33 0x00007ffff663337b in gtk_main_do_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#34 0x00007ffff62ad3ec in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#35 0x00007ffff53a8e04 in g_main_context_dispatch ()
---Type <return> to continue, or q <return> to quit---
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007ffff53a9048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007ffff53a930a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007ffff6632447 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#39 0x000055555558f369 in main ()
(gdb) 

Lurch Updates for Windows

Im not sure if this is the right place to ask but anyway: Is there a way to get Lurch Updates for Windows? Im still on 0.6.3 since EionRobb doesnt upload any new Version anymore. Would be nice if "you" could provide a binary version for "no coders" like me.

Sorry for my nice english skills... have a nice day and sorry if theres another place to ask stuff like this which i dont know...

Missing license

The project doesn't appear to have a license. Since libpurple is GPLv2+, my assumption is that this project intends to adopt that same license (GPLv3+ would be a bonus!).

You can do so by adding a file named COPYING (some use LICENSE) containing the text of the version of the GPL you wish to use. The recommended way of conveying "or later" is to place a copyright header at the top of each source file containing the appropriate cause, just as the files in /headers/jabber do.

See the section "How to Apply These Terms to Your New Programs" here:

https://www.gnu.org/licenses/gpl.html

In any case, thank you for writing free software!

cannot activate plugin on ubuntu 16.04

Hi,
i compiled the plugin according to your instructions, but i cannot activate lurch in the plugin menu, but it is there. pidgin version is 1:2.10.12-0ubuntu5.1.

Any idea?
Otherwise, thanks for your work

No working Makefile in pidgin-2.11.0/libpurple/plugins

Following your exact words, build doesn't complete. It fails at the last stage:

*** Keine Regel, um "lurch.so" zu erstellen. Schluss. ***
There is no makefile in the Purple plugin source path. I tried generating one but failed.

A friend said he would look into doing everything with cmake and might work on that later today.

Also, I had to edit the libomemo and axc makefiles, else they wouldn't work on my system (Gentoo Linux). I'm hesitating to do a pull request since the build still doesn't complete successfully without a working libpurple plugin makefile (and I have no idea how to write one).

Makefile or build description doesn't work

I did the following:

git clone [email protected]:gkdr/lurch.git
cd lurch
mkdir lib
cd lib
git clone [email protected]:gkdr/axc.git
cd ..
make

This doesn't work. The error is:

cd ./lib/axc && make axc-pic
make[1]: Entering directory '/home/turion/Install/lurch/lib/axc'
gcc -fPIC -std=c11 -Wall -Wextra -Wpedantic -Wstrict-overflow -fno-strict-aliasing -funsigned-char -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -fno-builtin-memset -c src/axc.c -o build/axc.o
In file included from /usr/include/inttypes.h:25:0,
                 from src/axc.c:1:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^
src/axc.c:9:29: fatal error: axolotl/axolotl.h: No such file or directory
compilation terminated.
make[1]: *** [makefile:41: axc.o] Error 1
make[1]: Leaving directory '/home/turion/Install/lurch/lib/axc'
make: *** [makefile:36: axc] Error 2

I don't know where to put the proper files. Can you update the Makefile or explain in more detail how this should be built?

Interoperability with standard Omemo clients

Please add interoperability with standard Omemo clients -- this is exactly what this is all about, that we have a standardized encryption so that users can freely pick their favorite client :)

Encryption doesn't work (current Windows build)

New ticket as requested. Plugin now loads, but sends plaintext messages and can't recieve OMEMO encrypted messages.

(19:52:23) plugins: Unloading plugin lurch
(19:52:23) prefs: /pidgin/plugins/loaded changed, scheduling save.
(19:52:29) util: Writing file prefs.xml to directory C:\Users\Aladar\AppData\Roaming\.purple
(19:52:29) util: Writing file C:\Users\Aladar\AppData\Roaming\.purple\prefs.xml
(19:52:59) prefs: /pidgin/plugins/loaded changed, scheduling save.
(19:53:04) jabber: Sending (ssl) ([email protected]/.): <iq type='get' id='purplef075594f'><ping xmlns='urn:xmpp:ping'/></iq>
(19:53:04) util: Writing file prefs.xml to directory C:\Users\Aladar\AppData\Roaming\.purple
(19:53:04) util: Writing file C:\Users\Aladar\AppData\Roaming\.purple\prefs.xml
(19:53:04) jabber: Recv (ssl)(101): <iq id='purplef075594f' type='result' to='[email protected]/.'/>
(19:53:25) gtkspell: Failed to setup GtkSpell: enchant error for language: en
(19:53:25) gtkconv: setting active conversation on toolbar 051C5200
(19:53:25) gtkconv: setting active conversation on toolbar 051C5200
(19:53:25) prefs: /pidgin/conversations/toolbar/wide changed, scheduling save.
(19:53:25) win32placement: Window RECT: L:623 R:979 T:147 B:575
(19:53:25) win32placement: Working Area RECT: L:0 R:1440 T:0 B:870
(19:53:25) gtkconv: setting active conversation on toolbar 051C5200
(19:53:27) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplef0755950' to='[email protected]'><composing xmlns='http://jabber.org/protocol/chatstates'/></message>
(19:53:29) lurch: retrieved devicelist for [email protected]:
<publish node="urn:xmpp:omemo:0:devicelist"><item><list
xmlns="urn:xmpp:omemo:0" /></item></publish>

(19:53:29) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplef0755951' to='[email protected]'><active xmlns='http://jabber.org/protocol/chatstates'/><body>test</body></message>
(19:53:29) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplef0755952' to='[email protected]'><active xmlns='http://jabber.org/protocol/chatstates'/></message>
(19:53:31) util: Writing file blist.xml to directory C:\Users\Aladar\AppData\Roaming\.purple
(19:53:31) util: Writing file C:\Users\Aladar\AppData\Roaming\.purple\blist.xml
(19:53:31) util: Writing file prefs.xml to directory C:\Users\Aladar\AppData\Roaming\.purple
(19:53:31) util: Writing file C:\Users\Aladar\AppData\Roaming\.purple\prefs.xml
(19:53:38) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplef0755953' to='[email protected]'><composing xmlns='http://jabber.org/protocol/chatstates'/></message>
(19:53:40) lurch: retrieved devicelist for [email protected]:
<publish node="urn:xmpp:omemo:0:devicelist"><item><list
xmlns="urn:xmpp:omemo:0" /></item></publish>

(19:53:40) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplef0755954' to='[email protected]'><active xmlns='http://jabber.org/protocol/chatstates'/><body>can you type something</body></message>
(19:53:40) jabber: Sending (ssl) ([email protected]/.): <message type='chat' id='purplef0755955' to='[email protected]'><active xmlns='http://jabber.org/protocol/chatstates'/></message>
(19:54:04) jabber: Sending (ssl) ([email protected]/.): <iq type='get' id='purplef0755956'><ping xmlns='urn:xmpp:ping'/></iq>
(19:54:04) jabber: Recv (ssl)(101): <iq id='purplef0755956' type='result' to='[email protected]/.'/>
(19:55:00) jabber: Recv (ssl)(213): <message type='chat' to='[email protected]' from='[email protected]/phone'><composing xmlns='http://jabber.org/protocol/chatstates'/><no-store xmlns='urn:xmpp:hints'/><no-storage xmlns='urn:xmpp:hints'/></message>
(19:55:01) jabber: Recv (ssl)(210): <message type='chat' to='[email protected]' from='[email protected]/phone'><active xmlns='http://jabber.org/protocol/chatstates'/><no-store xmlns='urn:xmpp:hints'/><no-storage xmlns='urn:xmpp:hints'/></message>
(19:55:01) jabber: Recv (ssl)(670): <message id='bed731...' type='chat' to='[email protected]' from='[email protected]/phone'><body>I sent you an OMEMO encrypted message but your client doesn’t seem to support that. Find more information on https://conversations.im/omemo</body><encrypted xmlns='eu.siacs.conversations.axolotl'><header sid='1542322811'><key rid='331911163'>*key*</key><iv>*iv*</iv></header><payload>*payload*</payload></encrypted><markable xmlns='urn:xmpp:chat-markers:0'/><store xmlns='urn:xmpp:hints'/></message>
(19:55:01) jabber: XML parser error for JabberStream 049D45D0: Domain 3, code 100, level 1: xmlns: URI eu.siacs.conversations.axolotl is not absolute
(19:55:01) lurch: received omemo message that does not contain a key for this device, skipping
(19:55:01) jabber: Binding conversation to [email protected]/phone
(19:55:06) jabber: Recv (ssl)(213): <message type='chat' to='[email protected]' from='[email protected]/phone'><composing xmlns='http://jabber.org/protocol/chatstates'/><no-store xmlns='urn:xmpp:hints'/><no-storage xmlns='urn:xmpp:hints'/></message>

lurch - received omemo message that does not contain a key for this device, skipping

Hello,
tried to test it with a friend, because he is a Windows user i thought ok, lets simply fey things an dont mix os types. So i build a Vm with windows 10 -v 1607 and installed lurch - same happened by my counterpart.(Os version & pidgin version )
Both pidgin versions have the cyperpunkt OTR plugin active.

After installing the lurch dlls (we both used only the lurch.dll not the compatible one) + carbon.dll - we tried to do a key exchange - bit its kind of fuzzy it seemed that for the first account a key was signed but then the encryption failed.

The second account was more challenging:
At the first sight the logs are fine but in the end lurch didn't receive device encryption keys.

How can i reset the OMEMO Keys so that i can try a clean slate approach?

the complete log from pidgin:

<Pidgin Debug Log : 25.02.2017 21:43:15
(21:42:13) lurch: retrieved devicelist for xxxxxxxxx:

(21:42:13) lurch: retrieved own devicelist:

(21:42:13) lurch: lurch_message_encrypt_im: failed to malloc address struct (-1000001)
(21:42:13) g_log: xmlnode_to_str_helper: assertion node != NULL' failed (21:42:13) g_log: jabber_send_raw: assertion data != NULL' failed
(21:42:14) util: Writing file prefs.xml to directory C:\Users\xxxxx\AppData\Roaming.purple
(21:42:14) util: Writing file C:\Users\xxxxx\AppData\Roaming.purple\prefs.xml
(21:42:16) prefs: /pidgin/debug/width changed, scheduling save.
(21:42:16) prefs: /pidgin/debug/height changed, scheduling save.
(21:42:18) jabber: Sending (ssl) (xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxx):
(21:42:18) jabber: Recv (ssl)(103):
(21:42:21) util: Writing file prefs.xml to directory C:\Users\xxxxxxxxx\AppData\Roaming.purple
(21:42:21) util: Writing file C:\Users\xxxxxxxx\AppData\Roaming.purple\prefs.xml
(21:42:33) gtkconv: setting active conversation on toolbar 02FBA180
(21:42:36) lurch: retrieved devicelist for xxxxxxxxxxxxxxxxxx:

(21:42:36) lurch: retrieved own devicelist:

(21:42:36) lurch: lurch_msg_encrypt_for_addrs: trying to encrypt key for 2 devices
(21:42:36) lurch: lurch_key_encrypt: encrypting key for xxxxxxxxxxx:19xxxxxxxx
(21:42:36) lurch: lurch_key_encrypt: encrypting key for xxxxxxxxxxx:17xxxxxxxx
(21:42:36) jabber: Sending (ssl) (xxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxx): You received an OMEMO encrypted message, but your client does not support it.

?OTRv23?
xxxxxxxxxxxxx/ has requested an Off-the-Record private conversation. However, you do not have a plugin to support that.
See https://otr.cypherpunks.ca/ for more information.

MwgtEiEFN+z6SYuPOLgoyUhovP8mUdbmKKulaYaC2TTMIQrs7mkaIQX6UXhRxCb8BbSd5t1d/eIJnNXmGFDVjXeyBIDLmy2XcSJSMwohBU43Hk3Ox5DzSoLtY+/q/qM2eYKcL/LCdi2hLaXyuv4xEAoYACIgwqfRxOkcH7hfp0yOVi65IqgkE//KIHy7x7XwzKkGH1z1AzI5RHBAjyiDmo37BDABMwhgEiEFhj81JKkF29GckzGGDCrkSa8ln7pjVFc/M5HPQzF85hcaIQX6UXhRxCb8BbSd5t1d/eIJnNXmGFDVjXeyBIDLmy2XcSJSMwohBTgcvqwUTMBbb2rQ0jJQrS2CyrIwU7heX+nhrD+52hVyEAoYACIgRLWEKx3x1IvKNVY+MKFpMvby1CQRmbNylwqC7yQajl4+mx2xPJPN7iiDmo37BDAAOxI8wpbgMnYub660+px6QQ==BPhb2u91jNlFBUoiqqPEBaNsOwijo599U+wqDsGY7wwShyMt5Ok1BObeoA54Y6QFShittodgkZbC+BxJiNMw7z4lmmZvQ9shbKLEhKOo9/Di5KQFip9MZFVRjbfg8hwIBDunJJ9VZgyc5oHzGxT6NY3EkSlbM4AUfEkEFPUiDmMRhmV5fmXsVyG2q8U+RXR1nolx+I1UCR7obRF6uT1eC32quOAtunYeGNVkoY4bo+3Mh4YNeFYCMDxhhcrmaFvYi56JTv7k7cCr/DAyfjWIfrN+CERTCiiuErFkPdj4eFh8ml3fSZcKVSE=
(21:42:37) jabber: Recv (ssl)(1187): MwgOEiEFPfuUju8g6w0GjuVrYhOAp+xW71hqkLwGqrzI3x2H6mUaIQXE9CqRtbPD5NPP4UkEDaX9fHcJjnjkeLteeUTmbL+ldyJSMwohBfXjJEVzoHaCdE3TSmrHHRT7z8hKQY5OD8aeqTncwMkREAwYACIg+f31wl+PxD7mFPlnptk9blbBN924la8zbEvbFhJ+UGT56g0RWBiD8Si7+f+tBzABq7d1YJ52PYlwgamn/fxRCA==ropaTJ4UJrvkAWb8OBYt1H6khHvEjKAId3Ops62KoiOUbOQG25lnBtYS2940Ay1Pp6hLQJsdFtqzoVRBaOjoimfgTvYzFy4p7hwVZ1ZDcgn8JCXkHpAdkEBBFws+UhA4Zi0Jr99oy/5NJLh8UPQYQ0iLJzMlwL51OMF17mxz/Ut1T4KKDChVeh42pQZMIcdjlNhTsK95yzocz6I2pPf8In/KyFi6QxuTvXRoA9O6gSXgOizbmxeqUmxcMOnlhUCjkgBAmBgt1S1H30BEwdHwzAvzSijGKx1NBbum7THZ1w3syfnXv180O0S/Xf2gX2n7I31IhHuPz4+EQyrIYtPqufKfAidrC0fDRqTXTYhjRPqoTdm7DS44q/XJFeWU6tTbSf2Mu3VEMg+6xAXEhEVB1xoufdsbCJ0/Mizp9ZxeEYm74jyBBiLx9IW57uw92qy/+DRVJzN7kQDiQM8/tR19848SYou received an OMEMO encrypted message, but your client does not support it.
(21:42:37) jabber: XML parser error for JabberStream 02EB7320: Domain 3, code 100, level 1: xmlns: URI eu.siacs.conversations.axolotl is not absolute
(21:42:37) lurch: received omemo message that does not contain a key for this device, skipping>

Segfault when messaging non-XMPP buddies

There isn't any check in lurch_conv_updated_cb() that the buddy you're talking to is an XMPP buddy, so the call to axc_session_exists_any() in lurch_topic_update_im() will segfault because partner_name_bare is NULL

Program received signal SIGSEGV, Segmentation fault.
0x76559170 in strlen () from C:\WINDOWS\System32\msvcrt.dll
(gdb) bt
#0  0x76559170 in strlen () from C:\WINDOWS\System32\msvcrt.dll
#1  0x0c973199 in axc_session_exists_any () from C:\Program Files (x86)\Pidgin\plugins\lurch.dll
#2  0x0c97f65f in lurch_topic_update_im (conv_p=0xf81df70) at src/lurch.c:2234
#3  0x0c97f8ac in lurch_conv_updated_cb (conv_p=0xf81df70, type=PURPLE_CONV_UPDATE_TITLE) at src/lurch.c:2309
#4  0x57b72f7b in purple_signal_emit_vargs (instance=0x57bc80dc <handle>,
    signal=0x57ba487a <__PRETTY_FUNCTION__.88103+280> "conversation-updated", args=0x61e4a8 "pß\201\017\v")
    at signals.c:482
#5  0x57b73053 in purple_signal_emit (instance=instance@entry=0x57bc80dc <handle>,
    signal=signal@entry=0x57ba487a <__PRETTY_FUNCTION__.88103+280> "conversation-updated") at signals.c:434
#6  0x57b40b27 in purple_conversation_update (conv=0xf81df70, type=PURPLE_CONV_UPDATE_TITLE) at conversation.c:1063
#7  0x57b40d46 in purple_conversation_autoset_title (conv=conv@entry=0xf81df70) at conversation.c:756
#8  0x57b43173 in purple_conversation_new (type=type@entry=PURPLE_CONV_TYPE_IM, account=account@entry=0x26e6df8,
    name=name@entry=0xd9a5628 "McClutch#11281") at conversation.c:442
#9  0x57e4ddd4 in pidgin_dialogs_im_with_user (account=0x26e6df8, username=username@entry=0xd9a5628 "McClutch#11281")
    at gtkdialogs.c:933
#10 0x57e1cc53 in gtk_blist_row_activated_cb (tv=0xd9e0078, path=0xf80d6f8, col=0x26ae0d0, data=0x0)
    at gtkblist.c:1230
#11 0x63a452c2 in g_closure_invoke () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgobject-2.0-0.dll
#12 0x63a54857 in signal_emit_unlocked_R () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgobject-2.0-0.dll
#13 0x63a5b7df in g_signal_emit_valist () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgobject-2.0-0.dll
#14 0x63a5b962 in g_signal_emit () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgobject-2.0-0.dll
#15 0x6194140d in gtk_tree_view_row_activated () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgtk-win32-2.0-0.dll
#16 0x619547b2 in gtk_tree_view_button_press () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgtk-win32-2.0-0.dll
#17 0x6185a262 in _gtk_marshal_BOOLEAN__BOXED () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgtk-win32-2.0-0.dll
#18 0x63a452c2 in g_closure_invoke () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgobject-2.0-0.dll
#19 0x63a54512 in signal_emit_unlocked_R () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgobject-2.0-0.dll
#20 0x63a5b614 in g_signal_emit_valist () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgobject-2.0-0.dll
#21 0x63a5b962 in g_signal_emit () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgobject-2.0-0.dll
#22 0x61964553 in gtk_widget_event_internal () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgtk-win32-2.0-0.dll
---Type <return> to continue, or q <return> to quit---
#23 0x61852c9a in gtk_propagate_event () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgtk-win32-2.0-0.dll
#24 0x61853e57 in gtk_main_do_event () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgtk-win32-2.0-0.dll
#25 0x6c36ca7f in gdk_event_dispatch () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgdk-win32-2.0-0.dll
#26 0x685eb167 in g_main_context_dispatch () from C:\Program Files (x86)\Pidgin\Gtk\bin\libglib-2.0-0.dll
#27 0x685eb90d in g_main_context_iterate.clone () from C:\Program Files (x86)\Pidgin\Gtk\bin\libglib-2.0-0.dll
#28 0x685ebd9d in g_main_loop_run () from C:\Program Files (x86)\Pidgin\Gtk\bin\libglib-2.0-0.dll
#29 0x61854260 in gtk_main () from C:\Program Files (x86)\Pidgin\Gtk\bin\libgtk-win32-2.0-0.dll
#30 0x57e6dadd in pidgin_main (hint=0x400000, argc=6, argv=0x6f8bd0) at gtkmain.c:937
#31 0x004020b9 in ?? ()
#32 0x0040350b in ?? ()
#33 0x004010fd in ?? ()
#34 0x00000002 in ?? ()
#35 0x003b7000 in ?? ()
#36 0x76f50fd9 in ntdll!RtlSubscribeWnfStateChangeNotification () from C:\WINDOWS\SYSTEM32\ntdll.dll
#37 0x76f50fa4 in ntdll!RtlSubscribeWnfStateChangeNotification () from C:\WINDOWS\SYSTEM32\ntdll.dll
#38 0x00000000 in ?? ()
(gdb) up
#1  0x0c973199 in axc_session_exists_any () from C:\Program Files (x86)\Pidgin\plugins\lurch.dll
(gdb) up
#2  0x0c97f65f in lurch_topic_update_im (conv_p=0xf81df70) at src/lurch.c:2234
2234      ret_val = axc_session_exists_any(partner_name_bare, axc_ctx_p);
(gdb) print partner_name_bare
$1 = 0x0
(gdb)

GPG signatures for source validation

As we all know, today more than ever before, it is crucial to be able to trust
our computing environments. One of the main difficulties that package
maintainers of Linux distributions face, is the difficulty to verify the
authenticity and the integrity of the source code.

The Arch Linux team would appreciate it if you would provide us GPG signatures
in order to verify easily and quickly your source code releases.

Overview of the required tasks:

  • Create and/or use a 4096-bit RSA keypair for the file signing.
  • Keep your key secret, use a strong unique passphrase for the key.
  • Upload the public key to a key server and publish the full fingerprint.
  • Sign every new git commit and tag.
  • Create signed compressed (xz --best) release archives
  • Upload a strong message digest (sha512) of the archive
  • Configure https for your download server

GPGit is meant to bring GPG to the masses.
It is not only a shell script that automates the process of creating new signed
git releases with GPG but also comes with this step-by-step readme guide for
learning how to use GPG.

Additional Information:

Thanks in advance.

Target for build based on shared libs

That somehow complicates packaging/building this thing. I'd suggest:

a) either stuff everything into one repo
b) allow to build against the actual libraries instead of calling sub-make (so they can be packaged separately)

Update build instructions for Debian stable in README

Hi. I'm having some trouble building this. It looks like maybe I'm not using the right version of libmxml?
If there's a particular version required, could that be documented in the build scripts so it would nope out if you had a version that was too old?

I'm using version 2.6-2 from Debian Jessie.

Here's what happened when I tried to build it.
buildlog.txt

Here's the Dockerfile of the container I was building it in.
Dockerfile.txt

lurch can't access axc db

After successfully building and installing (thanks for the new build setup, much easier!) and setting LD_LIBRARY_PATH env variable so Pidgin would find libaxolotl-c.so (probably Gentoo specific), I could enable the plugin in Pidgin. Problem: it caused me to be unable to send any messages to anyone, always reporting that encryption had failed (even with people currently not using any kind of Axolotl-capable messenger). Here's pidgin's console output regarding that:

(19:02:10) lurch: lurch_message_encrypt_im: failed to look up [email protected] in DB /home/user/.purple/[email protected]/Hostname_omemo_db.sqlite (-14) (19:02:10) g_log: xmlnode_to_str_helper: assertion 'node != NULL' failed (19:02:10) g_log: jabber_send_raw: assertion 'data != NULL' failed

Typing any command like /lurch help results in the message "Failed to access axc db." in the conversation window.
(sqlite is installed)

INIT logic triggered only on account connect

Since publishing the device ID and key data needs an active connection, the init logic is triggered on an account connect.
The first time the plugin is activated, this probably leads to some confusion, as at that time, all accounts are already connected. This should probably be changed.

Refactor command handler

Currently all the DB stuff is done at the top, because a lot of commands need it anyway.
The result is that if something happens to the database, uninstall does not work to try and fix it, and help doesn't work either.

Segfault while setting up OMEMO session with BOSH XMPP

Hi,
I think this is a bit of a corner case, but I've noticed Pidgin crashes (in a reproducible way) when starting a conversation with a contact who is also OMEMO-enabled, while using BOSH as my XMPP connection method.

BOSH is an alternative XMPP connection method, using HTTP transport. Pidgin is very slow connecting (and sometimes delivering messages) using XMPP over BOSH, but I was playing around with it as it can be useful when one is behind restrictive firewalls that block port 5222.

In any case, Pidgin segfaults every time I start a conversation with a contact:

(12:14:03) xmlnode: XML parser error for xmlnode 0x565518982160: Domain 3, code 100, level 1: xmlns: URI vcard-temp is not absolute
(12:14:03) jabber: RecvBOSH (ssl)(390): <body sid='1f8b7d0c-fee8-4bab-8747-2e7dd6e5bdd6' xmlns:stream='http://etherx.jabber.org/streams' xmlns='http://jabber.org/protocol/httpbind'><iq type='result' to='[email protected]/work' from='[email protected]' id='purpleb90d8ba6' xmlns='jabber:client'><vCard xmlns='vcard-temp'><NICKNAME>friend</NICKNAME><EMAIL><HOME/><USERID>[email protected]</USERID></EMAIL><FN>friend</FN></vCard></iq></body>
(12:14:03) jabber: BOSH: Sending an empty request
(12:14:05) jabber: Sending (ssl) ([email protected]/work): <message xmlns='jabber:client' type='chat' id='purpleb90d8ba7' to='[email protected]'><composing xmlns='http://jabber.org/protocol/chatstates'/></message>
(12:14:06) lurch: retrieved devicelist for [email protected]:
<publish node="eu.siacs.conversations.axolotl.devicelist"><item><list
xmlns="eu.siacs.conversations.axolotl"><device id="683422750" /></list></item></publish>
(12:14:06) lurch: retrieved own devicelist:
<publish node="eu.siacs.conversations.axolotl.devicelist"><item><list
xmlns="eu.siacs.conversations.axolotl"><device id="464713872" /><device
id="1305134070" /><device id="1787256117" /></list></item></publish>
(12:14:06) lurch: lurch_msg_finalize_encryption: [email protected] has device without session 683422750, requesting bundle
(12:14:06) lurch: lurch_bundle_request_do: [email protected]/work is requesting bundle from [email protected]:683422750
(12:14:06) jabber: Sending (ssl) ([email protected]/work): <iq xmlns='jabber:client' type='get' to='[email protected]' id='[email protected]#683422750#1802838010'><pubsub xmlns='http://jabber.org/protocol/pubsub'><items node='eu.siacs.conversations.axolotl.bundles:683422750' max_items='1'/></pubsub></iq>
(12:14:06) lurch: lurch_bundle_request_do: ...request sent
Pidgin 2.12.0-1.fc25 has segfaulted and attempted to dump a core file.

I should be able to get you a backtrace if you want, but you probably can reproduce this on your own 😉

rework README

The README needs some cleanup.

  • Merge #45
  • Merge #51
  • Add table of contents with links
  • Mention that it works fine in Finch (and maybe tell that to omemo.top)

Crash when receiving AIM message lol

lol

Program terminated with signal SIGABRT, Aborted.
#0  0x00007f1e11b4204f in raise () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7f1e18f45f80 (LWP 26756))]
(gdb) bt
#0  0x00007f1e11b4204f in raise () at /usr/lib/libc.so.6
#1  0x00007f1e11b4347a in abort () at /usr/lib/libc.so.6
#2  0x000056377897e629 in sighandler (sig=<optimized out>) at gtkmain.c:179
#3  0x00007f1e11b420b0 in <signal handler called> () at /usr/lib/libc.so.6
#4  0x00007f1e11b8f446 in strlen () at /usr/lib/libc.so.6
#5  0x00007f1dfced118c in axc_session_exists_any () at /home/dx/.purple/plugins/lurch.so
#6  0x00007f1dfcec8ac1 in lurch_topic_update_im (conv_p=0x56377a0b2b00) at ./src/lurch.c:2234
#7  0x00007f1dfcec8da0 in lurch_conv_updated_cb (conv_p=0x56377a0b2b00, type=PURPLE_CONV_UPDATE_TITLE) at ./src/lurch.c:2309
#8  0x00007f1e15113820 in purple_signal_emit_vargs (instance=<optimized out>, signal=0x7f1e15168739 "conversation-updated", args=args@entry=0x7ffc03a52440) at signals.c:482
#9  0x00007f1e1511398a in purple_signal_emit (instance=<optimized out>, signal=<optimized out>) at signals.c:434
#10 0x00007f1e150dbcdc in purple_conversation_new (type=type@entry=PURPLE_CONV_TYPE_IM, account=account@entry=0x563779c45a80, name=name@entry=0x56377a78a350 "AOL System Msg") at conversation.c:442
#11 0x00007f1e151122d1 in serv_got_im (gc=gc@entry=0x56377a663f20, who=<optimized out>, msg=msg@entry=0x56377a6e34f0 "Hello. Effective 3/28, we will no longer support connections to the AIM network via this method. If you wish to use the free consumer AIM product, we invite you to visit <a href=\"http://www.aim.com/\">www.aim.com</a> for more information.", flags=<optimized out>, flags@entry=(unknown: 0), mtime=1488322528) at server.c:624
#12 0x00007f1dfe3f7171 in incomingim_chan1 (conn=<optimized out>, userinfo=<optimized out>, args=<optimized out>, od=<optimized out>) at oscar.c:1727
#13 0x00007f1dfe3f7171 in purple_parse_incoming_im (od=<optimized out>, conn=<optimized out>, fr=<optimized out>) at oscar.c:2184
#14 0x00007f1dfe3e2cdf in incomingim_ch1 (mod=<optimized out>, cookie=0x56377a0b5a50 "\340\377\265X", bs=<optimized out>, userinfo=0x7ffc03a52820, channel=1, snac=0x7ffc03a52b00, frame=0x56377a7d45b0, conn=0x56377a7d4540, od=0x56377a6640e0) at family_icbm.c:1023
#15 0x00007f1dfe3e2cdf in incomingim (od=0x56377a6640e0, conn=0x56377a7d4540, mod=<optimized out>, frame=0x56377a7d45b0, snac=0x7ffc03a52b00, bs=<optimized out>) at family_icbm.c:1511
#16 0x00007f1dfe3e34b5 in snachandler (od=0x56377a6640e0, conn=0x56377a7d4540, mod=<optimized out>, frame=0x56377a7d45b0, snac=0x7ffc03a52b00, bs=0x56377a7d45b8) at family_icbm.c:2118
#17 0x00007f1dfe3ecd78 in parse_snac (frame=0x56377a7d45b0, conn=0x56377a7d4540, od=0x56377a6640e0) at flap_connection.c:776
#18 0x00007f1dfe3ecd78 in parse_flap (frame=0x56377a7d45b0, conn=0x56377a7d4540, od=0x56377a6640e0) at flap_connection.c:862
#19 0x00007f1dfe3ecd78 in flap_connection_recv (conn=0x56377a7d4540) at flap_connection.c:985
#20 0x0000563778964fe1 in pidgin_io_invoke (source=<optimized out>, condition=<optimized out>, data=0x56377a7e0ca0) at gtkeventloop.c:73
#21 0x00007f1e12f2845a in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#22 0x00007f1e12f28810 in  () at /usr/lib/libglib-2.0.so.0
#23 0x00007f1e12f28b32 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#24 0x00007f1e17b973a7 in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#25 0x0000563778928c92 in main (argc=<optimized out>, argv=<optimized out>) at gtkmain.c:939
(gdb) frame 6
#6  0x00007f1dfcec8ac1 in lurch_topic_update_im (conv_p=0x56377a0b2b00) at ./src/lurch.c:2234
2234      ret_val = axc_session_exists_any(partner_name_bare, axc_ctx_p);
(gdb) p partner_name_bare
$1 = 0x0
(gdb) p axc_ctx_p
$2 = (axc_context *) 0x56377a7d40f0
(gdb) p partner_name
$3 = 0x56377a0b6880 "AOL System Msg"
2218      partner_name_bare = jabber_get_bare_jid(partner_name);

No CLOCK_REALTIME/clock_gettime on OSX

Trying to compile on OS X 10.11.6:

 make
cd ./lib/axc/lib/libaxolotl-c/ && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/miku/src/lurch/lib/axc/lib/libaxolotl-c/build
[  1%] Built target protobuf-c
[ 67%] Built target curve25519
[100%] Built target axolotl-c
cd ./lib/axc && make axc-pic
gcc -fPIC -I./lib/libaxolotl-c/src -std=c11 -Wall -Wextra -Wpedantic -Wstrict-overflow -fno-strict-aliasing -funsigned-char -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -fno-builtin-memset -c src/axc.c -o build/axc.o
src/axc.c:610:28: warning: missing field 'tv_nsec' initializer [-Wmissing-field-initializers]
  struct timespec time = {0};
                           ^
src/axc.c:711:15: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
    ret_val = clock_gettime(CLOCK_REALTIME, &time);
              ^
src/axc.c:711:29: error: use of undeclared identifier 'CLOCK_REALTIME'
    ret_val = clock_gettime(CLOCK_REALTIME, &time);
                            ^
2 warnings and 1 error generated.
make[1]: *** [axc.o] Error 1
make: *** [axc] Error 2

XML parser error: URI not absolute

While everything works fine, I get the following parser error in Pidgin's debug window:

xmlnode: XML parser error for xmlnode 0x555bd0bdd730: Domain 3, code 100, level 1: xmlns: URI eu.siacs.conversations.axolotl is not absolute

Is this a problem with the parsing or a problem with Conversations which is the client of my chat partner?

Compiling on macOS

Seems like I can't get it to work. Here is my Terminal code:

Last login: Sat Feb  4 12:31:01 on ttys000
Chibi:~ Chibi$ git clone https://github.com/gkdr/lurch/
Cloning into 'lurch'...
remote: Counting objects: 109, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 109 (delta 48), reused 101 (delta 40), pack-reused 0
Receiving objects: 100% (109/109), 56.07 KiB | 0 bytes/s, done.
Resolving deltas: 100% (48/48), done.
Chibi:~ Chibi$ cd lurch
Chibi:lurch Chibi$ clear














Chibi:lurch Chibi$ git submodule update --init
Submodule 'lib/axc' (https://github.com/gkdr/axc) registered for path 'lib/axc'
Submodule 'lib/libomemo' (https://github.com/gkdr/libomemo) registered for path 'lib/libomemo'
Cloning into '/Users/Chibi/lurch/lib/axc'...
Cloning into '/Users/Chibi/lurch/lib/libomemo'...
Submodule path 'lib/axc': checked out '29d6fc2a21bd2716c9e718d0c631f3a51244544c'
Submodule path 'lib/libomemo': checked out '226517319fae4daa82102a84ba75713e6b2045c7'
Chibi:lurch Chibi$ clear














Chibi:lurch Chibi$ make
cd ./lib/axc/lib/libaxolotl-c/ && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for memset_s
-- Looking for memset_s - found
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Chibi/lurch/lib/axc/lib/libaxolotl-c/build
Scanning dependencies of target protobuf-c
[  1%] Building C object src/protobuf-c/CMakeFiles/protobuf-c.dir/protobuf-c.c.o
[  1%] Built target protobuf-c
Scanning dependencies of target curve25519
[  2%] Building C object src/curve25519/CMakeFiles/curve25519.dir/curve25519-donna.c.o
[  4%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_0.c.o
[  5%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_1.c.o
[  7%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_add.c.o
[  8%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_cmov.c.o
[ 10%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_copy.c.o
[ 11%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_frombytes.c.o
[ 13%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_invert.c.o
[ 14%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_isnegative.c.o
[ 16%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_isnonzero.c.o
[ 17%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_mul.c.o
[ 19%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_neg.c.o
[ 20%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_pow22523.c.o
[ 22%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_sq.c.o
[ 23%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_sq2.c.o
[ 25%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_sub.c.o
[ 26%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/fe_tobytes.c.o
[ 27%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_add.c.o
[ 29%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_double_scalarmult.c.o
[ 30%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_frombytes.c.o
[ 32%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_madd.c.o
[ 33%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_msub.c.o
[ 35%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_p1p1_to_p2.c.o
[ 36%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_p1p1_to_p3.c.o
[ 38%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_p2_0.c.o
[ 39%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_p2_dbl.c.o
[ 41%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_p3_0.c.o
[ 42%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_p3_dbl.c.o
[ 44%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_p3_to_cached.c.o
[ 45%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_p3_to_p2.c.o
[ 47%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_p3_tobytes.c.o
[ 48%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_precomp_0.c.o
[ 50%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_scalarmult_base.c.o
[ 51%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_sub.c.o
[ 52%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/ge_tobytes.c.o
[ 54%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/open.c.o
[ 55%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/sc_muladd.c.o
[ 57%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/sc_reduce.c.o
[ 58%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/sign.c.o
[ 60%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/additions/compare.c.o
[ 61%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/additions/curve_sigs.c.o
[ 63%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/additions/sign_modified.c.o
[ 64%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/additions/zeroize.c.o
[ 66%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/nacl_sha512/blocks.c.o
[ 67%] Building C object src/curve25519/CMakeFiles/curve25519.dir/ed25519/nacl_sha512/hash.c.o
[ 67%] Built target curve25519
Scanning dependencies of target axolotl-c
[ 69%] Building C object src/CMakeFiles/axolotl-c.dir/LocalStorageProtocol.pb-c.c.o
[ 70%] Building C object src/CMakeFiles/axolotl-c.dir/WhisperTextProtocol.pb-c.c.o
[ 72%] Building C object src/CMakeFiles/axolotl-c.dir/FingerprintProtocol.pb-c.c.o
[ 73%] Building C object src/CMakeFiles/axolotl-c.dir/vpool.c.o
[ 75%] Building C object src/CMakeFiles/axolotl-c.dir/axolotl.c.o
[ 76%] Building C object src/CMakeFiles/axolotl-c.dir/curve.c.o
[ 77%] Building C object src/CMakeFiles/axolotl-c.dir/hkdf.c.o
[ 79%] Building C object src/CMakeFiles/axolotl-c.dir/ratchet.c.o
[ 80%] Building C object src/CMakeFiles/axolotl-c.dir/protocol.c.o
[ 82%] Building C object src/CMakeFiles/axolotl-c.dir/session_state.c.o
/Users/Chibi/lurch/lib/axc/lib/libaxolotl-c/src/session_state.c:296:18: warning: comparison of constant 2305843009213693951 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
        if(count > SIZE_MAX / sizeof(Textsecure__SessionStructure__Chain *)) {
           ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Chibi/lurch/lib/axc/lib/libaxolotl-c/src/session_state.c:493:14: warning: comparison of constant 2305843009213693951 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
    if(count > SIZE_MAX / sizeof(Textsecure__SessionStructure__Chain__MessageKey *)) {
       ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[ 83%] Building C object src/CMakeFiles/axolotl-c.dir/session_record.c.o
/Users/Chibi/lurch/lib/axc/lib/libaxolotl-c/src/session_record.c:87:18: warning: comparison of constant 2305843009213693951 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
        if(count > SIZE_MAX / sizeof(Textsecure__SessionStructure *)) {
           ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[ 85%] Building C object src/CMakeFiles/axolotl-c.dir/session_pre_key.c.o
[ 86%] Building C object src/CMakeFiles/axolotl-c.dir/session_builder.c.o
[ 88%] Building C object src/CMakeFiles/axolotl-c.dir/session_cipher.c.o
[ 89%] Building C object src/CMakeFiles/axolotl-c.dir/key_helper.c.o
[ 91%] Building C object src/CMakeFiles/axolotl-c.dir/sender_key.c.o
[ 92%] Building C object src/CMakeFiles/axolotl-c.dir/sender_key_state.c.o
/Users/Chibi/lurch/lib/axc/lib/libaxolotl-c/src/sender_key_state.c:213:18: warning: comparison of constant 2305843009213693951 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
        if(count > SIZE_MAX / sizeof(Textsecure__SenderKeyStateStructure__SenderMessageKey *)) {
           ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[ 94%] Building C object src/CMakeFiles/axolotl-c.dir/sender_key_record.c.o
/Users/Chibi/lurch/lib/axc/lib/libaxolotl-c/src/sender_key_record.c:56:18: warning: comparison of constant 2305843009213693951 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
        if(count > SIZE_MAX / sizeof(Textsecure__SenderKeyStateStructure *)) {
           ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[ 95%] Building C object src/CMakeFiles/axolotl-c.dir/group_session_builder.c.o
[ 97%] Building C object src/CMakeFiles/axolotl-c.dir/group_cipher.c.o
[ 98%] Building C object src/CMakeFiles/axolotl-c.dir/fingerprint.c.o
[100%] Linking C static library libaxolotl-c.a
[100%] Built target axolotl-c
cd ./lib/axc && make axc-pic
mkdir -p build
gcc -fPIC -I./lib/libaxolotl-c/src -std=c11 -Wall -Wextra -Wpedantic -Wstrict-overflow -fno-strict-aliasing -funsigned-char -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -fno-builtin-memset -c src/axc.c -o build/axc.o
src/axc.c:610:28: warning: missing field 'tv_nsec' initializer
      [-Wmissing-field-initializers]
  struct timespec time = {0};
                           ^
src/axc.c:616:7: warning: variable 'db_needs_init' is used uninitialized
      whenever 'if' condition is true [-Wsometimes-uninitialized]
  if (ret_val){
      ^~~~~~~
src/axc.c:790:7: note: uninitialized use occurs here
  if (db_needs_init) {
      ^~~~~~~~~~~~~
src/axc.c:616:3: note: remove the 'if' if its condition is always false
  if (ret_val){
  ^~~~~~~~~~~~~
src/axc.c:624:3: note: variable 'db_needs_init' is declared here
  int db_needs_init = 0;
  ^
2 warnings generated.
gcc -fPIC -I./lib/libaxolotl-c/src -std=c11 -Wall -Wextra -Wpedantic -Wstrict-overflow -fno-strict-aliasing -funsigned-char -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -fno-builtin-memset -c src/axc_crypto.c -o build/axc_crypto.o
src/axc_crypto.c:5:10: fatal error: 'openssl/err.h' file not found
#include <openssl/err.h> // err_*
         ^
1 error generated.
make[1]: *** [axc_crypto.o] Error 1
make: *** [axc] Error 2
Chibi:lurch Chibi$ 

Any help to get it working would be much appreciated.

lurch isnt showing under plugins / windows 10

Hello,
i tried to test it with an user which has windows 10. I looked into it, but when i follow the tutorial to put the dlls from this link https://eion.robbmob.com/lurch/ to this path \AppData\Roaming.purple\plugins
The lurch plugin isnt showing under plugins (Did a couple of restarts of pidgin)
If i move the dlls to this directory path - X:\Program Files\Pidgin\plugins - nothing changes.

The approache with the carbons dll is working under windows i did see the plugin in pidgin.
(path \AppData\Roaming.purple\plugins )

Version of windows - 10 - 1607
pidgin version - 2.11.0

best regards Razzor

plain text inside span tags

if you change text size in pidgin, you could see the hole message as plaintext inside span tags in xmpp-console. i just saw this when i checked if lurch is running. i'm not a coder, so may be that's normal if so pls calm me.

Displaying FPs (slightly) broken

When I'm typing /lurch fp own, my fingerprint is shown. It contains :d in one part, and this part is converted to a smiley. That's funny, but probably unintended :D

Build system: defining CFLAGS breaks build

Linux distributions usually add certain default compiler flags (like -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables).
When trying to package this plugin, I noticed that having CFLAGS defined will override lurch’s own flags, breaking the build.

Compiling on Windows

There's a few errors when compiling on Windows:

There's no strnlen() function, workaround is

#ifdef _WIN32
#define strnlen(a, b) (MIN(strlen(a), (b)))
#endif

g_hash_table_add() doesn't exist until too-new a version of glib. Workaround is to use g_hash_table_replace(qmsg_p->sess_handled_p, addr_key, addr_key); in lurch_bundle_request_cb() instead.

lurch_addr_list_destroy_func() won't compile because you're freeing a const char in free(addr_p->name);

trouble decrypting on chatsecure

log from pidgin IRC channel:

<NwS> (00:07:24) lurch: lurch_bundle_create_session: failed to create a session from a bundle (-1002)
<NwS> (00:07:24) lurch: lurch_bundle_request_cb: failed to create a session (-1002)
[...]
<NwS> Can't see any msgs on ChatSecure :/ I can send from CS to pidgin but not the other way around
<NwS> Weird
<NwS> Same account on pidgin and chatsecure. Whatever I do on CS I can see on pidgin (for example if I send a Message with carbons I can see that msg on pidgin)
<NwS> Now, when I send from pidgin I don't see that msg on CS UNLESS that msg is more than 4 words (?)
<NwS> Now from account 2 that is only on pidgin, when I send to the account which is on CS + pidgin I can only receive it on pidgin. I received it once on CS but no idea why or how. Can't reproduce it lol
<NwS> Deleted the keys from the phone
<NwS> I did manage to get a few msgs that have more than 5 words in it until I send a msg or I make a mistake and try to get a shorter reply :/
<NwS> Ehm
<NwS> If I send a msg from pidgin Account1 (same account as phone) it seems to break the receiving part on CS
<NwS> In order to make it work again I must send a msg from CS
<NwS> And then post a msg from Account2(only pidgin) which contains more than 4 words :/
<NwS> I'm not sure what breaks it
<_riba> that "more than 4 words" thing is REALLY weird
<NwS> Yeah no idea why
<NwS> 4+ words work though lol
<NwS> less doesn't hah

Since I don't have an Iphone, any help debugging this is appreciated.

Error during message sending - no own devicelist

When I try to send message with omemo pidgin writes:

(02:36:59 PM) There was an error encrypting the message and it was not sent. You can try again, or try to find the problem by looking at the debug log.

Error from debug window:

(14:36:59) lurch: lurch_message_encrypt_im: no own devicelist (0)
(14:36:59) g_log: xmlnode_to_str_helper: assertion 'node != NULL' failed
(14:36:59) g_log: jabber_send_raw: assertion 'data != NULL' failed

GPL Compliance

Currently you're using OpenSSL which has GPL-compliance issues with libpurple (except on systems that ship with OpenSSL such as OSX and some BSD's).

Suggestion in IRC has been to use gcrypt instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.