SChannel 的 SSL 会话重用 (Windows) [英] SSL Session reuse with SChannel (Windows)

查看:69
本文介绍了SChannel 的 SSL 会话重用 (Windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 schannel.dll 与远程服务器建立 SSL 连接的程序.但我想经常与服务器断开连接并重新连接,而无需再次重新协商共享密钥.我知道 SSL 支持这一点,但不知道如何使用 SChannel 来实现.

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.

你能帮我吗?

这里有一些可以提供帮助的链接:

Here are some links that can help:

使用 Schannel 创建安全连接:http:///msdn.microsoft.com/en-us/library/aa374782(VS.85).aspx

Creating a Secure Connection Using Schannel: http://msdn.microsoft.com/en-us/library/aa374782(VS.85).aspx

SSL 会话重用 - 如何查找是否支持?:http://royontechnology.blogspot.com/2008/01/how-to-find-out-if-server-supports-ssl.html

SSL session reuse - how to find if supported?: http://royontechnology.blogspot.com/2008/01/how-to-find-out-if-server-supports-ssl.html

推荐答案

如果您希望重新连接工作,那么使用相同的每个连接的凭据句柄.您还需要传入调用 InitializeSecurityContext 时相同的 targetname 字符串.漂亮其他一切都是自动的.

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.

这篇关于SChannel 的 SSL 会话重用 (Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