-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call encryption using SDES fails. #91
Comments
Thiswas just a incorrect build. |
Actually the problem is that the SDES library call the Base64.decodeBase64, and the declaration has conflict between commons-decode library and the embedded code in android /system/framework which is incomplete.
Because of this conflict, android studio built does not warn of missing library or just discards the commons-library, hence causes the problem for the SDES feature. I am now study whether to keep SDES support or just remove the feature. aTalk is forked from jitsi, and found that jitsi latest built has discarded the SDES support. Please see |
Solution implemented, will be in aTalk next version release |
cmeng-git#91 After the fix SDES works correctly. The library ch.imvs.sdes4j is directly included in the source code. Imports for org.apache.commons.codec.binary are replaced with a local copy org2.apache.commons.codec.binary .
Call encryption using SDES (without DTLS-SRTP, ZRTP) fails.
Maybe the Base64.decodeBase64 method is missing trailing
=
According to
https://xmpp.org/extensions/xep-0167.html#srtp
and RFC 4568 [Page 13]
in the inline key method one or two "=" at the end of the base64-encoded data are discarded. (see [RFC3548] for details)
E/AndroidRuntime: FATAL EXCEPTION: Thread-318 Process: org.atalk.android, PID: 17114 java.lang.NoSuchMethodError: No static method decodeBase64(Ljava/lang/String;)[B in class Lorg/apache/commons/codec/binary/Base64; or its super classes (declaration of 'org.apache.commons.codec.binary.Base64' appears in /system/framework/org.apache.http.legacy.boot.jar) at ch.imvs.sdes4j.srtp.SrtpKeyParam.<init>(SrtpKeyParam.java:83) at ch.imvs.sdes4j.srtp.SrtpSDesFactory.createKeyParam(SrtpSDesFactory.java:93) at ch.imvs.sdes4j.srtp.SrtpSDesFactory.createKeyParam(SrtpSDesFactory.java:27) at ch.imvs.sdes4j.CryptoAttribute.setKeyParams(CryptoAttribute.java:191) at ch.imvs.sdes4j.CryptoAttribute.create(CryptoAttribute.java:81) at ch.imvs.sdes4j.srtp.SrtpCryptoAttribute.create(SrtpCryptoAttribute.java:38) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.selectSdesCryptoSuite(CallPeerMediaHandlerJabberImpl.java:2215) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.addSDesAdvertisedEncryptions(CallPeerMediaHandlerJabberImpl.java:2170) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.setAndAddPreferredEncryptionProtocol(CallPeerMediaHandlerJabberImpl.java:2417) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.setAndAddPreferredEncryptionProtocol(CallPeerMediaHandlerJabberImpl.java:1856) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.processOffer(CallPeerMediaHandlerJabberImpl.java:1322) at net.java.sip.communicator.impl.protocol.jabber.CallPeerJabberImpl.processSessionInitiate(CallPeerJabberImpl.java:682) at net.java.sip.communicator.impl.protocol.jabber.CallJabberImpl.processSessionInitiate(CallJabberImpl.java:741) at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl$2.run(OperationSetBasicTelephonyJabberImpl.java:808) E/(UtilActivator.java:90)#uncaughtException: An uncaught exception occurred in thread = Thread[Thread-318,5,main] and message was: No static method decodeBase64(Ljava/lang/String;)[B in class Lorg/apache/commons/codec/binary/Base64; or its super classes (declaration of 'org.apache.commons.codec.binary.Base64' appears in /system/framework/org.apache.http.legacy.boot.jar) java.lang.NoSuchMethodError: No static method decodeBase64(Ljava/lang/String;)[B in class Lorg/apache/commons/codec/binary/Base64; or its super classes (declaration of 'org.apache.commons.codec.binary.Base64' appears in /system/framework/org.apache.http.legacy.boot.jar) at ch.imvs.sdes4j.srtp.SrtpKeyParam.<init>(SrtpKeyParam.java:83) at ch.imvs.sdes4j.srtp.SrtpSDesFactory.createKeyParam(SrtpSDesFactory.java:93) at ch.imvs.sdes4j.srtp.SrtpSDesFactory.createKeyParam(SrtpSDesFactory.java:27) at ch.imvs.sdes4j.CryptoAttribute.setKeyParams(CryptoAttribute.java:191) at ch.imvs.sdes4j.CryptoAttribute.create(CryptoAttribute.java:81) at ch.imvs.sdes4j.srtp.SrtpCryptoAttribute.create(SrtpCryptoAttribute.java:38) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.selectSdesCryptoSuite(CallPeerMediaHandlerJabberImpl.java:2215) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.addSDesAdvertisedEncryptions(CallPeerMediaHandlerJabberImpl.java:2170) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.setAndAddPreferredEncryptionProtocol(CallPeerMediaHandlerJabberImpl.java:2417) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.setAndAddPreferredEncryptionProtocol(CallPeerMediaHandlerJabberImpl.java:1856) at net.java.sip.communicator.impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.processOffer(CallPeerMediaHandlerJabberImpl.java:1322) at net.java.sip.communicator.impl.protocol.jabber.CallPeerJabberImpl.processSessionInitiate(CallPeerJabberImpl.java:682) at net.java.sip.communicator.impl.protocol.jabber.CallJabberImpl.processSessionInitiate(CallJabberImpl.java:741) at net.java.sip.communicator.impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl$2.run(OperationSetBasicTelephonyJabberImpl.java:808)
The text was updated successfully, but these errors were encountered: