[Python]如何使用SSL? [英] [Python]how to use SSL ?

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

问题描述

你好!我有两个程序(使用python 2.7创建),使用套接字交换数据(短语或/和文件)。我想要的是连接是安全的,所以没有人可以读取或访问这些数据。我尝试使用加密算法,但这并不实用。所以我发现我可以使用SSL / TLS ....但我无法从谷歌和文档中提取足够的信息来转换我的代码。是否有人可以就我们如何使用SSL / TLS制作一个非常简单的代码?谢谢。



我的尝试:



我试图找到通过官方python SSL文档和一些stackoverflow文章的信息。

解决方案

引用:

我试图通过官方的python SSL文档和一些stackoverflow文章找到信息。





花了不到1秒的时间来找到 17.3。 ssl - 套接字对象的TLS / SSL包装器 - Python 2.7.13文档 [ ^ ]。


我找到了这个网页:

 bearcave SSL示例

提供了有关如何使用SSL的完整示例...以便您可以了解所有内容...然后将此知识转换为您自己的SSL连接。我把它留在这里,希望别人会发现它像我一样有用。


Hello ! I have two programs(created with python 2.7), that exchange data(phrases or/and files) using sockets. What i want, is the connection to be secure, so no one can read or access these data. I tried using encryption algorithms, but that wasn't much practical. So i found that i could use SSL/TLS.... but i can't pull enough info from google and doc's, to "transform" my code. Is there someone that can make a very simple code on how we use SSL/TLS ? Thanks.

What I have tried:

I tried to find information through the official python SSL doc, and some stackoverflow articles.

解决方案

Quote:

I tried to find information through the official python SSL doc, and some stackoverflow articles.



It took less than 1 second to find 17.3. ssl — TLS/SSL wrapper for socket objects — Python 2.7.13 documentation[^].


I found this webpage:

bearcave SSL example

that gives a full example on how to use SSL... so that you can understand everything... and then transform this knowledge to your own "SSL Connection". I leave it here, hoping that others will find it useful as i did.


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

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