Re: Secure Sockets
- From: "Alun Jones" <alun@xxxxxxxxxxxxx>
- Date: Thu, 5 Jul 2007 14:15:56 -0700
"Michael Bauers" <MichaelBauers@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
I have been trying to figure out how I can write umanaged C/C++ code to
implement some sort of secure socket communication.
I have spent quite a lot of time reading through MSDN documentation,
getting anywhere. I need code which runs on Windows Server 2003 and later
I was able to get some SSPI sample code to work. MSDN's sample code would
not even compile. I spent a fair amount of time figuring out how to make
compile and run correctly. The code was rather lengthy with lot's of
required handshaking calls. It was not ideal.
Sorry, but that's really what it takes.
Ideally I would write code where data sent across the socket was
automatically encrypted and decrypted.
You have to find a way to deal with crypto problems as opposed to networking
problems. That's one big reason why you won't find many class libraries
designed to make secure sockets look "just like" regular sockets. There are
a number of functions that you will need to do that have no socket
equivalent (for instance, closing the SSL session without closing the TCP
I looked into Open SSL, but I am not allowed to use it.
I was also frustrated by not being able to locate specific information on
SSL(TLS). According to the MSDN documentation, Secure Channel allows for
(http://msdn2.microsoft.com/en-us/library/aa380516.aspx.) But I could not
locate any coherent documentation on how to implement TLS using Secure
The documentation isn't the best. Probably better is to read the webclient
and webserver samples in the SDK - these give you everything you need in
order to implement SSL / TLS support.
Someone helped me last week with this, and while their help was
it has not led me to a coherent solution I can field.
I am looking for a non third party way (secure channel?) of implementing a
secure socket. Ideally the data is automatically encrypted. I need to be
able to code it in umanaged C/C++ and it needs to run on Windows 2003
and later. I am looking for concrete documentation I can use to code a
solution. I am willing to buy any book which covers this topic.
I would definitely suggest reading Eric Rescorla's book on SSL / TLS, so
that you don't screw up the security.
Then, the process is just as described in
http://msdn2.microsoft.com/en-us/library/aa374781.aspx (Creating the
SChannel Security Context), and in
http://msdn2.microsoft.com/en-us/library/aa380138.aspx (Shutting down an
It's all described at
http://msdn2.microsoft.com/en-us/library/aa374782.aspx, in a whole lot more
detail than it was when I started writing SChannel code :)
- Re: Secure Sockets
- From: Chris Becke
- Re: Secure Sockets