Commit Graph

29 Commits

Author SHA1 Message Date
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
9b1af92fc3 Minor fixes 2019-10-22 18:59:27 +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
Salvatore Ingala
ca64b59277 Added signature verification to pisa_cli 2019-10-18 14:56:59 +08:00
Salvatore Ingala
414a4638bd Added signature verification to watcher's add_appointment test 2019-10-18 12:37:06 +08:00
Salvatore Ingala
db522500c3 Switched to cryptography instead of ecdsa for signatures 2019-10-17 17:02:09 +08:00
Salvatore Ingala
f19c499efa Handling errors when constructing the Watcher in pisa daemon 2019-10-17 12:08:01 +08:00
Salvatore Ingala
deaf704bc5 Removed redundant parentheses 2019-10-17 09:59:36 +08:00
Salvatore Ingala
c6db6eddb3 Using a PEM keyfile instead of a DER for the signing key 2019-10-17 09:59:34 +08:00
Salvatore Ingala
7c1d8b69c7 Changed to_json to to_dict in Appointment and Job; added to_json to Appointment to actually return a string 2019-10-17 09:59:34 +08:00
Salvatore Ingala
e4e83167b7 Made signing key optional (will only sign if given) 2019-10-17 09:59:34 +08:00
Salvatore Ingala
99db9a29ad Added signatures to appointment 2019-10-17 09:59:29 +08:00
Sergi Delgado Segura
d7c89ddc91 Modifies behaviour towards a failed EncryptedBlob decrpytion
The decryption for the `EncryptedBlob` using AES-GCM-128 (the only cipher available atm) raises an `InvalidTag` exception. This was not properly captured by the watcher making it crash. This behavior was already discovered during the `EncryptedBlob` unit testing and left to be fixed in the `Watcher` unit testing.

However, making the EncryptedBlob raise such an exception may not be a good practice, since other ciphers may run into different exceptions. Therefore, the `EncryptedBlob` has been modified to return None upon facing a decryption issue, the `BlockProcessor` will detect that and return a None justice_txm and justice_txid. Upon receiving a None `justice_txid` the `Watcher` will delete the appointment without notifiying the `Responder`.
2019-10-14 16:57:46 +01:00
Salvatore Ingala
9f25ef8603 Fixes from PR review 2019-10-10 18:22:33 +07:00
Salvatore Ingala
aea1d1f1e0 Fixes from PR review 2019-10-10 11:07:58 +07:00
Salvatore Ingala
dee93e5c62 Moved StructuredMessage and Logger to separate file; refactored pisa-cli logging using new format 2019-10-10 09:59:11 +07:00
Salvatore Ingala
c524319027 Several fixes and improvements 2019-10-10 09:59:11 +07:00
Salvatore Ingala
bae9b6b913 Added Logger class; refactored logging accordingly 2019-10-10 09:59:10 +07:00
Salvatore Ingala
2a5dd48950 PEP8 linting 2019-10-10 09:58:27 +07:00
Salvatore Ingala
ed0cb4f632 Changed log format to JSON; fixed missing return value in get_potential_matches 2019-10-10 09:58:27 +07:00
Sergi Delgado Segura
8b62ff9e56 Update some comments/todos/discuss 2019-10-09 17:38:15 +01:00
Sergi Delgado Segura
1e18630ce2 Adds Cleaner tests. Fixes Cleaner, Watcher and Responder
There is no need to return the dictionaries modified by the client since they are "passed-by-reference" in Python.
2019-10-04 17:23:45 +01:00
Sergi Delgado Segura
3e0cca14d7 Clean up + higher modular design 2019-10-03 11:49:49 +01:00
Sergi Delgado Segura
93e23e769f Code clean up
Deletes debug/logging pair. Defines logging and bitcoin_cli as system-wide variables
2019-10-02 17:03:43 +01:00
Sergi Delgado Segura
9bb3b38b3f Clears old commented code 2019-08-27 11:21:08 +02:00
Sergi Delgado Segura
ae2cf26195 Improves internal data structures and reorgs the code for readability 2019-08-26 16:26:29 +02:00
Sergi Delgado Segura
400e524c36 Changes appointment structure
Updates the former appointment structure from `dicts` containing `lists` accessed by `index` to `dicts` containing `dicts` identified by `uuid4`. Needs testing.
2019-08-20 11:54:04 +01:00
Sergi Delgado Segura
d34ccc46a1 Adds/Updates further comments and fixes small issues 2019-08-13 12:03:36 +01:00
Sergi Delgado Segura
1cde4a2a11 refactors project structure 2019-08-12 13:24:04 +01:00