Merge pull request #8134 from deepak1556/empty_client_certificate_patch
app: select-client-certificate event callback can accept certificate optionally
This commit is contained in:
commit
2a8b36c761
4 changed files with 102 additions and 31 deletions
|
@ -206,3 +206,18 @@ app.on('ready', function () {
|
|||
}
|
||||
})
|
||||
})
|
||||
|
||||
ipcMain.on('set-client-certificate-option', function (event, skip) {
|
||||
app.once('select-client-certificate', function (event, webContents, url, list, callback) {
|
||||
event.preventDefault()
|
||||
if (skip) {
|
||||
callback()
|
||||
} else {
|
||||
ipcMain.on('client-certificate-response', function (event, certificate) {
|
||||
callback(certificate)
|
||||
})
|
||||
window.webContents.send('select-client-certificate', webContents.id, list)
|
||||
}
|
||||
})
|
||||
event.returnValue = 'done'
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue