mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 00:18:51 -05:00
Add convenience method to unified keyrings to determine whether a keyring is expired, fix is_revoked for certain usages
This commit is contained in:
parent
4fdf9ab486
commit
80674021b5
@ -105,8 +105,9 @@ public class KeychainContract {
|
||||
|
||||
public static class KeyRings implements BaseColumns, KeysColumns, UserIdsColumns {
|
||||
public static final String MASTER_KEY_ID = KeysColumns.MASTER_KEY_ID;
|
||||
public static final String IS_REVOKED = KeysColumns.IS_REVOKED;
|
||||
public static final String IS_REVOKED = KeychainDatabase.Tables.KEYS + "." + KeysColumns.IS_REVOKED;
|
||||
public static final String VERIFIED = CertsColumns.VERIFIED;
|
||||
public static final String IS_EXPIRED = "is_expired";
|
||||
public static final String HAS_ANY_SECRET = "has_any_secret";
|
||||
public static final String HAS_ENCRYPT = "has_encrypt";
|
||||
public static final String HAS_SIGN = "has_sign";
|
||||
|
@ -271,6 +271,9 @@ public class KeychainProvider extends ContentProvider {
|
||||
"kE." + Keys.KEY_ID + " AS " + KeyRings.HAS_ENCRYPT);
|
||||
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);
|
||||
qb.setProjectionMap(projectionMap);
|
||||
|
||||
// Need this as list so we can search in it
|
||||
|
Loading…
Reference in New Issue
Block a user