mirror of
https://github.com/element-hq/element-desktop
synced 2025-03-15 00:47:47 +01:00
Fixed linter
This commit is contained in:
parent
b2fc1f114a
commit
2a56e870da
@ -986,38 +986,38 @@ app.on('activate', () => {
|
||||
});
|
||||
|
||||
app.on('select-client-certificate', (event, webContents, url, list, callback) => {
|
||||
console.log('select-client-certificate', url, list)
|
||||
console.log('select-client-certificate', url, list);
|
||||
|
||||
const clientCertPickFirst = vectorConfig['clientCertPickFirst']
|
||||
const clientCertFingerprint = vectorConfig['clientCertFingerprint']
|
||||
const clientCertPickFirst = vectorConfig['clientCertPickFirst'];
|
||||
const clientCertFingerprint = vectorConfig['clientCertFingerprint'];
|
||||
|
||||
if (clientCertFingerprint) {
|
||||
let found = false
|
||||
let found = false;
|
||||
for (const cert of list) {
|
||||
if (cert.fingerprint === clientCertFingerprint) {
|
||||
console.log('Selected client certificate ' + cert.fingerprint)
|
||||
event.preventDefault()
|
||||
callback(cert)
|
||||
found = true
|
||||
break
|
||||
console.log('Selected client certificate ' + cert.fingerprint);
|
||||
event.preventDefault();
|
||||
callback(cert);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(found === false) {
|
||||
console.log('No certificate found')
|
||||
console.log('No certificate found');
|
||||
}
|
||||
} else if (clientCertPickFirst === true && list.length > 0) {
|
||||
console.log('Selected first available client certificate ' + list[0].fingerprint)
|
||||
event.preventDefault()
|
||||
callback(list[0])
|
||||
console.log('Selected first available client certificate ' + list[0].fingerprint);
|
||||
event.preventDefault();
|
||||
callback(list[0]);
|
||||
} else {
|
||||
console.log('No client certificate available')
|
||||
console.log('No client certificate available');
|
||||
}
|
||||
})
|
||||
|
||||
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
|
||||
// Ensure we don't trust certificate causing a verification error
|
||||
console.log('Untrusted server certificate')
|
||||
callback(false)
|
||||
console.log('Untrusted server certificate');
|
||||
callback(false);
|
||||
})
|
||||
|
||||
function beforeQuit() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user