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

55 commits

Author SHA1 Message Date
1a9ac238e8 OpenPgpManager: Expose methods to generate and import keys 2020-10-27 10:22:46 +01:00
Florian Schmaus
2edf27f5da
Merge pull request #406 from vanitasvitae/oxSecretKeyBackupRestore
OX: Improvements to Secret key backup restore function
2020-07-18 22:40:20 +02:00
2f98bb25e2 OX: Fix incorrect documentation URL 2020-07-18 15:18:37 +02:00
15b8a81493 OX: Trust secret key upon backup import 2020-07-18 15:18:29 +02:00
Florian Schmaus
81cccaab91
Merge pull request #408 from vanitasvitae/secretKeyBackupPassword
Allow user-supplied secret key backup passphrases
2020-07-18 14:48:53 +02:00
6e57ea0873
Allow user-supplied secret key backup passphrases
Instead of passing the passphrase back to the user via a
DisplayBackupCodeCallback, we directly return the passphrase
which is now represented by a class.

Also we now allow the user to provide the passphrase.
2020-07-15 22:22:42 +02:00
075e65ad40
Fix indentation 2020-07-15 22:20:50 +02:00
a587827ef8
Remove unnecessary lines from OX backup restore routine 2020-07-15 18:08:18 +02:00
9fd2c6f9ec
OX-IM: Remove redundant code to add self to recipients 2020-07-12 15:47:06 +02:00
4a878ff175
Remove constructor dependency on XMPPConnection from OpenPgpProvider 2020-06-15 14:02:18 +02:00
Florian Schmaus
ccc785062e [extensions] Deprecate old-style PepManager PEP listeners 2020-05-25 20:32:47 +02:00
Florian Schmaus
15499ad1f8 [openpgp] Remove info log "Received OpenPPG metadata update from…" 2020-05-25 16:16:56 +02:00
Florian Schmaus
d65f2c932e Bump Error Prone version to 2.3.4 and fix new bug patterns 2020-05-24 21:10:01 +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
Florian Schmaus
e63ba07e5c Cast with generic declared 2020-04-12 12:07:02 +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
Florian Schmaus
5db6191110 Introduce StanzaBuilder
As first step to immutable Stanza types.
2019-10-25 21:41:55 +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
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
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