Sergi Delgado Segura
2f67ecfa6e
Changes sk_path to sk_der in Watcher
...
The Watcher used to receive a secret key file path ion the __init__ to load a secret key for signing. That made testing the Watcher hard, since the file needed to be present. Changing it so the main (pisad) loads the file from disk and passes the data the Watcher on init.
2019-12-16 10:54:13 +01:00
Sergi Delgado Segura
008a71da3a
Renames matches to breaches to be consistent with the Responder. Also adds docstrings
2019-12-13 18:13:29 +01:00
Sergi Delgado Segura
d39056a0cc
Refactors signing/verifiying functionality to be part of the Cryptographer
...
- All encryption/decryption and signing/verifying calls are performed by the cryptographer now.
- The current signature format is temporal. We should define something not base on json.
- Some Cryptographer tests are still missing.
- The cli tests should be modified to fit this too.
2019-12-07 13:22:39 +01:00
Sergi Delgado Segura
a8800ac375
Integrates encryption/decryption within the Cryptographer. Close #63
...
Includes unittests. Also reformats test_inspector to avoid using cli functions
2019-12-06 13:23:02 +01:00
Sergi Delgado Segura
f0150ce585
Removes hash/cipher configuration and changes AESGCM128 for CHACHA20POLY1305
...
Updates tests accordingly
2019-12-04 17:46:07 +01:00
Sergi Delgado Segura
d2b7216a96
Addresses requested changes
2019-11-22 14:48:38 +00:00
Sergi Delgado Segura
a1a1206e0c
Adds new Watcher unit tests
2019-11-08 18:25:14 +00:00
Sergi Delgado Segura
c384bc78c2
Changes code to use bitcoin_cli from pisa/tools
2019-11-07 19:16:18 +00:00
Sergi Delgado Segura
82f9de1717
Adds missing Watcher test
2019-11-07 16:56:31 +00:00
Sergi Delgado Segura
20f296c9d4
Reformats code to match code guidelines
2019-11-07 15:47:35 +00:00
Sergi Delgado Segura
8174ec61af
Generalizes get_dummy_appointment (there were multiple instances of it in different tests)
...
Also refactors some unused imports and modifies the watcher tests to use .serialize instead of to_json
2019-11-07 15:08:06 +00:00
Sergi Delgado Segura
8ad3ae5f1d
Initializes block_queue on init
...
Building from backed up data may require initializing the block queues of both the watcher and responder with the blocks they've missed.
2019-10-30 12:20:42 -07:00
Sergi Delgado Segura
dfaec51a3b
Updates tests to dissable logging based on 17e6066
2019-10-28 14:49:52 -07:00
Sergi Delgado Segura
f61474216c
Fixes and tests updates
...
Updates tests so they run with the db_manager and fixes some bugs introduced in d7d42c9.
2019-10-28 14:49:40 -07:00
Salvatore Ingala
f0143efd14
Move test_sign_appointment after test_add_appointment, as per PR review
2019-10-28 11:11:39 +07:00
Salvatore Ingala
df9a1173a5
Minor refactoring of test_watcher; revert change DEFAULT_PISA_API_SERVER to correct value
2019-10-25 15:03:57 +08:00
Salvatore Ingala
bb090897b4
Test that signature is None if appointment is not added
2019-10-24 12:23:56 +08:00
Salvatore Ingala
a19bfa13ff
Separated signing logic of the Watcher in sign_appointment function; added unit test
2019-10-24 12:19:33 +08:00
Salvatore Ingala
cd2f3610f9
Merge branch 'testing' into 13-appointment-signature
2019-10-23 09:19:44 +08:00
Salvatore Ingala
1601f0ca15
Renamed constants and default file names for Pisa's private and public keys
2019-10-22 12:13:12 +08:00
Sergi Delgado Segura
94156a67cc
Adds generate_blocks
2019-10-21 18:12:05 +01:00
Salvatore Ingala
a73b14bf13
Fix signature verificatio in pisa-cli
2019-10-18 15:40:57 +08:00
Salvatore Ingala
414a4638bd
Added signature verification to watcher's add_appointment test
2019-10-18 12:37:06 +08:00
Salvatore Ingala
2881101e36
Fixed missing return value in test
2019-10-18 08:41:44 +08:00
Salvatore Ingala
f4bfd5ef40
Merge branch 'testing' into 13-appointment-signature
2019-10-18 08:32:38 +08:00
Sergi Delgado Segura
6735aac094
Update tests to use bitcoind_sim event-wise
...
Also clean son unused imports
2019-10-17 19:08:34 +01:00
Sergi Delgado Segura
95759793ba
Fixes bitcoin_cli
...
bitcoin_cli as a global variable in the main __init__.py was creating issues related to http.client.CannotSendRequest: Request-sent and connection re-usage. Define a new connection per request.
2019-10-17 17:17:52 +01:00
Salvatore Ingala
db522500c3
Switched to cryptography instead of ecdsa for signatures
2019-10-17 17:02:09 +08:00
Sergi Delgado Segura
3e62cb4b70
Parametrize start and end appointment offsets
...
Also waits an additional for transactions to be cleaned to be safe
2019-10-16 12:42:50 +01:00
Sergi Delgado Segura
b74df42a2b
Runs bitcoin-cli locally
2019-10-14 17:41:09 +01:00
Sergi Delgado Segura
409f8fb5fb
Adds Watcher unit tests
2019-10-14 16:58:31 +01:00