aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2014-07-11 15:42:02 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2014-07-11 15:42:02 +0200
commit20b28b52073df0dacff96f5ade26e5dc079ed248 (patch)
treea3d6a0c57897389cc053ac3a60f7f41a9080ee9e
parent46ef001b827cfa18a719003f2e59d9429432475f (diff)
downloadopen-keychain-20b28b52073df0dacff96f5ade26e5dc079ed248.tar.gz
open-keychain-20b28b52073df0dacff96f5ade26e5dc079ed248.tar.bz2
open-keychain-20b28b52073df0dacff96f5ade26e5dc079ed248.zip
modifyKey: proper expiry check during SubkeyAdd
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java
index e68c871ed..8dbc2208c 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java
@@ -333,7 +333,7 @@ public class PgpKeyOperation {
// 2b. Add revocations for revoked user ids
for (String userId : saveParcel.mRevokeUserIds) {
log.add(LogLevel.INFO, LogType.MSG_MF_UID_REVOKE, indent);
- // a duplicate revocatin will be removed during canonicalization, so no need to
+ // a duplicate revocation will be removed during canonicalization, so no need to
// take care of that here.
PGPSignature cert = generateRevocationSignature(masterPrivateKey,
masterPublicKey, userId);
@@ -523,7 +523,7 @@ public class PgpKeyOperation {
for (SaveKeyringParcel.SubkeyAdd add : saveParcel.mAddSubKeys) {
try {
- if (add.mExpiry != null && new Date(add.mExpiry).before(new Date())) {
+ if (add.mExpiry != null && new Date(add.mExpiry*1000).before(new Date())) {
log.add(LogLevel.ERROR, LogType.MSG_MF_SUBKEY_PAST_EXPIRY, indent +1);
return null;
}