mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 10:19:41 +02:00
Add integration test and fix checkstyle issues
This commit is contained in:
parent
378aa4b262
commit
410c652074
3 changed files with 79 additions and 7 deletions
|
@ -30,7 +30,7 @@ public final class OmemoConfiguration {
|
|||
* Set to true, in order to ignore read-only devices.
|
||||
*
|
||||
* @param ignore ignore read-only devices
|
||||
* @see <a href="TODO: Add URL">Blog Post explaining the danger of read-only devices.</a>
|
||||
* @see <a href="example.com">Blog Post explaining the danger of read-only devices. TODO: Add URL </a>
|
||||
*/
|
||||
public static void setIgnoreReadOnlyDevices(boolean ignore) {
|
||||
IGNORE_READ_ONLY_DEVICES = ignore;
|
||||
|
@ -40,7 +40,7 @@ public final class OmemoConfiguration {
|
|||
* Return true, if the client should stop encrypting messages to a read-only device.
|
||||
*
|
||||
* @return true if read-only devices should get ignored after a certain amount of unanswered messages.
|
||||
* @see <a href="TODO: Add URL">Blog Post explaining the danger of read-only devices.</a>
|
||||
* @see <a href="example.com">Blog Post explaining the danger of read-only devices. TODO: Add URL </a>
|
||||
*/
|
||||
public static boolean getIgnoreReadOnlyDevices() {
|
||||
return IGNORE_READ_ONLY_DEVICES;
|
||||
|
@ -53,7 +53,7 @@ public final class OmemoConfiguration {
|
|||
* This threshold is used to prevent read-only devices from weakening forward secrecy.
|
||||
*
|
||||
* @param maxReadOnlyMessageCount maximum number of allowed messages to a read-only device.
|
||||
* @see <a href="TODO: Add URL">Blog Post explaining the danger of read-only devices.</a>
|
||||
* @see <a href="example.com">Blog Post explaining the danger of read-only devices. TODO: Add URL </a>
|
||||
*/
|
||||
public static void setMaxReadOnlyMessageCount(int maxReadOnlyMessageCount) {
|
||||
if (maxReadOnlyMessageCount <= 0) {
|
||||
|
@ -69,7 +69,7 @@ public final class OmemoConfiguration {
|
|||
* This threshold is used to prevent read-only devices from weakening forward secrecy.
|
||||
*
|
||||
* @return maximum number of allowed messages to a read-only device.
|
||||
* @see <a href="TODO: Add URL">Blog Post explaining the danger of read-only devices.</a>
|
||||
* @see <a href="example.com">Blog Post explaining the danger of read-only devices. TODO: Add URL </a>
|
||||
*/
|
||||
public static int getMaxReadOnlyMessageCount() {
|
||||
return MAX_READ_ONLY_MESSAGE_COUNT;
|
||||
|
|
|
@ -19,9 +19,6 @@ package org.jivesoftware.smackx.omemo;
|
|||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.Crypto.KEYLENGTH;
|
||||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.Crypto.KEYTYPE;
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.IllegalBlockSizeException;
|
||||
import javax.crypto.NoSuchPaddingException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.InvalidAlgorithmParameterException;
|
||||
import java.security.InvalidKeyException;
|
||||
|
@ -39,6 +36,9 @@ import java.util.Random;
|
|||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.IllegalBlockSizeException;
|
||||
import javax.crypto.NoSuchPaddingException;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue