By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,876 Members | 1,191 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,876 IT Pros & Developers. It's quick & easy.

sslstream and certificates

P: n/a
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:\mycertific ate.crt");

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.
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.