Package org.jivesoftware.smackx.ox
Class OXSecretKeyBackupIntegrationTest
java.lang.Object
org.igniterealtime.smack.inttest.AbstractSmackIntTest
org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
org.jivesoftware.smackx.ox.AbstractOpenPgpIntegrationTest
org.jivesoftware.smackx.ox.OXSecretKeyBackupIntegrationTest
@SpecificationReference(document="XEP-0374",
                        version="0.2.0")
public class OXSecretKeyBackupIntegrationTest
extends AbstractOpenPgpIntegrationTest
- 
Nested Class Summary
Nested classes/interfaces inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
AbstractSmackIntTest.Condition - 
Field Summary
Fields inherited from class org.jivesoftware.smackx.ox.AbstractOpenPgpIntegrationTest
alice, aliceConnection, alicePepManager, bob, bobConnection, bobPepManager, chloe, chloeConnection, chloePepManagerFields inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
connection, connections, conOne, conThree, conTwoFields inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
INSECURE_RANDOM, LOGGER, sinttestConfiguration, testRunId, timeout - 
Constructor Summary
ConstructorsConstructorDescriptionThis integration test tests the basic secret key backup and restore functionality as described in XEP-0373 §5. - 
Method Summary
Methods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
performActionAndWaitForPresenceMethods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
assertResult, assertResult, assertResult, assertResult, createNewTempFile, getHttpUrlConnectionFor, performActionAndWaitUntilStanzaReceived, waitUntilTrue 
- 
Constructor Details
- 
OXSecretKeyBackupIntegrationTest
public OXSecretKeyBackupIntegrationTest(SmackIntegrationTestEnvironment environment) throws org.jivesoftware.smack.XMPPException.XMPPErrorException, TestNotPossibleException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException This integration test tests the basic secret key backup and restore functionality as described in XEP-0373 §5. In order to simulate two different devices, we are using twoFileBasedOpenPgpStoreimplementations which point to different directories. First, Alice generates a fresh OpenPGP key pair. She then creates a backup of the key in her private PEP node. Now theOpenPgpStoreimplementation is replaced by another instance to simulate a different device. Then the secret key backup is restored from PubSub and the imported secret key is compared to the one in the original store. Afterwards the private PEP node is deleted from PubSub and the storage directories are emptied.- Parameters:
 environment- TODO javadoc me please- Throws:
 org.jivesoftware.smack.XMPPException.XMPPErrorException- if there was an XMPP error returned.TestNotPossibleException- if the test is not possible.org.jivesoftware.smack.SmackException.NotConnectedException- if the XMPP connection is not connected.InterruptedException- if the calling thread was interrupted.org.jivesoftware.smack.SmackException.NoResponseException- if there was no response from the remote entity.- See Also:
 
 
 - 
 - 
Method Details
- 
cleanStore
- Throws:
 IOException
 - 
test
@SmackIntegrationTest(section="5") public void test() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException, IOException, InterruptedException, org.jivesoftware.smackx.pubsub.PubSubException.NotALeafNodeException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.SmackException.NotConnectedException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotLoggedInException, org.jivesoftware.smack.SmackException.FeatureNotSupportedException, org.jivesoftware.smackx.ox.exception.MissingUserIdOnKeyException, org.jivesoftware.smackx.ox.exception.NoBackupFoundException, org.jivesoftware.smackx.ox.exception.InvalidBackupCodeException, org.bouncycastle.openpgp.PGPException, org.jivesoftware.smackx.ox.exception.MissingOpenPgpKeyException- Throws:
 InvalidAlgorithmParameterExceptionNoSuchAlgorithmExceptionNoSuchProviderExceptionIOExceptionInterruptedExceptionorg.jivesoftware.smackx.pubsub.PubSubException.NotALeafNodeExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionorg.jivesoftware.smack.SmackException.FeatureNotSupportedExceptionorg.jivesoftware.smackx.ox.exception.MissingUserIdOnKeyExceptionorg.jivesoftware.smackx.ox.exception.NoBackupFoundExceptionorg.jivesoftware.smackx.ox.exception.InvalidBackupCodeExceptionorg.bouncycastle.openpgp.PGPExceptionorg.jivesoftware.smackx.ox.exception.MissingOpenPgpKeyException
 
 -