Fix mAllowedKeyIds

This commit is contained in:
Dominik Schürmann 2014-09-03 18:05:30 +02:00
parent 05e9eefda9
commit 46d45ebd67

View File

@ -286,12 +286,12 @@ public class PgpDecryptVerify {
// allow only specific keys for decryption? // allow only specific keys for decryption?
if (mAllowedKeyIds != null) { if (mAllowedKeyIds != null) {
long masterKeyId = secretEncryptionKey.getRing().getMasterKeyId();
Log.d(Constants.TAG, "encData.getKeyID(): " + subKeyId); Log.d(Constants.TAG, "encData.getKeyID(): " + subKeyId);
Log.d(Constants.TAG, "mAllowedKeyIds: " + mAllowedKeyIds); Log.d(Constants.TAG, "mAllowedKeyIds: " + mAllowedKeyIds);
Log.d(Constants.TAG, "masterKeyId: " Log.d(Constants.TAG, "masterKeyId: " + masterKeyId);
+ secretEncryptionKey.getRing().getMasterKeyId());
if (!mAllowedKeyIds.contains(subKeyId)) { if (!mAllowedKeyIds.contains(masterKeyId)) {
// this key is in our db, but NOT allowed! // this key is in our db, but NOT allowed!
// continue with the next packet in the while loop // continue with the next packet in the while loop
continue; continue;