The Apple Safari extension development guide describes how to generate CSR(Certificate Signing Request) file for Mac. But, if we want to develop the Safari extensions on Windows 7, we don’t have any resource to guide us. Here, I am providing steps to create a developer certificate for windows.
- Register on Apple Safari developer program here
- Download and install X Certificate and key management(XCA)
- Generate a new private key in XCA. After installing the XCA, go to File ->New Database. Give the database name and password. Now, the new key option will be enabled.
- Choose a new key and give the name for the private key and give size as 2048 Bytes.
- From the XCA, choose “certificate signing requests” tab. Click on “New Request” and fill the necessary details. Follow the below screenshots.
- Export the Certificate Signing Request(CSR).
- Request a certificate at apple here using the Certificate Signing Request(CSR).
- Download the certificate from Apple account.
- Click on “Certificates” tab on XCA and import the certificate which is downloaded from Apple into XCA.
- Export the certificate as p12 file.
- Double click on *.p12 file. The certificate will import into the windows Certiciate-Manager.
- Now, open the safari browser and click on Develop -> Show Extension builder. You are able to see that the certificate got detected.
Happy Learning !!!
can you help me out with this
http://stackoverflow.com/questions/37137086/no-safari-extensions-certificate-on-mac
Thanks for this! I’m stuck at the step that says “Export the certificate as p12 file” P12 is not an option. There is PEM, DER, and PKCS, some with various subsets (with certificate chain, etc.) Any tips?
You can see .p12 file format. Select that and export.
This may be kind of pointless going forward. Just got Apple email that Safari dev program will be merged into Apple (iOS/Mac) dev program, which is $99/yr just to release/publish official Safari extensions (to the gallery). This applies to extension updates as well. At that price, may as well get a Mac and build iOS and/or Mac apps too.
Then, going forward you can not build extensions for free of cost???
That is my assumption. I’m not sure if Apple released all the fine print details to the public yet. They only sent an advance notice to existing Safari extension developers (who currently have an extension in the current gallery).
Building/compiling Safari extensions requires a certificate (I forget if it’s even required to develop/run one locally that’s not yet “built”). Going forward, there is no Safari developer program. So that likely means those existing accounts will be invalid. And the only way to login and generate a certificate/certificate request is via the Apple developer program and that you have to pay for.
Existing certificates will still work until they expire, then we’re out of luck. It’s too bad they expire rather quick, in a year or two I recall.
Just trying out your solution here now. What do we fill in for the CSR request in XCA? Are all fields required? You left that vague with “fill the necessary details”. I don’t know what to fill in, garbage text ok? Use defaults in drop down fields ok?
The post is updated with the requested information. Please take a look.
By the way, saw you have a blog post about Chrome extension example. No equivalent to post for a Safari extension?
Not yet tried to create Safari extension. I will try to create one for Safari as well.
FYI, I forgot that I came across another method before:
http://stackoverflow.com/questions/16011066/safari-extension-developer-certificate-windows#answer-17455861
Thanks for sharing other method
Thanks for sharing, this will be helpful. There used to be instructions for Windows from the Apple Safari developer portal too. I used that before. Those instructions were removed leaving only Mac when Apple officially dropped Windows support with Safari 6.
Your instructions differ from the original Apple instructions which used native Microsoft tools to generate the certificate request. But regardless, any working instructions for Windows is appreciated. On a side note, I wish I had archived the original Apple Windows instructions in case it’s useful and as a point of reference.