Commit Graph

24 Commits

Author SHA1 Message Date
Florian Schmaus 4133eb175c Replace XPP3 by XmlPullParser interface wrapping StAX and XPP3
Introducing Smack's own XmlPullParser interface which tries to stay as
compatible as possible to XPP3. The interface is used to either wrap
StAX's XMLStreamReader if Smack is used on Java SE, and XPP3's
XmlPullParser if Smack is used on on Android.

Fixes SMACK-591.

Also introduce JUnit 5 and non-strict javadoc projects.
2019-05-06 22:10:50 +02:00
Florian Schmaus e98d42790a SmackReactor/NIO, Java8/Android19, Pretty print XML, FSM connections
This commit adds
- SmackReactor / NIO
- a framework for finite state machine connections
- support for Java 8
- pretty printed XML debug output

It also
- reworks the integration test framework
- raises the minimum Android API level to 19
- introduces XmppNioTcpConnection

Furthermore fixes SMACK-801 (at least partly). Java 8 language
features are available, but not all runtime library methods. For that
we would need to raise the Android API level to 24 or higher.
2019-02-05 13:18:03 +01:00
Florian Schmaus a00aa726fe Introduce CloseableUtil 2018-08-15 17:25:22 +02:00
Florian Schmaus ad932caf78 Do not use a reflection based initializer for core elements
like Message.Body from smack-core.
2018-05-09 16:45:14 +02:00
Florian Schmaus 5a841ff0a8 Remove support for classpath:org.jivesoftware.smack/disabledClasses
when initalizing Smack.
2018-04-06 10:25:06 +02:00
Florian Schmaus f73641da5a Better exception messages on Smack initialization 2018-04-06 10:25:06 +02:00
Florian Schmaus f48b761c33 Log exception when handling debugEnable 2018-04-06 10:25:06 +02:00
Florian Schmaus ac5508ae37 Remove deprecated CustomSmackConfiguration on intialization 2018-04-06 10:25:06 +02:00
Florian Schmaus 6a42d5baff Rework FileUtils 2018-04-06 10:25:06 +02:00
Paul Schaub cb18056613 Fix minor codestyle issues 2017-12-17 11:03:46 +01:00
Florian Schmaus 08e897113d Add CustomImportOrder checkstyle rule
And matching ImportOrder settings for Eclipse in
resources/eclipse/smack.importorder
2017-06-14 17:12:43 +02:00
Florian Schmaus ce1cddc722 More checkstyle whitespace related checks 2017-05-24 14:42:38 +02:00
Florian Schmaus 4c646436a5 Bump "Error Prone" to 2.0.15
and fix a few things :)
2017-02-11 16:16:41 +01:00
Florian Schmaus 1f1bc236fd Ads support for SCRAM-SHA-1-PLUS
Related to SMACK-398.
2016-11-20 19:34:17 +01:00
Florian Schmaus 9354e4fb74 Rework and improve authentication API and internals
Add

- performSaslAnonymousAuthentication()
- performSaslExternalAuthentication(SSLContext)
- addEnabledSaslMechanism(String)
- addEnabledSaslMechanisms(Collection<String>)

to ConnectionConfiguration.Builder.

Instead of providing a special API call for anonymous authentication,
Smack now has a configuration builder method to set anonymous/external
authentication. This also removes a lot of duplicate code within
Smack.

Also move SASLAnonymous into o.j.smack.sasl.core.

Fixes SMACK-629.
2015-05-03 22:00:41 +02:00
Florian Schmaus d5b8647d9d Create smack-im subproject for XMPP-IM
Move Roster and Chat(Manager) code into their own packages within the
new smack-im subproject.

Apply Manager pattern to Roster.

Fixes SMACK-637.
2015-01-26 07:54:05 +01:00
Florian Schmaus 440af7675a Rename SmackConfiguration.DEBUG_ENABLED to DEBUG 2015-01-19 08:26:42 +01:00
Florian Schmaus 255f7a1ad5 Add AbstractDebugger and JulDebugger
there was a lot of duplicate code in ConsoleDebugger and
AndroidDebugger, which resides now in AbstractDebugger. Those two and
the new JulDebugger subclass AbstractDebugger.
2014-11-21 18:36:26 +01:00
Florian Schmaus 6e569701b3 Add support for SASL X-OAUTH2 2014-11-20 18:50:33 +01:00
Florian Schmaus 1de2fc2a81 Refactor Bind and Roster IQ parsing code into providers 2014-10-30 13:21:36 +01:00
Florian Schmaus 403ecff2b2 Add SCRAM-SHA1 support
Thanks to Stefan Karlsson for helping with the implementation.

Also add SASLMechanism.checkIfSuccessfulOrThrow(), to increase the
security by verifying the mechanisms state at the end of SASL
authentication.

SASLMechanism now has a SASLPrep StringTransformer.

Refactor SHA1 functions out of StringUtils into SHA1 utility class.

Add MAC utility class.

Make DummyConnection getSentpacket() methods use generics to make unit
testing SCRAM-SHA1 easier.

Fixes SMACK-398
2014-10-21 15:03:48 +02:00
Florian Schmaus dfc4173e5b Fix initialization order issue with DEBUG_ENABLED
If a user enabled Smack debug via the property 'smack.debugEnabled', a
ConnectionConfiguration could be created where debuggerEnabled is
'false', because Smack is not yet initialized.

Also make sure that if the property is not set, it won't overwrite
DEBUG_ENABLED = true.

Thanks to William Murphy for providing a detailed issue description and
supposing a fix.
2014-10-19 21:48:17 +02:00
Florian Schmaus 9580784bbf DisabledSmackClasses now also take package names
So that whole packages can be disabled.
2014-09-25 09:42:55 +02:00
Florian Schmaus af9b9a8769 Split SmackConfiguration into Configuration and Initalization
also add SmackConfiguration.addDisabledSmackClass()
2014-09-05 15:56:00 +02:00