Commit Graph

25 Commits

Author SHA1 Message Date
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 ef0af66b21 Enfore spaces for indentation
Although I'm in the tabs camp, Smack uses mostly spaces. Therefore it
is the logical choice for the indentation style.
2017-02-07 22:10:10 +01:00
Florian Schmaus 529e1eb058 Fix 'test' dependencies
The previously used approach of

project(':smack-core').sourceSets.test.runtimeClasspath

caused the 'eclipse' target to produce duplicate classpath entries in
.classpath when run with Gradle >= 2.6. It also relied on Gradle
internals.

Instead we now use

project(path: ":smack-core", configuration: "testRuntime")
project(path: ":smack-core", configuration: "archives")

to be able to use test classes from other subprojects (usually
smack-core) in e.g. smack-extensions. The 'archives' configuration
includes the test jar.

See also https://discuss.gradle.org/t/11784

Thanks to Lari Hotari for helping with this issue.
2016-02-10 12:39:18 +01:00
Florian Schmaus 85e818cffb Smack 4.1.6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJWo2DDXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41Q0AH/22s1WOI0mgFjQnuSRoZwtNQ
 WN7eudnKlnknmNrJwPcbW1EYO/kNj1SQnqv7ed2aVpyeFFOf1/CUIgq57K1hBjA0
 gTVtv0vK9pABZOmYY5UYURF6AZqKC2s5grHzOgIQbEhT0IOxc/Kz3/ubRxYwvxQl
 lKenkNw75NMViylC0wFQc673SUuwPKyS3PjFm44ASxhbHNIexqagsxNU3MICmCWr
 vGuyv2pGuVvVbILdqqoRGJhucHUs8HnYjA/H1lAlXH4FE0k3EXnjtztHaiLXQoxC
 I2MbunwlVWcE5099V85wcgBbtMWqgljyz+Yh8MmkPojZTVnWjYPUWybK4G8TREg=
 =1rYD
 -----END PGP SIGNATURE-----

Merge tag '4.1.6'

Smack 4.1.6
2016-01-23 13:27:16 +01:00
Florian Schmaus 8650a07228 Quote backslash in provided DIGEST-MD5 implementation
Fixes SMACK-710.
2016-01-23 12:08:44 +01:00
Dave Cridland 9c772add93 SASL Proxy Auth support
This adds the ability to provide a distinct authorization identifier for use
by SASL mechanisms. Not all SASL mechanisms support this operation, in
particular CRAM-MD5.

Both the javax and provided SASL implementations are extended, and an authzid
parameter added to the authenticate method.

The authorization identifier is passed as a EntityBareJid in order to assure the
correct form.

Resolves SMACK-677.

Minor-Modifications-By: Florian Schmaus <flo@geekplace.eu>
2015-09-21 20:39:23 +02:00
Florian Schmaus 4a16ab9329 Merge branch '4.1'
Conflicts:
	version.gradle
2015-04-12 18:32:55 +02:00
Florian Schmaus 0a6ac76447 Remove package-info.java from test packages
as otherwhise eclipse will complain "The type package-info is already
defined".
2015-04-05 10:48:00 +02:00
Florian Schmaus de528eee67 Add JavadocPackage checkstyle
change from package.html to package-info.java. Add missing
package-info.java with a placeholder description.
2015-04-04 17:16:47 +02:00
Florian Schmaus 5597b1ffc0 Handle preceding whitespace in DIGEST-MD5
implementation from smack-sasl-provided.

Fixes SMACK-649.
2015-03-31 10:25:40 +02:00
Florian Schmaus 64d134052d Enable javadoc checkstyle
and fix violations.
2015-03-29 12:29:32 +02:00
Florian Schmaus 5bb4727c57 Use Jid (and subclasses) from jxmpp-jid
Fixes SMACK-634
2015-02-17 16:07:16 +01:00
Florian Schmaus bc61527bd2 Expose InterruptedException
SMACK-632
2015-02-14 14:57:33 +01:00
Florian Schmaus c682091a47 Fix SASL EXTERNAL with client cert provided JID
isAnonymous() is now a bit weakened since it also considers
allowNullorEmptyUsername.

SaslExternalMechanism of smack-sasl-provided now also doesn't throw an
UnsupportedOperationException.

Follow up on 7e4e3699a1
2015-01-13 13:31:30 +01:00
Florian Schmaus 7e4e3699a1 Add allowEmptyOrNullUsername()
to ConnectionConfiguration.Builder().

And prepare SASL EXTERNAL for empty or null usernames.

Also clarify some parts regarding the user field.

Fixes SMACK-627
2015-01-10 11:26:15 +01:00
Christoph Fiehe 665e7914f2 Enable OSGi compliance via 'DynamicImport-Package: *'
on package layer instead of Declarative Service (DS) approach.
Restructuring and cleanup of initialization process to ensure that all
internal config files are found by the corresponding bundle
classloaders.

SMACK-343
2015-01-03 13:14:02 +01:00
Florian Schmaus 763f9c7c14 Implemented MD5 just like the SHA1 util 2014-11-15 09:46:39 +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 e32a437c49 Add SASL PLAIN implementation to smack-sasl-provided 2014-08-16 09:29:32 +02:00
Florian Schmaus 7277eb553a Enable more 'checkstyle' checks
AvoidStarImport
IllegalImport
RedundantImport
UpperEll
ArrayTypeStyle
GenericWhitespace
EmptyStatement
PackageDelcaration
2014-08-15 23:17:45 +02:00
Daniele Ricci b60107db08 Add SASL EXTERNAL mechanism
Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
2014-08-12 22:15:32 +02:00
Florian Schmaus 47a59ad7b3 Move toBytes() into SASLMechanism
as it's a often needed transformation in the SASL world.
2014-08-12 22:00:09 +02:00
Florian Schmaus da7f4495dc Remove smack-core sasl configuration
bring every class of smack-core and its dependencies in
scope of smack-sasl-(javax|provided).
2014-08-12 21:54:22 +02:00
Florian Schmaus f37682d980 Make SASLMechanism.getAuthenticationText() return byte[]
every SASL Mechanism is designed as a byte array based protocol. XMPP
adds the constraint that the challenges and responses are send base64
encoded. It's therefore better API design to let getAuthenticationText()
return byte[] instead of String.
2014-08-12 21:52:56 +02:00
Florian Schmaus 89dc3a0e85 Add smack-android and redesign SASL authentication
This commit marks an important milestone with the addition of the
smack-android subproject. Smack is now able to run native on Android
without requiring any modifications, which makes the aSmack build
environment obsolete.

It was necessary to redesign the code for SASL authentication to achieve
this. Smack now comes with smack-sasl-provided for SASL implementations
that do not rely on additional APIs like javax for platforms where those
APIs are not available like Android.
2014-08-01 10:34:47 +02:00