Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / August 2005

Tip: Looking for answers? Try searching our database.

WSE2.0--need valid X.509 certs created with Makecert

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy Bocz - 19 May 2005 21:18 GMT
I'm finishing up a web service that uses WSE2.0 to sign the request and encrypt the SOAP body (both request and response).  I'm using the code approach (not policy).  Everything works fine with the QuickStart Sample X.509 certs supplied with the WSE2.0 SP2 SDK.

I'd like to use self signed certs for the following reasons:
--the web service will be consumed internally (no need for CA traceability)
--it won't see a tremendous load (minor performance hit from self-signed verts should be fine)
--I don't want to have to worry about expiring certs

The problem I'm having is that the certs I've created so far with Makecert don't work.  I either get a "Bad Key" or "The security token could not be authenticated or authorized" errors during the creation of the web service request on the client side. I've double-checked the cert imports and private key ACL rights and everything is fine.

The makecert approaches I've used to get two certs with private keys are (where xxx = "WSClient" and "WSServer"):

makecert -r -n "CN=xxx"  -sv xxx.pvk xxx.cer
cert2spc xxx.cer xxx.spc
pvkimprt -pfx xxx.spc xxx.pvk

AND

makecert -cy authority -r -n "CN^mos1.Softwaremaker.NET" -sr localmachine -ss "Trust"

makecert -cy end -n "CN^mos1.Softwaremaker.NET SERVER" -sky exchange -sk "demos1.Softwaremaker.NET Server" -ss "My" -sr localmachine -in "demos1.Softwaremaker.NET" -ir localmachine -is "Trust"

makecert -cy end -n "CN^mos1.Softwaremaker.NET CLIENT" -sky exchange -sk "demos1.Softwaremaker.NET Client" -ss "My" -sr localmachine -in "demos1.Softwaremaker.NET" -ir localmachine -is "Trust"

Can anyone provide me with makecert command lines for self signed private-key certs that they know work with WSE2.0?  Or, are there any MVPs out there that know how the Quickstart sample certs were created?

Thanks in advance,
Andy
Jake Pugois - 04 Jun 2005 23:32 GMT
Make sure you use the wse certificate tool to assign Read permission to
ASPNET on the certificate's private key file.

I'm finishing up a web service that uses WSE2.0 to sign the request and
encrypt the SOAP body (both request and response).  I'm using the code
approach (not policy).  Everything works fine with the QuickStart Sample
X.509 certs supplied with the WSE2.0 SP2 SDK.

I'd like to use self signed certs for the following reasons:
--the web service will be consumed internally (no need for CA traceability)
--it won't see a tremendous load (minor performance hit from self-signed
verts should be fine)
--I don't want to have to worry about expiring certs

The problem I'm having is that the certs I've created so far with Makecert
don't work.  I either get a "Bad Key" or "The security token could not be
authenticated or authorized" errors during the creation of the web service
request on the client side. I've double-checked the cert imports and private
key ACL rights and everything is fine.

The makecert approaches I've used to get two certs with private keys are
(where xxx = "WSClient" and "WSServer"):

makecert -r -n "CN=xxx"  -sv xxx.pvk xxx.cer
cert2spc xxx.cer xxx.spc
pvkimprt -pfx xxx.spc xxx.pvk

AND

makecert -cy authority -r -n "CN=demos1.Softwaremaker.NET" -sr
localmachine -ss "Trust"

makecert -cy end -n "CN=demos1.Softwaremaker.NET SERVER" -sky exchange -sk
"demos1.Softwaremaker.NET Server" -ss "My" -sr localmachine -in
"demos1.Softwaremaker.NET" -ir localmachine -is "Trust"

makecert -cy end -n "CN=demos1.Softwaremaker.NET CLIENT" -sky exchange -sk
"demos1.Softwaremaker.NET Client" -ss "My" -sr localmachine -in
"demos1.Softwaremaker.NET" -ir localmachine -is "Trust"

Can anyone provide me with makecert command lines for self signed
private-key certs that they know work with WSE2.0?  Or, are there any MVPs
out there that know how the Quickstart sample certs were created?

Thanks in advance,
Andy
mike murphy - 23 Aug 2005 03:51 GMT
I have the same problem.  I know that the certificates that I do have, have
the correct permissions.  I get "System.ComponentModel.Win32Exception: Bad
Key" when the message is sent back to the client.

> Make sure you use the wse certificate tool to assign Read permission to
> ASPNET on the certificate's private key file.
[quoted text clipped - 47 lines]
>
> <Id>Fm3bVbdJ9Umj57S3cPAYag==</Id>
Raghu - 23 Aug 2005 23:24 GMT
The makecert tool that shipped with vs.net 2003 is old. You should get the
latest one included in platform sdk. The latest one has a new option "-pe"
which makes private key exportable. However I need to warn you that I was
not able to make the IIS work with the server certificate.

However I was able to create on using the SSLDiag.exe or you can use
SelfSSL.exe (search for them on the microsoft site.)

>I have the same problem.  I know that the certificates that I do have, have
> the correct permissions.  I get "System.ComponentModel.Win32Exception: Bad
[quoted text clipped - 58 lines]
>>
>> <Id>Fm3bVbdJ9Umj57S3cPAYag==</Id>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.