简体   繁体   English

Pycryptodome Python3 RSA.importKey阻止/挂起

[英]Pycryptodome Python3 RSA.importKey blocking/hangs

I am running Python 3.5.2 with the latest version of Pycryptodome. 我正在使用最新版本的Pycryptodome运行Python 3.5.2。

When importing my RSA private key using RSA.importKey there is an infinite hang or block. 使用RSA.importKey导入我的RSA私钥时,存在无限的挂起或阻止。 I've tried to step through the lib and cannot find any reason why. 我试图遍历lib,找不到任何原因。

The private key is an RSA private key in PEM format. 私钥是PEM格式的RSA私钥。 ie I am passing a byte array of the key. 即我正在传递密钥的字节数组。

I get no exceptions just a hang making message signing impossible. 我没有例外,只是挂了一条消息就无法签名。 Has anyone else encountered a similar problem with a solution? 还有其他人遇到过类似的问题吗? If it helps, this is running on Linux. 如果有帮助,它将在Linux上运行。

One neat solution is taken from another SO question and it is based on lptrace . 一个很好的解决方案来自另一个SO问题 ,它基于lptrace You get the PID of the python process and then run: 您获取python进程的PID,然后运行:

sudo python lptrace -p $STUCK_PROGRAM_PID

Once you have identified at least the offending line, you can log a bug on the project's page and get more help there. 一旦至少确定了违规行,就可以在项目页面上记录错误,并在那里获得更多帮助。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM