Added TLS/SSL options to the integration tests.
- The integration tests will now use https and a self-signed cert.
This commit is contained in:
parent
0fe23d8a7c
commit
4ce7757990
|
@ -1,5 +1,8 @@
|
|||
server=1
|
||||
whitelist=127.0.0.1
|
||||
rpcssl=1
|
||||
rpcsslcertificatechainfile=../bitcoind.crt
|
||||
rpcsslprivatekeyfile=../bitcoind_no_pass.key
|
||||
txindex=1
|
||||
rpcallowip=127.0.0.1
|
||||
rpcuser=bitcoin
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICDTCCAXYCCQCsGf/7CM97gDANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJV
|
||||
UzELMAkGA1UECBMCR0ExDDAKBgNVBAcTA2ZvbzEhMB8GA1UEChMYSW50ZXJuZXQg
|
||||
V2lkZ2l0cyBQdHkgTHRkMB4XDTE1MDgyNjE3NTAwOFoXDTE1MDkyNTE3NTAwOFow
|
||||
SzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkdBMQwwCgYDVQQHEwNmb28xITAfBgNV
|
||||
BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOB
|
||||
jQAwgYkCgYEA7SXnPpKk+0qXTTa42jzvu/C/gdGby0arY50bE2A+epI7FlI5YqKd
|
||||
hQWoNRpuehF3jH6Ij3mbeeImtTA7TaUYlgHKpn63xfJ0cRj55+6vqq09nDxf0Lm9
|
||||
IpTbgllu1l+SHtSuzFBVtGuNRSqObf8gD5XCD5lWK1vXHQ6PFSnAakMCAwEAATAN
|
||||
BgkqhkiG9w0BAQUFAAOBgQBNARLDgsw7NCBVkn57AEgwZptxeyvFWlGZCd0BmYIX
|
||||
ZFk7T1OQDwn7GlHry2IBswI0QRi076RQ4oJq+fg2O3XdFvEYV0cyypW7AxrnYTHP
|
||||
m1h2xr6Y5vhxFKP8DxpAxST27DHbR18YvTD+IGtp2UjLj646587N0MWxt8vmaU3c
|
||||
og==
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,15 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXwIBAAKBgQDtJec+kqT7SpdNNrjaPO+78L+B0ZvLRqtjnRsTYD56kjsWUjli
|
||||
op2FBag1Gm56EXeMfoiPeZt54ia1MDtNpRiWAcqmfrfF8nRxGPnn7q+qrT2cPF/Q
|
||||
ub0ilNuCWW7WX5Ie1K7MUFW0a41FKo5t/yAPlcIPmVYrW9cdDo8VKcBqQwIDAQAB
|
||||
AoGBAOzYFxyCPu2OMI/4ICQuCcwtBEa2Ph+Fo/Rn2ru+OogV9Zc0ZYWiHSnWXYkz
|
||||
rbSSL1CMqvyIGoRfHgOFeSTxxxtVyRo5LayI6Ce6V04yUFua16uo6hMX5bfGKZ9d
|
||||
uq/HCDmdQvgifxUFpTpoSencuxwVCSYstMqjGfpobc5nxN2RAkEA+23BWNyA2qcq
|
||||
yqSplgTQO0laXox9ksr1k2mJB2HtG3GNs1kapP+Z8AVtn/Mf9Va0hgbSnqpF9fll
|
||||
1xpBqfidSQJBAPF1rizAm7xP7AeRRET36YKjZCVayA/g4rp7kecrNJTTupJIuxHr
|
||||
JUlOTtXEWjIVcutSM7bP7bytPv4SAaApBysCQQDEZhqnCC+bHQO/IVrbNc1W0ljG
|
||||
DGY22VV1HfYND0CAtHXkx9CZXJPpusPEMs0e/uiq3P9/MzDNEFCt8vOiCvMJAkEA
|
||||
65oDIKGzk/R7/wpMjetEyva5AgXpjizFrmZigCjVPp61voT/G8XQ9Q1WuRjFVXc+
|
||||
UcU8tpV+iIqXG3vgYDGITwJBANb0NFFF8QsygbENtad1tw1C/hNabHk8n9hu+Z8+
|
||||
OSzEMlP7SsvddPaqusGydhTUxazoG3s4kEh5WmCWKgZGKO0=
|
||||
-----END RSA PRIVATE KEY-----
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// These tests require bitcoind.js Bitcoin Core bindings to be compiled with
|
||||
// the environment variable BITCOINDJS_ENV=test. This enables the use of regtest
|
||||
// These tests require bitcore-node Bitcoin Core bindings to be compiled with
|
||||
// the environment variable BITCORENODE_ENV=test. This enables the use of regtest
|
||||
// functionality by including the wallet in the build.
|
||||
// To run the tests: $ mocha -R spec integration/regtest-node.js
|
||||
|
||||
|
@ -72,11 +72,12 @@ describe('Node Functionality', function() {
|
|||
node.on('ready', function() {
|
||||
|
||||
client = new BitcoinRPC({
|
||||
protocol: 'http',
|
||||
protocol: 'https',
|
||||
host: '127.0.0.1',
|
||||
port: 18332,
|
||||
user: 'bitcoin',
|
||||
pass: 'local321'
|
||||
pass: 'local321',
|
||||
rejectUnauthorized: false
|
||||
});
|
||||
|
||||
var syncedHandler = function() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// These tests require bitcoind.js Bitcoin Core bindings to be compiled with
|
||||
// the environment variable BITCOINDJS_ENV=test. This enables the use of regtest
|
||||
// These tests require bitcore-node Bitcoin Core bindings to be compiled with
|
||||
// the environment variable BITCORENODE_ENV=test. This enables the use of regtest
|
||||
// functionality by including the wallet in the build.
|
||||
// To run the tests: $ mocha -R spec integration/regtest.js
|
||||
|
||||
|
@ -76,11 +76,12 @@ describe('Daemon Binding Functionality', function() {
|
|||
log.info('Bitcoind started');
|
||||
|
||||
client = new BitcoinRPC({
|
||||
protocol: 'http',
|
||||
protocol: 'https',
|
||||
host: '127.0.0.1',
|
||||
port: 18332,
|
||||
user: 'bitcoin',
|
||||
pass: 'local321'
|
||||
pass: 'local321',
|
||||
rejectUnauthorized: false
|
||||
});
|
||||
|
||||
log.info('Generating 100 blocks...');
|
||||
|
|
Loading…
Reference in New Issue