From 99bf77dd8435932fcd039964fec3f00d4d2544c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Fri, 19 Sep 2014 11:46:21 +0200 Subject: Remove certificate validation code from ViewCertActivity, they are already validated by import --- .../keychain/ui/ViewCertActivity.java | 26 ---------------------- .../src/main/res/layout/view_cert_activity.xml | 20 ----------------- OpenKeychain/src/main/res/values/strings.xml | 6 ++--- 3 files changed, 3 insertions(+), 49 deletions(-) (limited to 'OpenKeychain/src') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java index a45d1476c..f828d0922 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java @@ -85,7 +85,6 @@ public class ViewCertActivity extends ActionBarActivity setContentView(R.layout.view_cert_activity); - mStatus = (TextView) findViewById(R.id.status); mSigneeKey = (TextView) findViewById(R.id.signee_key); mSigneeUid = (TextView) findViewById(R.id.signee_uid); mAlgorithm = (TextView) findViewById(R.id.algorithm); @@ -141,31 +140,6 @@ public class ViewCertActivity extends ActionBarActivity } WrappedSignature sig = WrappedSignature.fromBytes(data.getBlob(INDEX_DATA)); - try { - ProviderHelper providerHelper = new ProviderHelper(this); - - CanonicalizedPublicKeyRing signeeRing = - providerHelper.getCanonicalizedPublicKeyRing(data.getLong(INDEX_MASTER_KEY_ID)); - CanonicalizedPublicKeyRing signerRing = - providerHelper.getCanonicalizedPublicKeyRing(sig.getKeyId()); - - try { - sig.init(signerRing.getPublicKey()); - if (sig.verifySignature(signeeRing.getPublicKey(), signeeUid)) { - mStatus.setText(R.string.cert_verify_ok); - mStatus.setTextColor(getResources().getColor(R.color.android_green_light)); - } else { - mStatus.setText(R.string.cert_verify_failed); - mStatus.setTextColor(getResources().getColor(R.color.alert)); - } - } catch (PgpGeneralException e) { - mStatus.setText(R.string.cert_verify_error); - mStatus.setTextColor(getResources().getColor(R.color.alert)); - } - } catch (ProviderHelper.NotFoundException e) { - mStatus.setText(R.string.cert_verify_unavailable); - mStatus.setTextColor(getResources().getColor(R.color.black)); - } String algorithmStr = KeyFormattingUtils.getAlgorithmInfo(this, sig.getKeyAlgorithm(), null, null); mAlgorithm.setText(algorithmStr); diff --git a/OpenKeychain/src/main/res/layout/view_cert_activity.xml b/OpenKeychain/src/main/res/layout/view_cert_activity.xml index 66c635599..bf65fe1cd 100644 --- a/OpenKeychain/src/main/res/layout/view_cert_activity.xml +++ b/OpenKeychain/src/main/res/layout/view_cert_activity.xml @@ -13,26 +13,6 @@ android:paddingLeft="16dp" android:paddingRight="16dp"> - - - - - - - "Exception deleting secret cache file" - "Editing of nfc keys is not (yet) supported!" + "Editing of NFC keys is not (yet) supported!" "Cannot edit keyring with stripped master key!" "Key not found!" @@ -789,7 +789,7 @@ "No encrypted data found in stream!" "No encrypted data with known secret key found in stream!" "Encountered PGP Exception during operation!" - "Integrity check ok!" + "Integrity check OK!" "Only metadata was requested, skipping decryption" "OK" "Using passphrase from cache" @@ -847,7 +847,7 @@ "Identity" "<unknown>" "No certificates for this key" - "Only self-certificates and certificates created with your keys are displayed here." + "Only validated self-certificates and validated certificates created with your keys are displayed here." "Identities to certify" "Revocation Reason" "Verification Status" -- cgit v1.2.3