Commit Graph

4678 Commits

Author SHA1 Message Date
Florian Schmaus cd10d1b40c [sinttest] Downgrade org.refelections:reflections to 0.9.11 2021-04-01 17:21:49 +02:00
Florian Schmaus 533695c1b4 [core] Properly reply to IQ requests
Properly reply to IQ requests with feature-not-implemented or
service-unavailable. In case there is no IQ request handler but the IQ
namespace is known, we reply with feature-not-implemented, otherwise
with service-unavailable.
2021-04-01 13:57:36 +02:00
Guus der Kinderen 252cea1149 SINT: MAM test does not require XEP-0441
The MAM integration test setup attepts to set MAM preferences (XEP-0441).
When a server does not support this XEP, the setup phase errors out, preventing
the tests from being executed.

There is no functional reason why tests shouldn't be run when XEP-0441 is not
supported: the tests can run against the default configuration of the MAM
service.

This commit ignores feature-not-implemented errors when MAM
preferences are set.

[Ignore only feature-not-implemented errors, log ignored errors)
Modified-by: Florian Schmaus <flo@geekplace.eu>
2021-04-01 13:13:42 +02:00
Florian Schmaus e6433a6870 Merge branch '4.4' 2021-03-31 12:26:25 +02:00
Florian Schmaus 8c57d34b97
Merge pull request #466 from Vshnv/master
Added proxy support for XEP-0363
2021-03-29 18:15:40 +02:00
Vshnv 4736d080a1 Added proxy support for XEP-0363 2021-03-29 19:01:58 +05:30
Vshnv 525db827a9 Added support for Java's Proxy class in ProxyInfo 2021-03-29 19:01:42 +05:30
Florian Schmaus e04a3877fb Merge branch '4.4' 2021-03-25 19:28:58 +01:00
Florian Schmaus 92f4aadfdc [sasl] Avoid mechanisms that need a password when none is available 2021-03-25 15:01:15 +01:00
Florian Schmaus 72e11ebf71 [README] Fix typo; s/NOICE/NOTICE/ 2021-03-25 15:00:07 +01:00
Florian Schmaus 33d735a42e [core] Make Smack.getNoticeStream() more robust
Appearently simply calling ClassLoader.getSystemResourceAsStream()
works on Java SE but not on Android. But our FileUtils are able to
load the resource stream on Android.
2021-03-25 14:58:44 +01:00
Florian Schmaus b58511d624 [core] Also provide incoming Nonzas to SmackDebugger 2021-03-25 14:51:25 +01:00
Florian Schmaus 5844bee1c3 [javadoc-overview] Disconnect the connection in example code 2021-03-25 12:23:39 +01:00
Florian Schmaus a39d44ed1f [javadoc-overview] Improve 'License' section 2021-03-25 12:23:19 +01:00
Florian Schmaus 406daa78f7 [javadoc-overview] Use stanza factory in example code 2021-03-25 12:16:34 +01:00
Florian Schmaus 61713c500c Smack 4.4.2
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAmBcSRtfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFJs0wf/TYm4e4LlBiekmar8YnfaAObT9loDiqMJjO5s4g+trYx2U3gCKkRvKI0P
 U/jzqoJohcPY+5s/fkGKaBWjzFD5WucHyvNaP01D4EWSvHXpCMElbSxY1Uz3X4k1
 t0pmdb27DoHhtdqMfw1Cg7Nba4M+ZzdrEIkDRgCNA8H0mJoKpnsDAg8Y6kEUnvt6
 WQxmIZ49ZT9UOQnVbsXUk4t5DZDz1GdQggrDS5Sh+rZaRFy1KyDgLC+X4NQO99RV
 v3Tf4VRIy+6Nen7L/av3qwSBRqpvc1TEJauNwOnYvyuDwpwjE0tEfRuFZ8wjtkAz
 CKF+LLor+WA5Y2GCXEegLJxVd9Je6Q==
 =hZJ2
 -----END PGP SIGNATURE-----

Merge tag '4.4.2'

Smack 4.4.2
2021-03-25 11:45:03 +01:00
Florian Schmaus 2dab49f048 Smack 4.4.3-SNAPSHOT 2021-03-25 09:46:57 +01:00
Florian Schmaus 9d64af26b7 Smack 4.4.2 2021-03-25 09:26:02 +01:00
Florian Schmaus d07d46bbdc [chat2] Fix resource unlock condition
If the resource of the updated presence is equal to the currently
locked resource, then no further action is required.

Thanks to Pedro Oliveira for reporting this.

