Add initial support for choosing to still connect when the server uses a self-signed cert and verify_vertificates is turned on
This commit is contained in:
parent
3f70567d56
commit
c005fc7cae
7 changed files with 81 additions and 22 deletions
|
@ -1,6 +1,7 @@
|
|||
import { socketAction } from 'state/actions';
|
||||
import { setConnected } from 'state/app';
|
||||
import { broadcast, inform, print, addMessage, addMessages } from 'state/messages';
|
||||
import { reconnect } from 'state/servers';
|
||||
import { select } from 'state/tab';
|
||||
import { normalizeChannel } from 'util';
|
||||
|
||||
|
@ -98,6 +99,15 @@ export default function handleSocket({ socket, store: { dispatch, getState } })
|
|||
dispatch(addMessage(message, tab.server, tab.name));
|
||||
},
|
||||
|
||||
connection_update({ server, errorType }) {
|
||||
if (errorType === 'verify' &&
|
||||
confirm('The server is using a self-signed certificate, continue anyway?')) {
|
||||
dispatch(reconnect(server, {
|
||||
skipVerify: true
|
||||
}));
|
||||
}
|
||||
},
|
||||
|
||||
_connected(connected) {
|
||||
dispatch(setConnected(connected));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue