1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-12 23:32:05 +01:00
Commit graph

55 commits

Author SHA1 Message Date
Florian Schmaus
321c91c264 [build] Introduce bouncyCastleVersion variable and use it
Also bumps bouncy castle to 1.65.
2020-05-13 22:20:32 +02:00
Florian Schmaus
cd96909ac4
Merge pull request #378 from vanitasvitae/bumpPgpainless
Bump pgpainless to 0.0.1-alpha11 and test-depend on bcprov
2020-05-13 22:17:15 +02:00
Florian Schmaus
77e26fc575 Re-work data form API
Apply builder pattern to form fields and replace getVariable() with
getFieldName(). Refer to the field name as "field name" instead of
"variable" everyone, just as XEP-0004 does.

Improve the high-level form API: introduce FilledForm and FillableForm
which perform stronger validation and consistency checks.

Also add FormFieldRegistry to enable processing of 'submit' forms
where the form field types are omitted.

Smack also now does omit the form field type declaration on 'submit'
type forms, as it is allowed by XEP-0004.
2020-05-13 20:14:41 +02:00
e9f427084d
Bump pgpainless to 0.0.1-alpha11 and depend on bcprov in tests 2020-04-21 19:52:05 +02:00
Florian Schmaus
da5f59a996 Remove superfluous ' "" +' statements
Using

sed -i 's; "" +;;' <file>

to remove those.
2020-04-15 09:35:13 +02:00
Florian Schmaus
e63ba07e5c Cast with generic declared 2020-04-12 12:07:02 +02:00
Florian Schmaus
b5f9d4d7a3 Introduce test fixtures
This also removes the powermock dependency. Although powermock is a
fine library, it currently prevents dropping Junit4. And since we only
use the Whitebox API of powermock, this simply replaced powermock's
Whitebox with our own.
2020-04-11 22:05:36 +02:00
Florian Schmaus
07da9ffb48 Do not have Stanza.getExtension(String, String) return a generic type
Returning a generic would allow for

List<ExtensionElement> list = stanza.getExtension("foo", "bar");

to compile (Note the we are calling getExtension(), not
getExtension*s*()).

Users are encouraged to use the type safe getExtension(Class<? extends
ExtensionElement) variant instead.

Fixes SMACK-825.
2020-04-05 22:10:05 +02:00
3fb4438566 Reorder smack-extensions providers xml
Fix rfc number
2020-04-04 13:03:35 +02:00
Florian Schmaus
650deda752 gradle: remove unnecessary repositories{} from smack-openpgp/build.gradle
The MavenCentral repository is already configured by the projects root
build.gradle file. No need to do it again in the subproject.
2020-03-07 20:12:18 +01:00
Florian Schmaus
5db6191110 Introduce StanzaBuilder
As first step to immutable Stanza types.
2019-10-25 21:41:55 +02:00
Florian Schmaus
2f667f95a8 gradle: Remove archives configuration
and FileTestUtil in favor of commons-io. This is required because
Eclipse won't put src/test code into the classpath of src/main
code (even though gradle was configured with an according
dependency).
2019-09-16 00:04:47 +02:00
Florian Schmaus
a6a1142255 Improve OX's PubkeyElement
there is no reason why we want to store the bytes of the base64
encoded string. Simply store the string itself.

Also add a convenience method to get the decoded bytes of the PubKey.
2019-09-07 23:27:36 +02:00
Florian Schmaus
65576cf3c2 Rework XML Element hierarchy and XmlStringBuilder
- Reduce the amount of types that are subtypes of NamedElement. See
javadoc of NamedElement for rationale.
- Work more with XmlEnvironment in XmlStringBuilder.
- Some minor changes to XmlStringBuilder API.
2019-09-07 18:17:08 +02:00
Florian Schmaus
1a3067c89b Enable werror for javadoc and fix javadoc issues 2019-08-30 12:08:30 +02:00
Florian Schmaus
8da954f7a4 OpenPGP: Bump Pgpainless to 0.0.1-alpha7
Also unify how new Security Providers are installed.