Reported-by: Pedro Oliveira <kanytu@gmail.com>
2021-03-25 08:22:12 +01:00
Florian Schmaus eb31479913 [muc] Make sendMessage() return a MessageView of the sent message 2021-03-25 08:19:53 +01:00
Florian Schmaus ed807d5954 Merge branch '4.4' 2021-03-23 21:41:25 +01:00
Florian Schmaus 64a2db3f19 [sid] Add <origin-id/> to MUC messages if not muc#stable_id 2021-03-23 21:27:10 +01:00
Florian Schmaus 4381d04831 [muc] Introduce MucMessageInterceptor 2021-03-23 21:27:10 +01:00
Florian Schmaus b8f23eb371 [sid] Do not enable StableUniqueStanzaIdManager per default 2021-03-23 21:27:10 +01:00
Florian Schmaus 800c771700 [sid] Check if there is already a <origin-id/> in addOriginId() 2021-03-23 21:27:09 +01:00
Florian Schmaus 4fefa92e40 Merge branch '4.4' 2021-03-19 09:47:07 +01:00
Florian Schmaus b276b89916 [sinttest] Add code comment and empty line 2021-03-18 21:32:37 +01:00
Florian Schmaus ddf96828e4 [sinttest] Add fromMarkers array to exception message 2021-03-18 21:32:21 +01:00
Florian Schmaus 35cd1a8f88 [sinttest] Do not lazily create fromMarkers
If we do not create the fromMarkers initialized with 'false' at the
start, then it may appear like all messages are received, because we
only check for false markers. But if there is not even the fromMarkers
array, then we do not see those 'false' markers.
2021-03-18 21:32:10 +01:00
Florian Schmaus 47178fd27d Bump JUnit to 5.7.1 2021-03-18 09:01:03 +01:00
Florian Schmaus 9520aa7d90 [sinttest] Do not create myReceiveMarkers on demand 2021-03-15 19:24:19 +01:00
Florian Schmaus 11a486d84d [sinttest] Add header to NotAllMessagesReceivedException
This header maps the internal connection ID to the connection.
2021-03-15 19:22:57 +01:00
Florian Schmaus f91598e10c [sinttest] Improve NotAllMessageReceivedException 2021-03-15 19:22:26 +01:00
Florian Schmaus ad8eeebc0d [sinttest] Allow maxPayloadChunks == 0 2021-03-15 19:21:55 +01:00
Florian Schmaus d75cd2acb8 [filetransfer] Pre-register 'stream-method' form field
Fixes SMACK-904.
2021-03-14 19:34:28 +01:00
Florian Schmaus adc159186c [formtypes] Introduce LOOKASIDE_FIELD_REGISTRY
Some field's like stream-method of XEP-0096, which is of type
list-single, need to be pre-registered.
2021-03-14 17:58:13 +01:00
Florian Schmaus 73941629f3 [sinttest] Call OutgoingFiletransfer.getException() in case of error 2021-03-14 17:57:13 +01:00
Florian Schmaus 2779187d8c [filetransfer] Set the status to error in setException()
FileTransfer would previously not change the status, even though an
exception has been set, leading users to believe that the transfer is
still ongoing, when it is not.
2021-03-14 17:54:03 +01:00
Florian Schmaus c564c89c40 [extensions] Add OutgoingFileTransfer.setCallback()
Some methods of OutgoingFileTransfer take already the
NegotiationProgress callback as argument, some do not. The API is not
ideal, and adding a setter for the callback at least makes it possible
to always have the callback.
2021-03-14 17:52:12 +01:00
Florian Schmaus f2b44f65d9 [tcp] Add code comment why we need to set "running = false" here 2021-03-14 17:51:33 +01:00
Florian Schmaus 9d1b88a877 [muc] Do not filter for presence ID if #stable_id is not announced
On leave(), do not filter for presence ID if the MUC service does not
announce #stable_id.
2021-03-14 12:48:01 +01:00
Florian Schmaus 61cb73ee37 [core] Add AndFilter(List<StanzaFilter>) constructor 2021-03-14 12:48:01 +01:00
Florian Schmaus 14142a0ef2 [omemo] Introduce OmemoAesCipher as central AES API
OmemoAesCipher is the sole point where OMEMO related AES operations
are performed. This allows OmemoAesCipher to check in a static block
if AES is available. If AES is not available it throws a (hopefully)
helpfull exception message.

Typically AES is not available on Android if no security provider
providing AES, like Bouncy Castle, has been explicitly configured.
2021-03-14 12:48:01 +01:00
Florian Schmaus b7905d585d [omemo] Use RandomUtil.fillWithSecureRandom() to generate IV 2021-03-14 12:48:01 +01:00
Florian Schmaus 17ac41c8cb [core] Add RandomUtil.fillWithSecureRandom(byte[]) 2021-03-14 12:48:01 +01:00
Florian Schmaus 7cf0112487 [omemo] Cleanup CryptoFailedException
Remove the unused list of exceptions and add a (String, Exception)
constructor.
2021-03-14 12:48:00 +01:00
Florian Schmaus c7b429535b [doc] Fix extensions/index.md table 2021-03-10 10:24:39 +01:00
Florian Schmaus f9114f780d [tcp] Ignore exceptions in reader thread if writer was terminated
If we do not ignore the exception, then users may receive an exception
via connectionClosedOnError() on connection termination. Those
exceptions are typically unwanted if they are caused e.g. because the
server does not send a closing stream tag.

We previously ignored exceptions in this case already, but that
behavior was changed with [1: 57961a8cc1]. This commit re-adds the
behavior.

1: 57961a8cc1
   Remove SynchronizationPoint
2021-03-09 19:27:53 +01:00
Florian Schmaus 4adbd21a0f [smack-xmlparser] Allow override of used XmlPullParserFactory 2021-03-03 22:25:32 +01:00
Florian Schmaus 3bef905ef5 [xmlparser-stax] Move getNamespace() to its friends within the file 2021-03-03 21:43:43 +01:00