only show the picker if there is more than 1 cert (#1354)
This commit is contained in:
14
src/main.js
14
src/main.js
@@ -332,12 +332,16 @@ function handleAppBeforeQuit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectCertificate(event, webContents, url, list, callback) {
|
function handleSelectCertificate(event, webContents, url, list, callback) {
|
||||||
event.preventDefault(); // prevent the app from getting the first certificate available
|
if (list.length > 1) {
|
||||||
// store callback so it can be called with selected certificate
|
event.preventDefault(); // prevent the app from getting the first certificate available
|
||||||
certificateRequests.set(url, callback);
|
// store callback so it can be called with selected certificate
|
||||||
|
certificateRequests.set(url, callback);
|
||||||
|
|
||||||
// open modal for selecting certificate
|
// open modal for selecting certificate
|
||||||
mainWindow.webContents.send('select-user-certificate', url, list);
|
mainWindow.webContents.send('select-user-certificate', url, list);
|
||||||
|
} else {
|
||||||
|
log.info(`There were ${list.length} candidate certificates. Skipping certificate selection`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectedCertificate(event, server, cert) {
|
function handleSelectedCertificate(event, server, cert) {
|
||||||
|
Reference in New Issue
Block a user