Thanks to Paul Schaub for helping with this.
2019-07-30 09:37:19 +02:00
Florian Schmaus
4ca2c7cc69 Enable MissingJavadocPackage and UnnecessaryParentheses checkstyle checks 2019-07-24 09:18:39 +02:00
Florian Schmaus
91ec6cc955 Javadoc changes for Java 11 compatibility 2019-07-19 23:05:46 +02:00
Florian Schmaus
6e1193edaf Use QName instead of XmppStringUtils.generateKey() 2019-06-11 12:47:39 +02:00
Florian Schmaus
619b8e6f4a Add secure(OnlineAttackSafe|Unique|OfflineAttackSafe)RandomString()
and replace usages of java.util.UUID in Smack with
secureUniqueRandomString() because it uses a thread-local secure random
number generator.
2019-06-02 20:08:03 +02:00
Florian Schmaus
f7762c5db7 Add "whitespace after comma" checkstyle rule 2019-05-17 21:56:46 +02:00
Florian Schmaus
7f0dc72dab Update errorprone(-plugin) and make Unused(Variable|Method) an error 2019-05-07 23:09:00 +02:00
Florian Schmaus
e1ed035beb Remove xmlunit-lagacy and add xmlunit-assertj 2019-05-07 19:06:16 +02:00
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
d97fb126a1 Add PubSubManager.getInstanceFor() just like all other Managers
and deprecate PubSubManager.getInstance().
2019-04-16 11:21:22 +02:00
Florian Schmaus
9c30e4f3cc Merge branch '4.3' 2019-04-16 09:27:48 +02:00
Florian Schmaus
ab7d81e7b5 Use type parameter bounds for the 'to' set in OpenPgpgContentElement 2019-03-25 18:58:58 +01:00
Florian Schmaus
14f288a763 Introduce RandomUtil
and use it in EncryptedOpenPgpContentElement
2019-03-25 18:58:58 +01:00
Florian Schmaus
8df69bd3ce Use XmlEnvironment in parsing/provider subsystem 2019-02-15 23:21:30 +01:00
Florian Schmaus
7dee3b88a2 Introduce SmackParsingException 2019-02-10 19:01:47 +01:00
Florian Schmaus
083dac8b83 Rework exceptions in the parsing / provider subsystem 2019-02-05 13:18:03 +01:00
Florian Schmaus
fee3ed81ca Introduce XmlEnvironment 2019-02-05 13:18:03 +01:00
Florian Schmaus
b7ea226c56 Bump "Error Prone" to 2.3.2
and gradle-errorprone-plugin to 0.6.
2018-10-31 16:06:31 +01:00
d88e03d70c
Use URL-encoded bareJid in file-based store implementations 2018-10-26 10:08:29 +02:00
512a2375be
Fix failing JUnit test by bumping PGPainless to 0.0.1-alpha4 2018-08-30 13:30:05 +02:00
Florian Schmaus
e91a8336f6 Remove cruft in FileBasedOpenPgpMetadataStore 2018-08-17 13:00:34 +02:00
Florian Schmaus
fb3009adb2 Add FileUtils.maybeCreateFileWithParentDirectories(File) 2018-08-17 13:00:34 +02:00
Florian Schmaus
a70ae7ab8e Add FileUtils.maybeDeleteFileOrThrow(File) 2018-08-17 13:00:34 +02:00
Florian Schmaus
affdcb0557 Add TODO comment to FileBasedOpenPgpMetadataStore 2018-08-17 13:00:33 +02:00
Florian Schmaus
d133f25ca6 Do not mask FileNotFoundException in FileBasedOpenPgpKeyStore 2018-08-17 13:00:33 +02:00
Florian Schmaus
fe9d2daed2 Simplfy code in FileBasedOpenPgpMetadataStore 2018-08-17 12:22:58 +02:00
Florian Schmaus
97feeb2e2c Improve log message to contain 'line' in FileBasedOpenPgpTrustStore 2018-08-17 12:22:37 +02:00
Florian Schmaus
b36b19d864 Add TODO notes to OX code 2018-08-17 12:13:28 +02:00
Florian Schmaus
4d4f92ba86 Rename PEP to Pep 2018-08-15 20:15:57 +02:00
Florian Schmaus
4b3f757ed9 Add a PEP PubSubManager to PEPManager 2018-08-15 20:13:40 +02:00
Florian Schmaus
a1d4a91fa0 Make PubSubManager.deleteNode(String) "node did not exists" aware 2018-08-15 17:48:54 +02:00
Florian Schmaus
3e65cb31c3 Consolidate FileUtils from smack-openpgp into smack-core 2018-08-15 17:36:29 +02:00
Florian Schmaus
a00aa726fe Introduce CloseableUtil 2018-08-15 17:25:22 +02:00
60688b0146
Bump pgpainless to 0.0.1-alpha3 2018-08-02 19:35:38 +02:00
b530727539
Add more javadoc 2018-08-02 17:33:55 +02:00