[jitsi-dev] OTR not working, sent messages not visible


#1

since later builds on Mac (now 4570) the OTR padlock is not closing and my
sent messages dont appear on the screen.
The replies are only visible on the popup window but not in the main window
as well (partner uses Win7 with latest version)

MS


#2

Hey devs,

it seems that the recent update of bouncycastle has broken otr. And
particullary otr4j as it is build using bouncycastle 1.43.

java.lang.NoSuchMethodError:
org.bouncycastle.crypto.AsymmetricCipherKeyPair.getPublic()Lorg/bouncycastle/crypto/CipherParameters;
at net.java.otr4j.crypto.OtrCryptoEngineImpl.generateDHKeyPair(OtrCryptoEngineImpl.java:70)
at net.java.otr4j.session.AuthContextImpl.getLocalDHKeyPair(AuthContextImpl.java:257)
at net.java.otr4j.session.AuthContextImpl.getLocalDHPublicKeyBytes(AuthContextImpl.java:400)
at net.java.otr4j.session.AuthContextImpl.getLocalDHPublicKeyHash(AuthContextImpl.java:269)
at net.java.otr4j.session.AuthContextImpl.access$100(AuthContextImpl.java:39)
at net.java.otr4j.session.AuthContextImpl$MessageFactory.getDHCommitMessage(AuthContextImpl.java:93)
at net.java.otr4j.session.AuthContextImpl$MessageFactory.access$1400(AuthContextImpl.java:84)
at net.java.otr4j.session.AuthContextImpl.respondV2Auth(AuthContextImpl.java:746)
at net.java.otr4j.session.SessionImpl.handleQueryMessage(SessionImpl.java:363)
at net.java.otr4j.session.SessionImpl.transformReceiving(SessionImpl.java:331)
at net.java.otr4j.OtrEngineImpl.transformReceiving(OtrEngineImpl.java:68)
at net.java.sip.communicator.plugin.otr.ScOtrEngineImpl.transformReceiving(ScOtrEngineImpl.java:287)

Any volunteer to have a look at the otr4j and fix it?

Thanks
damencho

···

On Wed, Apr 17, 2013 at 4:17 PM, Mr Smith <mr.smith476@gmail.com> wrote:

since later builds on Mac (now 4570) the OTR padlock is not closing and my
sent messages dont appear on the screen.
The replies are only visible on the popup window but not in the main window
as well (partner uses Win7 with latest version)

MS


#3

it seems that the recent update of bouncycastle has broken otr. And
particullary otr4j as it is build using bouncycastle 1.43.

The otr4j project had some recent activity to port it to Android. I guess
it's already fixed there. BUT: During this effort, they forked bouncycastle
to move it to a different namespace (I'm guessing to avoid conflicts with
Android's builtin bouncycastle).

Ingo


#4

it seems that the recent update of bouncycastle has broken otr. And
particullary otr4j as it is build using bouncycastle 1.43.

I've looked at updating otr4j to its newest version, but the implementation
of the SMP requires to implement 13 new methods. As I don't know what they
do and probably also require GUI changes, I can't do that.

However, if we patch our source, we should be fine:
- src/net/java/otr4j/io/messages/SerializationUtils.java, line 268:

.decode(content.substring(0, content.length() - 1).getBytes()));

This is the only thing that should be necessary*. Damian, I don't know where
you got the NoSuchMethodError. The "missing" method is definitely present in
1.43 up to in 1.48.

Regards,
Ingo

* BC 1.48 added a check to throw an exception if a non-base64 character is
encountered. An OTR message consists of ?OTR:AbcDefFe. (note the terminating
point). Otr4j doesn't strip this point before passing the content to the
base64 decoder - buuum.


#5

Well I get it as soon as I try to establish a otr chat.
Ok, I will try that patch to check whether the NoSuchMethodError will persist.

···

On Fri, Apr 19, 2013 at 1:09 AM, Ingo Bauersachs <ingo@jitsi.org> wrote:

This is the only thing that should be necessary*. Damian, I don't know where
you got the NoSuchMethodError. The "missing" method is definitely present in
1.43 up to in 1.48.


#6

Hey,

I think it is fixed now. I've just updated the otr using the Ingo's
purposal and it is working on my side, can you all otr users give it a
try I think the modification will go in build 4575.

Thanks Ingo once again for the otr and for the dnssec help :slight_smile:
damencho

···

On Fri, Apr 19, 2013 at 1:09 AM, Ingo Bauersachs <ingo@jitsi.org> wrote:

it seems that the recent update of bouncycastle has broken otr. And
particullary otr4j as it is build using bouncycastle 1.43.

I've looked at updating otr4j to its newest version, but the implementation
of the SMP requires to implement 13 new methods. As I don't know what they
do and probably also require GUI changes, I can't do that.

However, if we patch our source, we should be fine:
- src/net/java/otr4j/io/messages/SerializationUtils.java, line 268:

.decode(content.substring(0, content.length() - 1).getBytes()));

This is the only thing that should be necessary*. Damian, I don't know where
you got the NoSuchMethodError. The "missing" method is definitely present in
1.43 up to in 1.48.

Regards,
Ingo

* BC 1.48 added a check to throw an exception if a non-base64 character is
encountered. An OTR message consists of ?OTR:AbcDefFe. (note the terminating
point). Otr4j doesn't strip this point before passing the content to the
base64 decoder - buuum.


#7

with nb4757 the problems with OTR have been fixed - thank you VERY much! I
hope this quick patch does not affect security (?)
I tried now between MacOS 10.7.5 and Ubuntu 12.04, looks fine so far

MS

···

2013/4/19 Damian Minkov <damencho@jitsi.org>

Hey,

I think it is fixed now. I've just updated the otr using the Ingo's
purposal and it is working on my side, can you all otr users give it a
try I think the modification will go in build 4575.

Thanks Ingo once again for the otr and for the dnssec help :slight_smile:
damencho

On Fri, Apr 19, 2013 at 1:09 AM, Ingo Bauersachs <ingo@jitsi.org> wrote:
>>> it seems that the recent update of bouncycastle has broken otr. And
>>> particullary otr4j as it is build using bouncycastle 1.43.
>
> I've looked at updating otr4j to its newest version, but the
implementation
> of the SMP requires to implement 13 new methods. As I don't know what
they
> do and probably also require GUI changes, I can't do that.
>
> However, if we patch our source, we should be fine:
> - src/net/java/otr4j/io/messages/SerializationUtils.java, line 268:
>
> .decode(content.substring(0, content.length() - 1).getBytes()));
>
> This is the only thing that should be necessary*. Damian, I don't know
where
> you got the NoSuchMethodError. The "missing" method is definitely
present in
> 1.43 up to in 1.48.
>
> Regards,
> Ingo
>
> * BC 1.48 added a check to throw an exception if a non-base64 character
is
> encountered. An OTR message consists of ?OTR:AbcDefFe. (note the
terminating
> point). Otr4j doesn't strip this point before passing the content to the
> base64 decoder - buuum.
>