如何在WinSock中使用OpenSSL? [英] How do I use OpenSSL with WinSock?

查看:179
本文介绍了如何在WinSock中使用OpenSSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在网上搜索过,却没有发现任何东西...

I've scoured the web and have not found anything for this...

有人使用WinSock与OpenSSL一起使用的简单代码示例吗?我正在寻找一个简单的Visual C ++ 2005或更高版本的代码示例,该示例创建并打开一个winsock连接,并使用OpenSSL应用必要的SSL设置,并适当地释放所有资源.

Does anyone have a simple code sample of using WinSock with OpenSSL? I am looking for a simple Visual C++ 2005 or greater code sample that creates and opens a winsock connection and applies the necessary SSL settings using OpenSSL and frees all resources appropriately.

推荐答案

早在2002年,我就为《 Windows Developer Magazine》撰写了一篇文章,展示了如何使用OpenSSL为MFC的CAsyncSocket提供SSL. 代码和文章可能会有所帮助尽管它确实比您可能需要的要走得更远,因为主要重点不是winsock集成,而是将OpenSSL与异步winsock一起使用.我将其用作将OpenSSL与I/O完成集成的基础基于高性能的Winsock服务器.

Back in 2002 I wrote an article for Windows Developer Magazine that showed how to use OpenSSL to provide SSL for MFC's CAsyncSocket. The code and article and might help you though it does go further than you might need in that the main focus is not the winsock integration but using OpenSSL with asynchronous winsock. I've used this as the basis of integrating OpenSSL with an I/O completion based high performance winsock server.

这篇关于如何在WinSock中使用OpenSSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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