Skip to content

Commit

Permalink
feat(core): option to allow untrusted SSL connections
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Apr 10, 2022
1 parent 40828cb commit 6cc098c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/main/ipc-handlers/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export default connections => {
key: conn.key ? fs.readFileSync(conn.key) : null,
cert: conn.cert ? fs.readFileSync(conn.cert) : null,
ca: conn.ca ? fs.readFileSync(conn.ca) : null,
ciphers: conn.ciphers
ciphers: conn.ciphers,
rejectUnauthorized: !conn.untrustedConnection
};
}

Expand Down Expand Up @@ -84,7 +85,8 @@ export default connections => {
key: conn.key ? fs.readFileSync(conn.key) : null,
cert: conn.cert ? fs.readFileSync(conn.cert) : null,
ca: conn.ca ? fs.readFileSync(conn.ca) : null,
ciphers: conn.ciphers
ciphers: conn.ciphers,
rejectUnauthorized: !conn.untrustedConnection
};
}

Expand Down
9 changes: 9 additions & 0 deletions src/renderer/components/WorkspaceAddConnectionPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@
>
</div>
</div>
<div class="form-group columns">
<div class="column col-4 col-sm-12" />
<div class="column col-8 col-sm-12">
<label class="form-checkbox form-inline">
<input v-model="connection.untrustedConnection" type="checkbox"><i class="form-icon" /> {{ $t('message.untrustedConnection') }}
</label>
</div>
</div>
</fieldset>
</form>
</div>
Expand Down Expand Up @@ -420,6 +428,7 @@ export default {
key: '',
ca: '',
ciphers: '',
untrustedConnection: false,
ssh: false,
sshHost: '',
sshUser: '',
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/components/WorkspaceEditConnectionPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@
>
</div>
</div>
<div class="form-group columns">
<div class="column col-4 col-sm-12" />
<div class="column col-8 col-sm-12">
<label class="form-checkbox form-inline">
<input v-model="localConnection.untrustedConnection" type="checkbox"><i class="form-icon" /> {{ $t('message.untrustedConnection') }}
</label>
</div>
</div>
</fieldset>
</form>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/i18n/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ module.exports = {
ourputFormat: 'Output format',
singleFile: 'Single {ext} file',
zipCompressedFile: 'ZIP compressed {ext} file',
disableBlur: 'Disable blur'
disableBlur: 'Disable blur',
untrustedConnection: 'Untrusted connection'
},
faker: {
address: 'Address',
Expand Down

0 comments on commit 6cc098c

Please sign in to comment.