简体   繁体   English

Python-SSL客户端/服务器证书

[英]Python - SSL Client/Server Certificate

I want to create a Client/Server architecture following the python documentation . 我想按照python文档创建一个Client / Server体系结构。

This works well with my self-signed certificates in one pem file. 这与我在一个pem文件中的自签名证书配合得很好。 (ca_root root_key ca_intermediate intermediate_key) (ca_root root_key ca_intermediate中间密钥)

So my next plan is to create client certificates which can be revoked by the server if the client isn't trustworthy anymore. 因此,我的下一个计划是创建客户端证书,如果客户端不再受信任,则可以由服务器吊销该证书。

So the way to go is that i create a certificate, signed with the intermediate key, and hand it out to the client. 因此,方法是创建一个证书,并用中间密钥签名,然后将其分发给客户端。

But i still get 但是我仍然得到

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

Do i need to export the whole certificate chain to the client? 我是否需要将整个证书链导出到客户端? This seems odd to me. 我觉得这很奇怪。

Thanks! 谢谢!

Most likely you're entire chain isn't in your .pem file. 您的整个链很可能不在您的.pem文件中。 Just copy the text from the certificates in the right order into a single .pem file and attempt that. 只需以正确的顺序将证书中的文本复制到单个.pem文件中,然后尝试进行操作。 If that doesn't work you may be getting this error because of your server configuration. 如果这样不起作用,则可能是由于服务器配置而导致此错误。 More information is need thought to provide a better answer. 需要更多信息以提供更好的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用python的ssl客户端服务器 - ssl client server with python Python客户端 - SSL lib - 证书验证失败 - Python client - SSL lib - certificate verify failed python中SSL客户端的正确证书用途是什么? - What is the correct certificate purpose for SSL client in python? 如何验证双绞线SSL客户端中的SSL服务器证书 - How to validate the SSL server certificate in twisted SSL client Hashicorp python 客户端暖通空调问题:-“握手错误:错误([('SSL 例程','tls_process_server_certificate','证书验证失败' - Hashicorp python client hvac issue:- "bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed' Python服务器:Chrome扩展SSL证书 - Python Server: Chrome Extension SSL certificate 如何在python中验证服务器的SSL证书? - How to validate server's ssl certificate in python? Python Selenium - 如何指定在客户端SSL身份验证中使用的客户端证书 - Python Selenium - How to specify a client certificate to use in client SSL authentication Python ssl.get_server_certificate 下载错误的证书? - Python ssl.get_server_certificate downloads wrong certificate? Python Twisted:SSL例程,ssl3_get_server_certificate错误 - Python Twisted : SSL routines , ssl3_get_server_certificate errors
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM