disable opportunistic encryption mode
This commit is contained in:
parent
96c8396422
commit
9ab04c0931
1 changed files with 3 additions and 1 deletions
|
@ -144,7 +144,7 @@ public class PgpMessageBuilder extends MessageBuilder {
|
|||
|
||||
if(!isDraft()) {
|
||||
pgpApiIntent.putExtra(OpenPgpApi.EXTRA_USER_IDS, cryptoStatus.getRecipientAddresses());
|
||||
pgpApiIntent.putExtra(OpenPgpApi.EXTRA_OPPORTUNISTIC_ENCRYPTION, cryptoStatus.isEncryptionOpportunistic());
|
||||
// pgpApiIntent.putExtra(OpenPgpApi.EXTRA_ENCRYPT_OPPORTUNISTIC, cryptoStatus.isEncryptionOpportunistic());
|
||||
}
|
||||
} else {
|
||||
pgpApiIntent = new Intent(isPgpInlineMode ? OpenPgpApi.ACTION_SIGN : OpenPgpApi.ACTION_DETACHED_SIGN);
|
||||
|
@ -202,6 +202,7 @@ public class PgpMessageBuilder extends MessageBuilder {
|
|||
if (error == null) {
|
||||
throw new MessagingException("internal openpgp api error");
|
||||
}
|
||||
/*
|
||||
boolean isOpportunisticError = error.getErrorId() == OpenPgpError.OPPORTUNISTIC_MISSING_KEYS;
|
||||
if (isOpportunisticError) {
|
||||
if (!cryptoStatus.isEncryptionOpportunistic()) {
|
||||
|
@ -211,6 +212,7 @@ public class PgpMessageBuilder extends MessageBuilder {
|
|||
Timber.d("Skipping encryption due to opportunistic mode");
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
throw new MessagingException(error.getMessage());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue