python中ssl认证是什么?

681次阅读
没有评论

python中ssl认证是什么?

python中ssl认证模块为客户端和服务器端的网络套接字提供对传输层安全性(通常称为“安全套接字层”)的加密和对等身份验证功能的访问。该模块使用OpenSSL库。只要在这个平台上安装了OpenSSL,就可以在所有现代的Unix系统、Windows、MacOSX等平台上使用。

python中ssl认证接口

提供了这样一个类。

class SSLSocket(socket):
    """This class implements a subtype of socket.socket that wraps
    the underlying OS socket in an SSL context when necessary, and
    provides read and write methods over that channel."""
 
    def __init__(self, sock=None, keyfile=None, certfile=None,
                 server_side=False, cert_reqs=CERT_NONE,
                 ssl_version=PROTOCOL_TLS, ca_certs=None,
                 do_handshake_on_connect=True,
                 family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None,
                 suppress_ragged_eofs=True, npn_protocols=None, ciphers=None,
                 server_hostname=None,
                 _context=None):

以上就是python中ssl认证的介绍,希望能对大家有所帮助。

神龙|纯净稳定代理IP免费测试>>>>>>>>天启|企业级代理IP免费测试>>>>>>>>IPIPGO|全球住宅代理IP免费测试

相关文章:

版权声明:wuyou2021-05-02发表,共计846字。
新手QQ群:570568346,欢迎进群讨论 Python51学习