Python是否等效于Java的“密钥库”? [英] Python Equivalent of Java's 'Keystore'?

查看:70
本文介绍了Python是否等效于Java的“密钥库”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Python平台中是否存在用于存储/检索加密密钥和证书的标准机制:等同于Java平台中的 keystore(/ truststore)?

Is there a standard mechanism for storing/retrieving cryptographic keys and certificates in the Python platform: equivalent to the 'keystore(/truststore)' in the Java Platform ?

推荐答案

由于Python标准库不包含任何手动加密(仅散列)。没有真正的 standard 机制。

Since Python standard library doesn't contain any manual encryption (only hashing). There is no real standard mechanism.

如果您使用的是 ssl模块,然后您可以将文本存储在客户端证书(用于身份验证)和CA证书(用于链验证)中。

If you're using the ssl module then you can store client certificates (for authentication) and CA certificates (for chain validation) in a text which can be loaded into the SSLContext.

这篇关于Python是否等效于Java的“密钥库”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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