Class OXInstantMessagingIntegrationTest


@SpecificationReference(document="XEP-0374", version="0.2.0") public class OXInstantMessagingIntegrationTest extends AbstractOpenPgpIntegrationTest
  • Constructor Details

    • OXInstantMessagingIntegrationTest

      public OXInstantMessagingIntegrationTest(SmackIntegrationTestEnvironment environment) throws org.jivesoftware.smack.XMPPException.XMPPErrorException, InterruptedException, org.jivesoftware.smack.SmackException.NotConnectedException, TestNotPossibleException, org.jivesoftware.smack.SmackException.NoResponseException
      This integration test tests basic OX message exchange. In this scenario, Alice and Bob are strangers, as they do not have subscribed to one another. Alice (conOne) creates keys and publishes them to the server. Bob (conTwo) creates keys and publishes them to the server. Alice then manually fetches Bobs metadata node and all announced keys. Alice trusts Bobs keys and vice versa (even though Bob does not have copies of Alice' keys yet). She proceeds to create an OX encrypted message, which is encrypted to Bob and herself and signed by her. She sends the message. Bob receives the message, which - due to missing keys - triggers him to update Alice' keys. After the update Bob proceeds to decrypt and verify the message. After the test, the keys are deleted from local storage and from PubSub.
      Parameters:
      environment - test environment
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      InterruptedException - if the calling thread was interrupted.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      TestNotPossibleException - if the test is not possible due to lacking server support for PEP.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
  • Method Details