I have code that using the X.506 Digital Certificates uses the X.509
certificates that are distributed with WSE 2.0 SP1 (Server Private.pfx,
etc..). The code works perfectly when using the certificates that are
distributed with WSE 2.0 SP1.
When I try to use my own generated test certificates I get errors such as
"Bad Key".
I have tried different variations of test certificate generation without too
much success. The following is one scenario that I have used:
These are the tools required.
* makecert.exe
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cp
grfcertificatecreationtoolmakecertexe.asp
* cert2spc.exe
* pvkimprt.exe http://office.microsoft.com/downloads/2000/pvkimprt.aspx
Here are the steps:
1. First, use makecert.exe to create the *.cer file and the *.pvk file
> makecert -n "CN=MyCoolCert" -sv MyCoolCert.pvk MyCoolCert.cer
2. Next, use cert2spc.exe (also ships with the VS.NET SDK) to convert the
*.cer file to an *.spc file
> cert2spc MyCoolCert.cer MyCoolCert.spc
3. Finally, use pvkimprt.exe to create a *.pfx file from the previously
created *.spc and *.pvk files.
> pvkimprt -PFX MyCoolCert.spc MyCoolCert.pvk
I have tried to use makecert.exe by itself as well. Perhaps I am missing
something.
What I am looking for is if anyone has been successful in making certificate
with a private key that works properly with WSE 2.0 SP1. If so, could you
please reply with specifically what you did in order to generated and import
the certificate.
Thanks in advance....
nid - 24 Nov 2004 20:09 GMT
I found my answer I hope other people find this useful.
> makecert -n "CN=MyCoolCert" -sv MyCoolCert.pvk MyCoolCert.cer
I needed to add the following option to the command line. I believe it is
the option that allows this certificate to be used for encryption:
-sky exchange
Anyway.. I hope someone else find this information useful.
> I have code that using the X.506 Digital Certificates uses the X.509
> certificates that are distributed with WSE 2.0 SP1 (Server Private.pfx,
[quoted text clipped - 37 lines]
>
> Thanks in advance....
Martin Kulov - 27 Nov 2004 00:45 GMT
Hello nid,
Thanks for sharing this. I found this in markcert extended options:
-sky <keytype> Subject key type
<signature|exchange|<integer>>.
What does these "signature|exchange|<integer>" mean?
Martin Kulov
www.codeattest.com