python - The handshake operation timed out
问题描述
I've mbedtls nonRTOS server device. I'm trying to communicate with PLC Client. But before the using PLC, I'm trying to use python tls client.
I've a problem with when I use below cert and key file with below method:
Generate 2048-bit RSA private key:
openssl genrsa -out key.pem 2048
Generate a Certificate Signing Request:
openssl req -new -sha256 -key key.pem -out csr.csr
Generate a self-signed x509 certificate suitable for use on web servers.
openssl req -x509 -sha256 -days 365 -key key.pem -in csr.csr -out certificate.pem
Create SSL identity file in PKCS12 as mentioned here
openssl pkcs12 -export -out client-identity.p12 -inkey key.pem -in certificate.pem
I get above code from here: Creating a .p12 file
I need to p12 file using in PLC Client. When I trying to use certificate.pem and key.pem in mbedtls-servers system and when I use the certificate.pem in python client side, I get below situation:
Server couldnt send key exchange message waiting forever.
But If I generate the key and cert file below method:
openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout key.pem
They communicate successfuly.
How can I solve the problem why the server waiting to send key exchange message when I generate key and cert file with first method
解决方案
推荐阅读
- c++ - 区分 const int *ptr; int 常量 *ptr;
- shopify - 如何在shopify液体中单独显示供应商的产品?
- html - 加载更多按钮不显示任何内容
- azure - Azure AD Go SDK 守护程序应用程序列表用户返回“访问令牌丢失或格式错误”
- java - 如何在特定会话/连接中配置 MySQL 连接字符串“useAffectedRows”?
- javascript - 单击按钮在列表元素之间切换类
- ubuntu - exec.Command() 的 Golang cmd.Output() 在 systemd 服务(ubuntu)中引发错误
- java - 将值传递给变量
- pandas - 如何从数据框中删除库存日期列
- java - Java-如何将对象列表添加到另一个对象列表中