Merge pull request #2254 from hagau/export_pub_ssh_keys
Make predicate names in KeychainProvider consistent and allow export of SSH public keys without associated private key in keyring
This commit is contained in:
@@ -364,7 +364,7 @@ public class SshAuthenticationService extends Service {
|
||||
throws PgpKeyNotFoundException, KeyRepository.NotFoundException {
|
||||
KeyRepository keyRepository = KeyRepository.create(getApplicationContext());
|
||||
long authSubKeyId = keyRepository.getCachedPublicKeyRing(masterKeyId)
|
||||
.getSecretAuthenticationId();
|
||||
.getAuthenticationId();
|
||||
return keyRepository.getCanonicalizedPublicKeyRing(masterKeyId)
|
||||
.getPublicKey(authSubKeyId);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class KeyLoader extends AsyncTaskLoader<List<KeyInfo>> {
|
||||
KeyRings.MASTER_KEY_ID,
|
||||
KeyRings.CREATION,
|
||||
KeyRings.HAS_ENCRYPT,
|
||||
KeyRings.HAS_AUTHENTICATE,
|
||||
KeyRings.HAS_AUTHENTICATE_SECRET,
|
||||
KeyRings.HAS_ANY_SECRET,
|
||||
KeyRings.VERIFIED,
|
||||
KeyRings.NAME,
|
||||
|
||||
@@ -81,7 +81,7 @@ class RemoteSelectAuthenticationKeyPresenter implements LoaderCallbacks<List<Key
|
||||
|
||||
@Override
|
||||
public Loader<List<KeyInfo>> onCreateLoader(int id, Bundle args) {
|
||||
String selection = KeyRings.HAS_ANY_SECRET + " != 0 AND " + KeyRings.HAS_AUTHENTICATE + " != 0";
|
||||
String selection = KeyRings.HAS_AUTHENTICATE_SECRET + " != 0";
|
||||
KeySelector keySelector = KeySelector.create(
|
||||
KeyRings.buildUnifiedKeyRingsUri(), selection);
|
||||
return new KeyLoader(context, context.getContentResolver(), keySelector);
|
||||
|
||||
Reference in New Issue
Block a user