jgarzik / python-bitcoinrpc

Python interface to bitcoin's JSON-RPC API
GNU Lesser General Public License v2.1
644 stars 304 forks source link

RPC SSL to btcd #35

Closed PRabahy closed 10 years ago

PRabahy commented 10 years ago

I am trying to use bitcoind-ncurses to connect to btcd. I successfully got bitcoind-ncurses running on my box and had to make a small mod to it for it to support SSL (https://github.com/PRab/bitcoind-ncurses/commit/d49a8c4c3ec6b77b2a277b7ac4af763560684a8a). Even after doing that, I am having trouble getting to to connect.

I am very inexperience with python so began adding print statements to the code and believe I have the bug narrowed down to authproxy.py --> call --> self.__conn.request(...). I see that it makes the call, but never executes the print statement that I added on the next line. I assume that this means that it threw an exception.

I was suspicious of the call to httplib.HTTPSConnection(...) because it was passing None for the cert and key, but even after adding those it is still skipping my print statement.

I would love to eliminate some variables, but I am also having trouble getting bitcoind to run with RPC SSL and btcd requires RPC SSL (no option for insecure).

PRabahy commented 10 years ago

Figured it out after some more debugging. Python 2.7.5 (at least on Windows) has a bug with negotiating the SSL version. Once I upgraded to 2.7.8 it started working.

https://github.com/azeteki/bitcoind-ncurses/issues/5

arnuschky commented 9 years ago

Described fix did not work for me on Ubuntu 12.04, with any python version (2.7.9, for example). See PR #50 for a fix.