问题
I have a program that use schannel.dll to make a SSL connection to remote server. But I'd like to disconnect from server often and reconnect without the need to renegotiate shared key again. I know that SSL support this, but don't know how to make it with SChannel.
Can you help me?
Here are some links that can help:
Creating a Secure Connection Using Schannel: http://msdn.microsoft.com/en-us/library/aa374782(VS.85).aspx
SSL session reuse - how to find if supported?: http://royontechnology.blogspot.com/2008/01/how-to-find-out-if-server-supports-ssl.html
回答1:
If you want reconnects to work it's important to use the same credential handle for each connection. You'll also need to pass in the same targetname string when calling InitializeSecurityContext. Pretty much everything else is automatic.
来源:https://stackoverflow.com/questions/905851/ssl-session-reuse-with-schannel-windows