mirror of
https://github.com/iterate-ch/cyberduck.git
synced 2026-05-26 19:10:49 +00:00
Cache list of certificates expensive to retrieve.
This commit is contained in:
@@ -597,14 +597,16 @@ public abstract class BookmarkController extends SheetController implements NSTa
|
||||
this.certificatePopup.setTarget(this.id());
|
||||
final Selector action = Foundation.selector("certificateSelectionChanged:");
|
||||
this.certificatePopup.setAction(action);
|
||||
// List of certificates with private key
|
||||
final List<String> list = new KeychainX509KeyManager(new DisabledCertificateIdentityCallback(), bookmark,
|
||||
CertificateStoreFactory.get()).list();
|
||||
this.addObserver(bookmark -> {
|
||||
certificatePopup.setEnabled(options.certificate);
|
||||
certificatePopup.removeAllItems();
|
||||
certificatePopup.addItemWithTitle(LocaleFactory.localizedString("None"));
|
||||
if(options.certificate) {
|
||||
certificatePopup.menu().addItem(NSMenuItem.separatorItem());
|
||||
for(String certificate : new KeychainX509KeyManager(new DisabledCertificateIdentityCallback(), bookmark,
|
||||
CertificateStoreFactory.get()).list()) {
|
||||
for(String certificate : list) {
|
||||
certificatePopup.addItemWithTitle(certificate);
|
||||
certificatePopup.lastItem().setRepresentedObject(certificate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user