ewallig
23rd June 2006 17:13 UTC
Import digital certificate
Hi,
Saw one post on this a couple of years ago - is there any way to import a root certificate as part of an installation? My "pet app" is code signed by an internal CA and the root cert for that ca needs to be imported for the app to work correctly.
Any thoughts?
Thanks...:igor:
onad
27th June 2006 17:13 UTC
IMHO
Write a plugin for NSIS via Delphi (see examples of how to do just that) with the help of buying the source of the following
http://www.eldos.com/sbb/desc-pki-features.php
In the worst case you can look in the souce and try to do this by useing NSIS System command, but then you must be reeeeeaaaly persistant to get it working ;)
ewallig
27th June 2006 20:17 UTC
Yeah, I'm simply not that talented....but I did get it to work using the CAPICOM dll, a sample vbscript that comes in the CAPICOM SDK, and the basic modern UI example so all is well.
Thanks again...;)
darshanaltekar
29th March 2007 10:45 UTC
Hey ewallig
Can you please give me the code to install the certificate please
Thanks in advance
ewallig
29th March 2007 15:18 UTC
Hi,
you need the following files
- CAPICOM.dll
- The vbscript file that MSOFT provides for the procedure
Both of these files can be obtained from Microsoft but if you need to, send an email to ilinktech@yahoo.com and I'll get them out to you. As far as the NSIS code, see the attached file.
The installer checks for and if necessary installs / registers CAPICOM, copies the files to a TEMP folder, executes the script which imports the cert. Once the cert is imported, it unregisters and removes CAPICOM (security purposes) and then deletes the temp files.
No real error checking built in but I'm sure that it can be improved on. It works 100% of the time for me so I didn't add anything else to it.
Hope this helps,
- Ed