benjie/mehserve

SSL Cert generation not working on OS X Catalina

mrmurphy opened this issue · 6 comments

Hey, @benjie! I just installed mehserve and I'm really impressed with what you've done!

I tried to add a self-signed cert using mehserve ssl <sitename> and I got the following message:

SSL certificate successfully generated

================================================================================

We'll open Keychain Access in a moment. Here are the instructions what to do:

1. Click "Add"
2. Find the certificate (e.g. "chocolate") in the "Certificates" category,
   select it, and click the [i] button at the bottom
3. In the popup window, click the ▶ button to the left of 'Trust', and select
   'Always Trust' for 'When using this certificate:'.
4. Close the popup window.
5. When prompted, enter your password again and click Update Settings.
6. Quit Keychain Access.

Press enter to continue

Error: open exited with status '1'
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/mehserve/ssl.js:15:16)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:659:12)

I popped open keychain myself to see if the certificate had been added, but I don't see it in there at all. Any advice?

That's coming from this command:

mehserve/src/ssl.js

Lines 92 to 96 in 527db97

await run("open", [
"-a",
"/Applications/Utilities/Keychain Access.app",
certDest,
]);

Not sure why, I'm not on a Mac currently so cannot check. Did they replace Keychain Access?

You should find there's a file ~/.mehserve/${hostname}.ssl.crt; you need to import this file into Keychain Access (or whatever that is now) and follow the steps from step 2 onwards in the above list.

Ah okay, so Catalina moved many of their utilities to /System/Applications/Utilities but made them magically appear in the finder as if they are in /Applications/Utilities

Should we update src/ssl.js? We could do an existance check?

Good question. I ended up uninstalling mehserve shortly after. I was concerned it was causing a bug with Docker I was having. So if there are updates needed, a future user will probably have to pick up the task. Thanks, @benjie!

Was it causing issues with Docker, or were you just ruling it out?

Just ruled it out. The issue ended up being something else (I’m pretty sure)