I've received several queries about how to properly install the sample certificates that ship with the WSE 2.0 samples. It's easy to get things mixed up when installing them.
These certs are used by the X.509 samples. and if they're not installed properly, the samples will simply not work properly. The sample certificates were generated by the makecert tool provided in the Microsoft Platform Software Development Kit. You can use these sample certs to test X.509 functionality in your own applications, but you should not use them in a production environment. Instead, you should contact a certificate authority and request your own certificate.
The following instructions (which I originally wrote for the WSE 2.0 Hands-On-Labs) describe how to install the WSE 2.0 sample certificates:
- Open an MMC console by pressing Start, press Run, type mmc, and then click OK.
- On the File menu, click Add/Remove Snap-in
- Click Add, under Snap-in, double-click Certificates.
- Click My user account to add the certificates for the current user. Click Finish.
- Click Add, under Snap-in, double-click Certificates.
- Click Computer account for the local machines certificates. Click Finish.
- Close the dialog boxes.
- In the console tree, under Certificates - Current User\Personal, click Certificates.
- Open the Certificate Import wizard by selecting Action | All Tasks and choose Import.
- Follow the wizard. When asked for the file to import, specify: C:\Program Files\Microsoft WSE\v2.0\Samples\Sample Test Certificates\Client Private.pfx.
- When asked for the private key password, specify: wse2qs.
- Finish the wizard.
Note: this certificate will be used by our client application to sign messages sent to the service. It could also be used to identify the client for authentication purposes.
- In the console tree, under Certificates (Local Computer)\Personal, click Certificates.
- Open the Certificate Import wizard by selecting Action | All Tasks and choose Import.
- Follow the wizard. When asked for the file to import, specify: C:\Program Files\Microsoft WSE\v2.0\Samples\Sample Test Certificates\Server Private.pfx.
- When asked for the private key password, specify: wse2qs.
- Finish the wizard.
Note: this certificate will be used to encrypt messages between the applications. The client application will use the public key to encrypt the message and the service will use the private key to decrypt the message. The client needs to have the public portion of the certificate available in the Current User store.
- In the console tree, under Certificates - Current User\Other People, click Certificates.
Note: if you don't have an Other People store under Current User, open Internet Explorer, select Tools, Internet Options, Content, and press the Certificates button. You should see an Other People tab in the certificates dialog. You can import the certificate here through this interface or you can return to mmc and refresh the Current User tree and Other People should now show up.
- Open the Certificate Import wizard by selecting Action | All Tasks and choose Import.
- Follow the wizard. When asked for the file to import, specify: C:\Program Files\Microsoft WSE\v2.0\Samples\Sample Test Certificates\Server Public.cer.
- Finish the wizard.
Note: this certificate only contains the public portion of Server Private.pfx. The client will use this to encrypt messages and the server will use the private key installed in the Local Machine store to decrypt the messages.
You should now be set to begin using the WSE 2.0 sample certificates!
Posted
Jul 13 2004, 08:59 AM
by
Aaron Skonnard