From c7b0f77c9baa89fc617cef72eb1028768bf75832 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 24 Sep 2014 14:14:16 +0200 Subject: [PATCH] allow 1024 bit key signatures --- .../java/org/sufficientlysecure/keychain/ui/NfcActivity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java index cd2d9cb85..922ff1aa5 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java @@ -369,9 +369,8 @@ public class NfcActivity extends ActionBarActivity { } // Make sure the signature we received is actually the expected number of bytes long! - // TODO this is only right for RSA 2048 bit keys. Do we support anything else right now? - if (signature.length() != 512) { - toast("Bad signature length! Expected 256 bytes, got " + signature.length() / 2); + if (signature.length() != 256 && signature.length() != 512) { + toast("Bad signature length! Expected 128 or 256 bytes, got " + signature.length() / 2); return null; }