Mark’s procedure is for importing the certificate to use for validation
(trust). You are expecting it to be usable for signing. This requires the
private key be installed along with the certificate on the machine doing the
signing. That is what is in the .pfx file - certificate & private key
(protected by a password typicall). If you don’t have a .pfx file then
export one with Certmgr on the machine that you ‘generated’ the certificate
from. If you did not generate the certificate with an exportable private
key, then, start over.
Good Luck,
Dave Cattley
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@quantel.com
Sent: Thursday, July 02, 2009 11:44 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] how do you install a test certificate for test signing?
I tried that already - that’s the procedure I have (successfully) used to
install the test cert to allow the test signed driver to load.
Here’s my failed attempt to install the test cert for SIGNING using certmgr;
:%selfSign%\certmgr /s /c PrivateCertStore
==============No Certificates ==========
CertMgr Succeeded
(showing that the PrivateCertStore is empty at start of test)
:%selfSign%\makecert -r -pe -ss PrivateCertStore -n CN=“Blah (Internal
test)” BlahTest.cer
Succeeded
:%selfSign%\certmgr /s /c PrivateCertStore
==============Certificate # 1 ==========
Subject::
[0,0] 2.5.4.3 (CN) Blah (Internal test)
Issuer::
[0,0] 2.5.4.3 (CN) Blah (Internal test)
SerialNumber::
56 E2 37 86 3E 48 68 89 42 5E 27 FE C2 EF D9 D7
SHA1 Thumbprint::
24E6472E 61E13EA2 CD437A89 ACB3A61C 240E64A9
MD5 Thumbprint::
B814B938 BA1E2DA3 29F7642D 427D8396
Key MD5 Thumbprint::
ECD11982 CE39A1B4 91C51F21 A693389B
Provider Type:: 1 Provider Name:: Microsoft Strong Cryptographic Provider
Container: 41045c8a-4223-4635-93f3-3971c597d363 KeySpec: 2
NotBefore::
Thu Jul 02 16:36:12 2009
NotAfter::
Sun Jan 01 00:59:59 2040
CertMgr Succeeded
(certificate is there now)
:%selfSign%\signtool sign /s PrivateCertStore /n “Blah (Internal Test)”
blah.sys
Done Adding Additional Store
Successfully signed: blah.sys
(certificate works fine to sign something)
:%selfSign%\certmgr /del /all /s PrivateCertStore
CertMgr Succeeded
(remove the cert from PrivateCertStore)
:%selfSign%\certmgr /s /c PrivateCertStore
==============No Certificates ==========
CertMgr Succeeded
(check it has gone)
:%selfSign%\certmgr /add BlahTest.cer /s /r localMachine root
CertMgr Succeeded
:%selfSign%\certmgr /add BlahTest.cer /s /r localMachine trustedPublisher
CertMgr Succeeded
:%selfSign%\certmgr /add BlahTest.cer /s /r localMachine PrivateCertStore
CertMgr Succeeded
:%selfSign%\signtool sign /s PrivateCertStore /n “Blah (Internal Test)”
blah.sys
SignTool Error: No certificates were found that met all the given criteria.
Number of errors: 1
(wahhhhhh!)
It will probably all make sense tomorrow…
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer