简体   繁体   中英

How can I pass --sslPEMKeyPassword using pymongo

I have an SSL built mongo (version 2.4.6). I use pymongo for python to connect to mongoDB. The mongoDB instance will be running in SSL mode with a client certificate key which is encrypted with a password.

To connect to the instance via mongo console, I can pass appropriate parameters with the --sslPEMKeyPassword option. How will I be able to pass this option using 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. 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. We have some additional discussion on the PyMongo feature request , ticket PYTHON-640.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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