简体   繁体   English

如何使用pymongo传递--sslPEMKeyPassword

[英]How can I pass --sslPEMKeyPassword using pymongo

I have an SSL built mongo (version 2.4.6). 我有一个SSL构建的mongo(版本2.4.6)。 I use pymongo for python to connect to mongoDB. 我将pymongo用于python以连接到mongoDB。 The mongoDB instance will be running in SSL mode with a client certificate key which is encrypted with a password. mongoDB实例将以SSL模式运行,并带有使用密码加密的客户端证书密钥。

To connect to the instance via mongo console, I can pass appropriate parameters with the --sslPEMKeyPassword option. 要通过mongo控制台连接到实例,我可以使用--sslPEMKeyPassword选项传递适当的参数。 How will I be able to pass this option using pymongo? 如何使用pymongo传递此选项? I searched the net and documentation, but couldn't get any reference for it. 我搜索了网络和文档,但没有任何参考。

Right now by passing all other options, the python program is asking for the PEM Key password. 现在,通过传递所有其他选项,python程序要求输入PEM密钥密码。 As my program would be automated, I need to bypass this step. 由于我的程序将自动执行,因此我需要绕过此步骤。 How will I be able to do this? 我将如何做到这一点? Please help. 请帮忙。

It's a limitation of Python's SSL implementation that it can't easily support password-protected PEM files. 由于无法轻松支持受密码保护的PEM文件,这是Python SSL实施的局限性。 We have some additional discussion on the PyMongo feature request , ticket PYTHON-640. 我们对PyMongo功能请求 (票号PYTHON-640)进行了其他讨论。

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

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