@Test public void multipartEncryptedOpenPgp_withSMimeApi__shouldReturnEncryptedNoProvider() throws Exception { setUpWithSMimeApi(); Body encryptedBody = spy(new TextBody("encrypted data")); Message message = messageFromBody( multipart("encrypted", "protocol=\"application/pgp-encrypted\"", bodypart("application/pgp-encrypted", "content"), bodypart("application/octet-stream", encryptedBody) ) ); message.setFrom(Address.parse("Test <test@example.org>")[0]); MessageCryptoCallback messageCryptoCallback = mock(MessageCryptoCallback.class); messageCryptoHelper.asyncStartOrResumeProcessingMessage(message, messageCryptoCallback, null, null, false); assertPartAnnotationHasState(message, messageCryptoCallback, CryptoError.OPENPGP_ENCRYPTED_NO_PROVIDER, null, null, null, null, null, null, null); }
public void asyncStartOrResumeProcessingMessage(Message message, MessageCryptoCallback callback, OpenPgpDecryptionResult cachedOpenPgpDecryptionResult, SMimeDecryptionResult cachedSMimeDecryptionResult, boolean processSignedOnly) { if (this.currentMessage != null) { reattachCallback(message, callback); return; } this.messageAnnotations = new MessageCryptoAnnotations(); this.state = State.START; this.currentMessage = message; this.cachedOpenPgpDecryptionResult = cachedOpenPgpDecryptionResult; this.cachedSMimeDecryptionResult = cachedSMimeDecryptionResult; this.callback = callback; this.processSignedOnly = processSignedOnly; nextStep(); }
MessageCryptoHelper { public void asyncStartOrResumeProcessingMessage(Message message, MessageCryptoCallback callback, OpenPgpDecryptionResult cachedOpenPgpDecryptionResult, SMimeDecryptionResult cachedSMimeDecryptionResult, boolean processSignedOnly) { if (this.currentMessage != null) { reattachCallback(message, callback); return; } this.messageAnnotations = new MessageCryptoAnnotations(); this.state = State.START; this.currentMessage = message; this.cachedOpenPgpDecryptionResult = cachedOpenPgpDecryptionResult; this.cachedSMimeDecryptionResult = cachedSMimeDecryptionResult; this.callback = callback; this.processSignedOnly = processSignedOnly; nextStep(); } }
MessageCryptoHelper { public void asyncStartOrResumeProcessingMessage(Message message, MessageCryptoCallback callback, OpenPgpDecryptionResult cachedOpenPgpDecryptionResult, SMimeDecryptionResult cachedSMimeDecryptionResult, boolean processSignedOnly) { if (this.currentMessage != null) { reattachCallback(message, callback); return; } this.messageAnnotations = new MessageCryptoAnnotations(); this.state = State.START; this.currentMessage = message; this.cachedOpenPgpDecryptionResult = cachedOpenPgpDecryptionResult; this.cachedSMimeDecryptionResult = cachedSMimeDecryptionResult; this.callback = callback; this.processSignedOnly = processSignedOnly; nextStep(); } MessageCryptoHelper(Context context, OpenPgpApiFactory openPgpApiFactory, SMimeApiFactory sMimeApiFactory,
            AutocryptOperations autocryptOperations); }
MessageCryptoHelper { public void asyncStartOrResumeProcessingMessage(Message message, MessageCryptoCallback callback, OpenPgpDecryptionResult cachedOpenPgpDecryptionResult, SMimeDecryptionResult cachedSMimeDecryptionResult, boolean processSignedOnly) { if (this.currentMessage != null) { reattachCallback(message, callback); return; } this.messageAnnotations = new MessageCryptoAnnotations(); this.state = State.START; this.currentMessage = message; this.cachedOpenPgpDecryptionResult = cachedOpenPgpDecryptionResult; this.cachedSMimeDecryptionResult = cachedSMimeDecryptionResult; this.callback = callback; this.processSignedOnly = processSignedOnly; nextStep(); } MessageCryptoHelper(Context context, OpenPgpApiFactory openPgpApiFactory, SMimeApiFactory sMimeApiFactory,
            AutocryptOperations autocryptOperations); boolean isConfiguredForOutdatedCryptoProvider(); boolean isConfiguredForOutdatedOpenPgpProvider(); boolean isConfiguredForOutdatedSMimeProvider(); void asyncStartOrResumeProcessingMessage(Message message, MessageCryptoCallback callback,
            OpenPgpDecryptionResult cachedOpenPgpDecryptionResult, SMimeDecryptionResult cachedSMimeDecryptionResult, boolean processSignedOnly); void cancelIfRunning(); void onActivityResult(int requestCode, int resultCode, Intent data); void detachCallback(); }
MessageCryptoHelper { public void asyncStartOrResumeProcessingMessage(Message message, MessageCryptoCallback callback, OpenPgpDecryptionResult cachedOpenPgpDecryptionResult, SMimeDecryptionResult cachedSMimeDecryptionResult, boolean processSignedOnly) { if (this.currentMessage != null) { reattachCallback(message, callback); return; } this.messageAnnotations = new MessageCryptoAnnotations(); this.state = State.START; this.currentMessage = message; this.cachedOpenPgpDecryptionResult = cachedOpenPgpDecryptionResult; this.cachedSMimeDecryptionResult = cachedSMimeDecryptionResult; this.callback = callback; this.processSignedOnly = processSignedOnly; nextStep(); } MessageCryptoHelper(Context context, OpenPgpApiFactory openPgpApiFactory, SMimeApiFactory sMimeApiFactory,
            AutocryptOperations autocryptOperations); boolean isConfiguredForOutdatedCryptoProvider(); boolean isConfiguredForOutdatedOpenPgpProvider(); boolean isConfiguredForOutdatedSMimeProvider(); void asyncStartOrResumeProcessingMessage(Message message, MessageCryptoCallback callback,
            OpenPgpDecryptionResult cachedOpenPgpDecryptionResult, SMimeDecryptionResult cachedSMimeDecryptionResult, boolean processSignedOnly); void cancelIfRunning(); void onActivityResult(int requestCode, int resultCode, Intent data); void detachCallback();  }