2017-06-02 12:26:37 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Copyright 2017 Paul Schaub
|
|
|
|
*
|
|
|
|
* This file is part of smack-omemo-signal.
|
|
|
|
*
|
|
|
|
* smack-omemo-signal is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
package org.jivesoftware.smack.omemo;
|
|
|
|
|
2017-11-28 15:33:41 +01:00
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Collection;
|
2017-06-14 17:12:43 +02:00
|
|
|
|
2017-06-02 12:26:37 +02:00
|
|
|
import org.jivesoftware.smackx.omemo.signal.SignalOmemoKeyUtil;
|
2017-11-28 15:33:41 +01:00
|
|
|
import org.jivesoftware.smackx.omemo.util.OmemoKeyUtil;
|
2017-06-14 17:12:43 +02:00
|
|
|
|
2017-11-28 15:33:41 +01:00
|
|
|
import org.junit.runner.RunWith;
|
|
|
|
import org.junit.runners.Parameterized;
|
2017-06-02 12:26:37 +02:00
|
|
|
import org.whispersystems.libsignal.IdentityKey;
|
|
|
|
import org.whispersystems.libsignal.IdentityKeyPair;
|
2017-11-28 15:33:41 +01:00
|
|
|
import org.whispersystems.libsignal.SessionCipher;
|
2017-06-02 12:26:37 +02:00
|
|
|
import org.whispersystems.libsignal.SignalProtocolAddress;
|
2017-11-28 15:33:41 +01:00
|
|
|
import org.whispersystems.libsignal.ecc.ECPublicKey;
|
2017-06-02 12:26:37 +02:00
|
|
|
import org.whispersystems.libsignal.state.PreKeyBundle;
|
|
|
|
import org.whispersystems.libsignal.state.PreKeyRecord;
|
2017-11-28 15:33:41 +01:00
|
|
|
import org.whispersystems.libsignal.state.SessionRecord;
|
2017-06-02 12:26:37 +02:00
|
|
|
import org.whispersystems.libsignal.state.SignedPreKeyRecord;
|
|
|
|
|
|
|
|
/**
|
2017-11-28 15:33:41 +01:00
|
|
|
* smack-omemo-signal implementation of {@link OmemoKeyUtilTest}.
|
|
|
|
* This class executes tests of its super class with available implementations of {@link OmemoKeyUtil}.
|
|
|
|
* So far this includes {@link SignalOmemoKeyUtil}.
|
2017-06-02 12:26:37 +02:00
|
|
|
*/
|
2017-11-28 15:33:41 +01:00
|
|
|
@RunWith(value = Parameterized.class)
|
|
|
|
public class SignalOmemoKeyUtilTest
|
|
|
|
extends OmemoKeyUtilTest<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord,
|
|
|
|
SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> {
|
2017-06-02 12:26:37 +02:00
|
|
|
|
2017-11-28 15:33:41 +01:00
|
|
|
public SignalOmemoKeyUtilTest(OmemoKeyUtil<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord, SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> keyUtil) {
|
|
|
|
super(keyUtil);
|
2017-06-02 12:26:37 +02:00
|
|
|
}
|
|
|
|
|
2017-11-28 15:33:41 +01:00
|
|
|
@Parameterized.Parameters
|
|
|
|
public static Collection<Object[]> getParameters() throws IOException {
|
|
|
|
return Arrays.asList(new Object[][] {
|
|
|
|
{ new SignalOmemoKeyUtil()}
|
|
|
|
});
|
2017-06-02 12:26:37 +02:00
|
|
|
}
|
|
|
|
}
|