Python 的 Crypto/X509 证书解析库
任何推荐的 Python 加密库。 我知道我在x509certificateparsinglibrary for Java中问过类似的问题,但我应该把这个问题分成两部分。
我需要的是解析 X.509 证书以提取其中包含的信息的能力。
环顾四周,我发现了两个选项:
- Python OpenSSL Wrappers (http://sourceforge .net/projects/pow)
- pyOpenSSL
两者中,pyOpenSSL 似乎是最“维护”,但我想要一些可能有使用过它们的经验的人的反馈?
Any recommended crypto libraries for Python. I know I've asked something similar in x509 certificate parsing libraries for Java, but I should've split the question in two.
What I need is the ability to parse X.509 Certificates to extract the information contained in them.
Looking around, I've found two options:
- Python OpenSSL Wrappers (http://sourceforge.net/projects/pow)
- pyOpenSSL
Of the two, pyOpenSSL seems to be the most "maintained", but I'd like some feedback on anybody who might have experience with them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我的经验是,大多数加密库都专注于特定的工作流程 - 使某些任务变得更容易,而其他任务则变得困难或可能不可能。 例外的是那些已经存在很长时间并且已经成熟的库(例如 openssl、bounceycastle,但根据我的经验,没有一个 python 库)。 因此,您确实需要根据您想要做的事情来评估库。
更具体地说,我使用 pyOpenSSL 来简单生成私钥和证书请求(即作为 CA 的客户端),并且对此非常满意。
My experience is that most crypto libraries are focused on a particular workflow - making a certain set of tasks easier and others hard or perhaps impossible. The exception to this would be ones that have really been around a long time and have matured (e.g. openssl, bounceycastle, but none of the python libraries in my experience). So, you really need to evaluate libraries in the context of what you are trying to do.
More specifically, I've used pyOpenSSL for simple generation of private keys and certificates requests (i.e. being a client to a CA) and am quite happy with it.
您可能想尝试 keyczar 正如我在另一篇文章中提到的,因为该库实际上具有两者的实现蟒蛇和java。 这将使在这两种情况下使用它变得更容易。
警告一句:我实际上没有使用过这个库 8(,所以请对此持保留态度。
You might want to try keyczar as mentioned by me in your other post, since that library actually has implementations for both python and java. That would make it easier to use it in both contexts.
A word of warning: I have not actually used this library 8(, so please take this with a grain of salt.
使用M2Crypto,恕我直言,它是最完整的工具
Use M2Crypto, it is the most complete tool IMHO
keyczar
项目已弃用。您可以查看
tink
。The
keyczar
project is deprecated.You can check out
tink
.