diff options
author | mar-v-in <github@rvin.mooo.com> | 2014-08-14 11:21:59 +0200 |
---|---|---|
committer | mar-v-in <github@rvin.mooo.com> | 2014-08-14 11:21:59 +0200 |
commit | b8f7dd5676db460c722276d4c98ca82e9d484562 (patch) | |
tree | 2c1fcb9009e9cadff76c64935604d09378b8b5fe | |
parent | f941431d634b1e008726ce5501ffed55cb6899de (diff) | |
download | open-keychain-b8f7dd5676db460c722276d4c98ca82e9d484562.tar.gz open-keychain-b8f7dd5676db460c722276d4c98ca82e9d484562.tar.bz2 open-keychain-b8f7dd5676db460c722276d4c98ca82e9d484562.zip |
Handle keys without expiry date right
Fixes #765
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java index 2b686b8ff..c914cb5b7 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java @@ -272,8 +272,8 @@ public class KeychainProvider extends ContentProvider { projectionMap.put(KeyRings.HAS_SIGN, "kS." + Keys.KEY_ID + " AS " + KeyRings.HAS_SIGN); projectionMap.put(KeyRings.IS_EXPIRED, - "(" + Tables.KEYS + "." + Keys.EXPIRY + " < " + new Date().getTime() / 1000 + ") AS " - + KeyRings.IS_EXPIRED); + "(" + Tables.KEYS + "." + Keys.EXPIRY + " IS NOT NULL AND " + Tables.KEYS + "." + Keys.EXPIRY + + " < " + new Date().getTime() / 1000 + ") AS " + KeyRings.IS_EXPIRED); qb.setProjectionMap(projectionMap); // Need this as list so we can search in it |