Use specialized query exclusively to select authentication key

This commit is contained in:
Vincent Breitmoser
2018-10-01 21:36:01 +02:00
parent 5d28cef81a
commit 400db49e75
10 changed files with 104 additions and 84 deletions

View File

@@ -103,7 +103,7 @@ public class AuthenticationOperation extends BaseOperation<AuthenticationParcel>
Long authSubKeyId = data.getAuthenticationSubKeyId();
if (authSubKeyId == null) {
try { // Get the key id of the authentication key belonging to the master key id
authSubKeyId = mKeyRepository.getSecretAuthenticationId(authMasterKeyId);
authSubKeyId = mKeyRepository.getEffectiveAuthenticationKeyId(authMasterKeyId);
} catch (NotFoundException e) {
log.add(LogType.MSG_AUTH_ERROR_KEY_AUTH, indent);
return new AuthenticationResult(AuthenticationResult.RESULT_ERROR, log);