Python 的 Crypto/X509 证书解析库

发布于 2024-07-05 13:13:49 字数 560 浏览 4 评论 0原文

任何推荐的 Python 加密库。 我知道我在x509certificateparsinglibrary for Java中问过类似的问题,但我应该把这个问题分成两部分。

我需要的是解析 X.509 证书以提取其中包含的信息的能力。

环顾四周,我发现了两个选项:

两者中,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:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

瀞厅☆埖开 2024-07-12 13:13:49

我的经验是,大多数加密库都专注于特定的工作流程 - 使某些任务变得更容易,而其他任务则变得困难或可能不可能。 例外的是那些已经存在很长时间并且已经成熟的库(例如 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.

妖妓 2024-07-12 13:13:49

您可能想尝试 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.

酒儿 2024-07-12 13:13:49

使用M2Crypto,恕我直言,它是最完整的工具

Use M2Crypto, it is the most complete tool IMHO

栀梦 2024-07-12 13:13:49

keyczar 项目已弃用。
您可以查看 tink

The keyczar project is deprecated.
You can check out tink.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文