gkdr / lurch

XEP-0384: OMEMO Encryption for libpurple.
GNU General Public License v3.0
287 stars 32 forks source link

Question: Scenario to hit 'AXC_ERR_INVALID_KEY_ID'? #156

Closed geobra closed 3 years ago

geobra commented 3 years ago

Hi

I am using libomemo together with axc in shmoose xmpp client [1]. I ported lurch and removed all the libpurple dependencies. All went fine so far. The only part in the integration tests during omemo messaging, which didn't get hit is:

lurch.c, line 1990: } else if (ret_val == AXC_ERR_INVALID_KEY_ID) {

and obviously lurch_pep_bundle_for_keytransport never gets called.

What is the Use-Case to hit the 'AXC_ERR_INVALID_KEY_ID' Scenario? I fo not have any idea how to trigger this.

Thank you for your great work of providing this projects!

[1] https://github.com/geobra/harbour-shmoose

gkdr commented 3 years ago

hello! thank you, i'm glad this project can be of help.

let me walk you through the code:

hope i could clear things up a little. (since you referenced the master branch i would also like to suggest you use the more up-to-date dev branch as a base for any code instead.)

geobra commented 3 years ago

Okay, got it. Thank you! Just wondering how I would construct an automated test for this - but this is something I have to solve by myself ;-).

I was not aware of the dev branch. You did a lot of refactoring and split up of functionality there. That will also help me to minimize the ported code. I will stay on master in the first place. I will finish the integration and testing in the shmoose client first and then continue with switching to your dev branch.