@Test public void multipartSignedOpenPgp_withOpenPgpApi__withSignOnlyDisabled__shouldReturnNothing() throws Exception { setUpWithOpenPgpApi(); Message message = messageFromBody( multipart("signed", "protocol=\"application/pgp-signature\"", bodypart("text/plain", "content"), bodypart("application/pgp-signature", "content") ) ); MessageCryptoCallback messageCryptoCallback = mock(MessageCryptoCallback.class); messageCryptoHelper.asyncStartOrResumeProcessingMessage(message, messageCryptoCallback, null, null, false); assertReturnsWithNoCryptoAnnotations(messageCryptoCallback); }
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();  }