mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-01-12 05:58:07 -05:00
add HAS_CERTIFY (not sure why it's missing)
This commit is contained in:
parent
ef2449917e
commit
9fab740aad
@ -111,6 +111,7 @@ public class KeychainContract {
|
|||||||
public static final String HAS_ANY_SECRET = "has_any_secret";
|
public static final String HAS_ANY_SECRET = "has_any_secret";
|
||||||
public static final String HAS_ENCRYPT = "has_encrypt";
|
public static final String HAS_ENCRYPT = "has_encrypt";
|
||||||
public static final String HAS_SIGN = "has_sign";
|
public static final String HAS_SIGN = "has_sign";
|
||||||
|
public static final String HAS_CERTIFY = "has_certify";
|
||||||
public static final String PUBKEY_DATA = "pubkey_data";
|
public static final String PUBKEY_DATA = "pubkey_data";
|
||||||
public static final String PRIVKEY_DATA = "privkey_data";
|
public static final String PRIVKEY_DATA = "privkey_data";
|
||||||
|
|
||||||
|
@ -271,6 +271,8 @@ public class KeychainProvider extends ContentProvider {
|
|||||||
"kE." + Keys.KEY_ID + " AS " + KeyRings.HAS_ENCRYPT);
|
"kE." + Keys.KEY_ID + " AS " + KeyRings.HAS_ENCRYPT);
|
||||||
projectionMap.put(KeyRings.HAS_SIGN,
|
projectionMap.put(KeyRings.HAS_SIGN,
|
||||||
"kS." + Keys.KEY_ID + " AS " + KeyRings.HAS_SIGN);
|
"kS." + Keys.KEY_ID + " AS " + KeyRings.HAS_SIGN);
|
||||||
|
projectionMap.put(KeyRings.HAS_CERTIFY,
|
||||||
|
"kC." + Keys.KEY_ID + " AS " + KeyRings.HAS_SIGN);
|
||||||
projectionMap.put(KeyRings.IS_EXPIRED,
|
projectionMap.put(KeyRings.IS_EXPIRED,
|
||||||
"(" + Tables.KEYS + "." + Keys.EXPIRY + " IS NOT NULL AND " + Tables.KEYS + "." + Keys.EXPIRY
|
"(" + Tables.KEYS + "." + Keys.EXPIRY + " IS NOT NULL AND " + Tables.KEYS + "." + Keys.EXPIRY
|
||||||
+ " < " + new Date().getTime() / 1000 + ") AS " + KeyRings.IS_EXPIRED);
|
+ " < " + new Date().getTime() / 1000 + ") AS " + KeyRings.IS_EXPIRED);
|
||||||
@ -324,6 +326,15 @@ public class KeychainProvider extends ContentProvider {
|
|||||||
+ " AND ( kS." + Keys.EXPIRY + " IS NULL OR kS." + Keys.EXPIRY
|
+ " AND ( kS." + Keys.EXPIRY + " IS NULL OR kS." + Keys.EXPIRY
|
||||||
+ " >= " + new Date().getTime() / 1000 + " )"
|
+ " >= " + new Date().getTime() / 1000 + " )"
|
||||||
+ ")" : "")
|
+ ")" : "")
|
||||||
|
+ (plist.contains(KeyRings.HAS_CERTIFY) ?
|
||||||
|
" LEFT JOIN " + Tables.KEYS + " AS kC ON ("
|
||||||
|
+"kC." + Keys.MASTER_KEY_ID
|
||||||
|
+ " = " + Tables.KEYS + "." + Keys.MASTER_KEY_ID
|
||||||
|
+ " AND kC." + Keys.IS_REVOKED + " = 0"
|
||||||
|
+ " AND kC." + Keys.CAN_CERTIFY + " = 1"
|
||||||
|
+ " AND ( kC." + Keys.EXPIRY + " IS NULL OR kC." + Keys.EXPIRY
|
||||||
|
+ " >= " + new Date().getTime() / 1000 + " )"
|
||||||
|
+ ")" : "")
|
||||||
);
|
);
|
||||||
qb.appendWhere(Tables.KEYS + "." + Keys.RANK + " = 0");
|
qb.appendWhere(Tables.KEYS + "." + Keys.RANK + " = 0");
|
||||||
// in case there are multiple verifying certificates
|
// in case there are multiple verifying certificates
|
||||||
|
Loading…
Reference in New Issue
Block a user