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 / September 2004

Tip: Looking for answers? Try searching our database.

howto create certificate like Client Private.pfx, Server Private.pfx, Server Public.cer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john doe - 18 Aug 2004 09:46 GMT
Hello. im trying out the samples in WSe 2.0, but i havent managed to create
and use custom certificates.
the CS sample  SecureConversation is working fine with the Sample Test
Certificates (Client Private.pfx, Server Private.pfx, Server Public.cer).
I copied SecureConversation to a new project and created 2 custom
certificatews with makecert.exe (v 5.131.2157.1)
with the arguments i found from posts on the web:

makecert -sk WSEClient -n "CN=WSEClient for" -ss My -sr CurrentUser  -sp
"Microsoft Enhanced Cryptographic Provider v1.0" -sky exchange -r
C:\WSEClient5.cer
makecert  -sk WSEServer -n "CN=WSEServer for" -ss My -sr LocalMachine -sp
"Microsoft Enhanced Cryptographic Provider v1.0" -sky exchange -r
C:\WSEServer5.cer

or

makecert -sky exchange -sp "Microsoft Enhanced Cryptographic Provider
v1.0" -ip "Microsoft Enhanced Cryptographic Provider v1.0" -sk "WSEC"  -n
"cn=WSEClient" -ss My C:\WSEClient.cer
makecert -sky exchange -sp "Microsoft Enhanced Cryptographic Provider
v1.0" -ip "Microsoft Enhanced Cryptographic Provider v1.0" -sk "WSES"  -n
"cn=WSEServer" -ss My C:\WSEServer.cer

i changed the Windows key ID and tye RFC3280 key ID strings in the client
and server app in appbase.cs.

currently the exception is "bad key" but other makecert tries could come up
with WSE717 error.

i want to know what the arguments for makecert are to create the certs and
if "PublicKeyToken=31bf3856ad364e35" in web.conf and app.conf need to be
changed (if so, where do i get the public key from?). please help me...
thanks in advance!
HongMei Ge - 19 Aug 2004 05:50 GMT
Hi! John

Have you updated your web.config in the server project with your new
KeyIdentifier?  Look for the server token section.

Also make sure that you have your client certificate with the private key
installed at the current user store, and server's certificate with its
private key installed in the local machine store.
Hope this helps.

hongmei

> Hello. im trying out the samples in WSe 2.0, but i havent managed to create
> and use custom certificates.
[quoted text clipped - 30 lines]
> changed (if so, where do i get the public key from?). please help me...
> thanks in advance!
john doe - 19 Aug 2004 13:19 GMT
Hi hongmei,

The client's cert is installed in "currentuser/personal" on the client

The service's cert is installed in "localmachin/personal" on the server

(I installed the certs in the same places as where the sample certs are
installed and work)

The app.conf and the web.conf are modified as in the sample and the
appbase.cs too.

What seems to be a difference between the installs of the sample certs and
homemade certs is that:
1. sample certs ask for pass (located in the
samples/certsamples/readme.html) and mine does not

2. the wsecertview app (WseCertificate2.exe in tools/) can find the private
key file and folder of an installed sample cert on a server, but not cannot
find these with my cert.

If you or anybody alse knows the arguments or how tp make certs as the
sample certs in the wse 2 samples please let me know.

Thanks in advance!

Julien

PS: im not sure is this msg will be placed under the first msg or as a new
subject.... we'll see

> Hi! John
>
[quoted text clipped - 28 lines]
> > makecert -sky exchange -sp "Microsoft Enhanced Cryptographic Provider
> > v1.0" -ip "Microsoft Enhanced Cryptographic Provider v1.0" -sk
WSEC"  -n
> > "cn=WSEClient" -ss My C:\WSEClient.cer
> > makecert -sky exchange -sp "Microsoft Enhanced Cryptographic Provider
> > v1.0" -ip "Microsoft Enhanced Cryptographic Provider v1.0" -sk
WSES"  -n
> > "cn=WSEServer" -ss My C:\WSEServer.cer
> >
[quoted text clipped - 9 lines]
> > changed (if so, where do i get the public key from?). please help me...
> > thanks in advance!
SA - 09 Sep 2004 22:51 GMT
Seems to me like you will need to put the public key of the server also in
your currentuser/personal store...

I can't comment on the makecert.exe command-line arguments.

Signature

Sven

> Hi hongmei,
>
[quoted text clipped - 50 lines]
> > >
> > > makecert -sk WSEClient -n "CN=WSEClient for" -ss My -sr
urrentUser  -sp
> > > "Microsoft Enhanced Cryptographic Provider v1.0" -sky exchange -r
> > > C:\WSEClient5.cer
[quoted text clipped - 27 lines]
> > > changed (if so, where do i get the public key from?). please help me...
> > > thanks in advance!

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.