sslstream and certificates
- From: "Jakob Nielsen" <a@xxx>
- Date: Mon, 23 May 2005 22:01:03 +0200
This is a question about partly .net sslStreams and partly about the
certificates it uses.
I can't seem to find a more specific group.. and since i am coding in c# :-)
I try creating a sslStream from a regular networkstream as folows
Socket clientSocket = serverSocket.EndAccept(result);
clientSocket.Blocking = true;
Stream clientStream = new NetworkStream(clientSocket);
SslStream sslStream = new SslStream(clientStream);
X509Certificate cert =
X509Certificate.CreateFromCertFile(@"c:\mycertificate.crt");
sslStream.AuthenticateAsServer(cert);
The call to AuthenticateAsServer fails with "The server mode SSL must use a
certificate with the associated private key"
What exactly should i put into that message? It needs another kind of
certificate with the private key embedded?
I do have a keyfile on the side with one of my certificates, but I can not
specify it anywhere.
Another certificate , I am testing with, is from rapidSSL a CA so I assume
it should be "right".
Has someone else tried setting up a sslStream as server?
What I am working on is a http server for a program that needs to provide a
web interface. I would very much like to have it running though SSL. Note
that this is ofcourse not an asp application but regular winforms.
.
- Prev by Date: Re: WebService: How to close a connection after a completed request
- Next by Date: Re: How to build Fax Server by C#?
- Previous by thread: Rich text edit auto scroll
- Next by thread: Re: How to build Fax Server by C#?
- Index(es):
Relevant Pages
|