Python 中的 openssl_csr_get_public_key
任何人都可以建议任何 python *ssl rsa 库* ,它具有类似于 PHP 中的功能(openssl_csr_get_public_key)。
因为我有一个证书,我需要用它来验证数据。每次我尝试将此证书与M2Crypto公钥功能一起使用时,它都会给出错误“无起始行”,这是完全可以理解的,因为它不是公钥,但是包含公钥的证书。据我了解。
提前谢谢。
Can anybody suggest any python *ssl rsa library* , which has a function like in PHP (openssl_csr_get_public_key).
Because i have a certificate , with which i need to verify the data . And every time i try to use this certificate with M2Crypto public key functiton , it gives error "no start line " , which is completely understandable because its not a public key , but a certificate which has a public key in it. As much as i understand.
Thx in advance .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你想要的是
M2Crypto.X509.load_cert( )
,然后使用cert.get_pubkey()
从证书对象获取公钥。I think what you want is
M2Crypto.X509.load_cert()
, and then getting the public key from the certificate object usingcert.get_pubkey()
.