minor stuff

This commit is contained in:
Vincent Breitmoser 2015-01-03 23:01:57 +01:00
parent 47ace7cea3
commit 07251f35ae
3 changed files with 6 additions and 3 deletions

View File

@ -50,9 +50,6 @@ public class CertifyOperation extends BaseOperation {
CanonicalizedSecretKey certificationKey; CanonicalizedSecretKey certificationKey;
try { try {
// certification is always with the master key id, so use that one
String passphrase = getCachedPassphrase(parcel.mMasterKeyId, parcel.mMasterKeyId);
log.add(LogType.MSG_CRT_MASTER_FETCH, 1); log.add(LogType.MSG_CRT_MASTER_FETCH, 1);
CanonicalizedSecretKeyRing secretKeyRing = CanonicalizedSecretKeyRing secretKeyRing =
mProviderHelper.getCanonicalizedSecretKeyRing(parcel.mMasterKeyId); mProviderHelper.getCanonicalizedSecretKeyRing(parcel.mMasterKeyId);
@ -62,6 +59,10 @@ public class CertifyOperation extends BaseOperation {
log.add(LogType.MSG_CRT_ERROR_DIVERT, 2); log.add(LogType.MSG_CRT_ERROR_DIVERT, 2);
return new CertifyResult(CertifyResult.RESULT_ERROR, log); return new CertifyResult(CertifyResult.RESULT_ERROR, log);
} }
// certification is always with the master key id, so use that one
String passphrase = getCachedPassphrase(parcel.mMasterKeyId, parcel.mMasterKeyId);
if (!certificationKey.unlock(passphrase)) { if (!certificationKey.unlock(passphrase)) {
log.add(LogType.MSG_CRT_ERROR_UNLOCK, 2); log.add(LogType.MSG_CRT_ERROR_UNLOCK, 2);
return new CertifyResult(CertifyResult.RESULT_ERROR, log); return new CertifyResult(CertifyResult.RESULT_ERROR, log);

View File

@ -307,6 +307,7 @@ public class KeychainContract {
public static final String USER_ID = UserIdsColumns.USER_ID; public static final String USER_ID = UserIdsColumns.USER_ID;
public static final String SIGNER_UID = "signer_user_id"; public static final String SIGNER_UID = "signer_user_id";
public static final int UNVERIFIED = 0;
public static final int VERIFIED_SECRET = 1; public static final int VERIFIED_SECRET = 1;
public static final int VERIFIED_SELF = 2; public static final int VERIFIED_SELF = 2;

View File

@ -543,6 +543,7 @@ public class ProviderHelper {
UserIdItem item = uids.get(userIdRank); UserIdItem item = uids.get(userIdRank);
operations.add(buildUserIdOperations(masterKeyId, item, userIdRank)); operations.add(buildUserIdOperations(masterKeyId, item, userIdRank));
if (item.selfCert != null) { if (item.selfCert != null) {
// TODO get rid of "self verified" status? this cannot even happen anymore!
operations.add(buildCertOperations(masterKeyId, userIdRank, item.selfCert, operations.add(buildCertOperations(masterKeyId, userIdRank, item.selfCert,
selfCertsAreTrusted ? Certs.VERIFIED_SECRET : Certs.VERIFIED_SELF)); selfCertsAreTrusted ? Certs.VERIFIED_SECRET : Certs.VERIFIED_SELF));
} }