Question

I'm trying to get started with Safari extension development, but I keep getting the "No Safari Extension Developer Certificate" error.

I followed the openssl instructions here: making CSR certificates in Windows (7)

I uploaded the CSR file to developer.apple.com, I downloaded the generated file and installed it in Personal and Trusted Root Certification Authorities stores. Nothing happens in the extension builder.

The top response here makes me think: Safari doesn't detect my Extension Certificate

It says "on another machine you don't have the private key associated with the cert".

I see the openssl command generated a private key file for me. Do I need to use it somewhere in Safari or somewhere else in the operating system?

I've been trying for a full day now and I'm getting a feeling like I'm missing something obvious here. Can you suggest what it could be?

Was it helpful?

Solution

Ok, here's a walkthrough.

On two of these steps you'll be asked to create password. You can go with an empty one - just press Enter.

  1. Get OpenSSL. There are a few options here, I got mine here. I downloaded the first thing (light version) and Visual C++ Redistributables (you might already have them, OpenSSL installer will warn you if you need to get them). I installed OpenSSL in C:\OpenSSL and selected to copy OpenSSL DLLs to the OpenSSL binaries directory.
  2. Run this command in the standard Windows terminal:

    set OPENSSL_CONF=c:\OpenSSL\bin\openssl.cfg

  3. Then this one (as for details, I only entered my name and email, but probably even those are not required for Apple):

    c:\OpenSSL\bin\openssl.exe req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key

  4. Upload the new file CSR.csr in the Certificates section on developer.apple.com. You'll get a file called safari_extension.cer in return.
  5. Run this:

    c:\OpenSSL\bin\openssl x509 -in safari_extension.cer -inform DER -out safari_extension_PEM.cer -outform PEM

  6. And this:

    c:\OpenSSL\bin\openssl pkcs12 -export -in safari_extension_PEM.cer -inkey privateKey.key -out bundle.p12

  7. Double click safari_extension.cer. Install it in the Personal certificate store.

  8. Double click bundle.p12. Install it in the same store.

That's it. Open Safari and it should know about the certificate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top