HighTechTalks DotNet Forums  

[SSL & Socket][Dot Net2 ] [Windows Server 2003]

Dotnet General Discussions microsoft.public.dotnet.general


Discuss [SSL & Socket][Dot Net2 ] [Windows Server 2003] in the Dotnet General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
aaa.aaa
 
Posts: n/a

Default [SSL & Socket][Dot Net2 ] [Windows Server 2003] - 11-27-2007 , 02:12 PM







Bonjour,

J'ai une application windows service en Dot Net 2 ( C# )
Cette application est une application serveur
Elle utilise des sockets pour pouvoir communiquer avec des clients.
L'application utilise SSL comme ceci :

Lors du démarrage du serveur
............
// x509Cer =
System.Security.Cryptography.X509Certificates.X509 Certificate.CreateFromCertFile(certificatePath);
x509Cer = new
System.Security.Cryptography.X509Certificates.X509 Certificate(certificatePath);

Lors da la connection d'un client :
.............

sslStream = new SslStream(LstViewer.GetStream(), true);


sslStream.AuthenticateAsServer(x509Cer,false,Syste m.Security.Authentication.SslProtocols.Default,fal se);

Lors de l'execution de cette ligne j'ai l'erreur suivante :

The server mode SSL must use a certificate with the associated private
key. ;
Boolean AcquireServerCredentials(Byte[] ByRef) ;

J'ai généré le certificat de la facon suivante :

1. makecert -r -pe -n "CN=Wapper" -b 01/01/2007 -e 01/01/2036 -ss
Wapper -sr localMachine -sv IVS.pvk IVS.cer
2. cert2spc IVS.cer IVS.spc
3. pvkimprt -pfx IVS.spc IVS.pvk

Ensuite j'ai installé le fichier IVS.cer et .pfx sur le serveur ( double
clic et install)
Sur le client j'ai installé le fichier IVS.cer

Mes questions :
pourquoi j'obtiens cette erreur ?
comment avoir un certificat avec la clé private associé

Merci

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.