<p>found out the issue,I'm running bitcoin in testnet while I put server.pem and server.cert in the data dir not under the "testnet3".As I moved the two files,things be OK. </p>

CC BY-SA 3.0
2014-07-16T07:20:08.053Z
2014-07-16T07:20:08.053Z
DISSIDIA-嘎嘎
<p>For more information you can follow these instructions<br />
<a href="https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon" rel="nofollow">https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon</a></p>

CC BY-SA 3.0
2014-07-16T13:24:57.163Z
2014-07-16T13:24:57.163Z
user3392193
<p>I want to enable SSL on windows.So I download a shining light openssl binary,and then I create server.pem and server.cert using the following commands:</p>

<pre><code>openssl genrsa -out server.pem 2048
 openssl req -new -x509 -nodes -sha1 -days 3650 -key server.pem &gt; server.cert
</code></pre>

<p>and then I start bitcoin-qt with bat:</p>

<pre><code>bitcoin-qt.exe -testnet -datadir=G:\BitcoinData-Testnet -conf=bitcoin.conf -server -rpcuser=usr -rpcpassword=pwd -rpcport=18332 -rpcallowip=* -rpcssl -rpcsslcertificatechainfile=server.cert -rpcsslprivatekeyfile=server.pem -txindex -lang=en_US
</code></pre>

<p>then I try to test SSL by executing commands:</p>

<pre><code>openssl s_client -connect localhost:18332
</code></pre>

<p>the response is:</p>

<pre><code>E:\apps\Bitcoin&gt;openssl s_client -connect localhost:18332
Loading 'screen' into random state - done
CONNECTED(000001C4)
9032:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:.\ssl\s23_lib
.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 319 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

E:\apps\Bitcoin&gt;openssl genrsa -out server.pem 2048
Loading 'screen' into random state - done
Generating RSA private key, 2048 bit long modulus
....................+++
...........................................+++
unable to write 'random state'
e is 65537 (0x10001)
</code></pre>

<p>can somebody help me ? is server.pem produced correctly?</p>

<bitcoind><ssl>
enable bitcoin SSL error
DISSIDIA-嘎嘎
# enable bitcoin SSL error

(Asked by: username_0 on 2014-07-08)

I want to enable SSL on windows.So I download a shining light openssl binary,and then I create server.pem and server.cert using the following commands:

```
openssl genrsa -out server.pem 2048
 openssl req -new -x509 -nodes -sha1 -days 3650 -key server.pem > server.cert

```

and then I start bitcoin-qt with bat:

```
bitcoin-qt.exe -testnet -datadir=G:\BitcoinData-Testnet -conf=bitcoin.conf -server -rpcuser=usr -rpcpassword=pwd -rpcport=18332 -rpcallowip=* -rpcssl -rpcsslcertificatechainfile=server.cert -rpcsslprivatekeyfile=server.pem -txindex -lang=en_US

```

then I try to test SSL by executing commands:

```
openssl s_client -connect localhost:18332

```

the response is:

```
E:\apps\Bitcoin>openssl s_client -connect localhost:18332
Loading 'screen' into random state - done
CONNECTED(000001C4)
9032:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:.\ssl\s23_lib
.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 319 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

E:\apps\Bitcoin>openssl genrsa -out server.pem 2048
Loading 'screen' into random state - done
Generating RSA private key, 2048 bit long modulus
....................+++
...........................................+++
unable to write 'random state'
e is 65537 (0x10001)

```

can somebody help me ? is server.pem produced correctly?

**Tags:** bitcoind, ssl


---

## 2 answers

### Answer by username_0 on 2014-07-16. Score: 1 | Accepted answer

found out the issue,I'm running bitcoin in testnet while I put server.pem and server.cert in the data dir not under the "testnet3".As I moved the two files,things be OK.


---

### Answer by username_1 on 2014-07-16. Score: 1

For more information you can follow these instructions  
<https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon>


---

