Skip to content

enable adding self-signed certificates on Windows - #2581

Merged
niik merged 3 commits into
masterfrom
unlock-adding-self-signed-certificate
Sep 6, 2017
Merged

niik merged 3 commits into
masterfrom
unlock-adding-self-signed-certificate

Conversation

@shiftkey

Copy link
Copy Markdown
Member

We bumped Electron to 1.6.11 in #1430 which supported adding self-signed certificates to the user's trusted root certificate store (see electron/electron#9242 for more) but we didn't enable the dialogs for Windows.

Here's the new flow with a self-signed certificate on Windows:

  • when signing in to GHE for the first time we probe to check the server is valid and quacks like a GHE server
  • the certificate error gets raised by Electron, and we ask the user to carefully confirm this is what they expect
  • after adding the certificate, the second probe of the GHE instance is successful

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 30, 2017
@niik niik self-assigned this Aug 31, 2017
@niik

niik commented Aug 31, 2017

Copy link
Copy Markdown
Member

@shiftkey Is there any way for us to get a notification once the certificate dialog is terminated so that we could retry automatically rather than let the user go through the flow again?

@shiftkey

Copy link
Copy Markdown
Member Author

@niik not that I'm aware of - it'd have to be something from Electron itself

@niik

niik commented Sep 1, 2017

Copy link
Copy Markdown
Member

@niik not that I'm aware of - it'd have to be something from Electron itself

Looking at the recording you posted earlier it seems like the dialog is sticking around after we pop the certificate dialog though? Are we blocking the renderer when showing the modal and, if so, couldn't we do the retry synchronously?

@shiftkey

shiftkey commented Sep 2, 2017 •

Copy link
Copy Markdown
Member Author

Are we blocking the renderer when showing the modal and, if so, couldn't we do the retry synchronously?

It currently does (on Windows at least), due to this Win32 API being blocking and requiring user interaction. And there is a callback that gets invoked as part of dialog.showCertificateTrustDialog but that's unused currently in the app.

We don't have any smarts around being able to return to the previous dialog in app.tsx, and I'm not opposed to going down this path, but I'd like to get this fix into the next update to address recent reports about this like #2598.

@niik

niik commented Sep 5, 2017

Copy link
Copy Markdown
Member

We don't have any smarts around being able to return to the previous dialog in app.tsx, and I'm not opposed to going down this path, but I'd like to get this fix into the next update to address recent reports about this like #2598.

Okay, if you open an issue about addressing the remaining work I'll get this merged. Needs a merge tho

@joshaber

joshaber commented Sep 5, 2017 •

Copy link
Copy Markdown
Contributor

We don't have any smarts around being able to return to the previous dialog in app.tsx, and I'm not opposed to going down this path, but I'd like to get this fix into the next update

Yeah, I think @niik and I have talked about this in the past: sometimes we really want our dialogs to be a stack instead of replacing the any current dialog. But I agree that's separate from this fix.

@shiftkey

shiftkey commented Sep 5, 2017

Copy link
Copy Markdown
Member Author

Tracking the polish work in #2622

@shiftkey

shiftkey commented Sep 5, 2017

Copy link
Copy Markdown
Member Author

🍎

@niik
niik merged commit 7fa51a5 into master Sep 6, 2017
@niik
niik deleted the unlock-adding-self-signed-certificate branch September 6, 2017 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants