Added functional tests for SSL/TLS #422
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
Fix #421
Which crates are being modified?
Description
Added functional tests for SSL/TLS, and some other stuffs that enabled these tests:
pyproject.toml/uv.lock: added cryptography lib to enable the creation of private keys and self-signed certificates;
created tests/test_framework/crypto/pkcs8.py: this module generate well formatted pkcs8 private keys and self-signed certificates for our SSL-enable florestad node on regtest network;
tests/florestad/ssl-test.py: test the creation of a SSL-enabled florestad node, a electrum client that try to connect to port 50002 and request a ping, asserting a successfully connection;
tests/florestad/ssl-fail-test.py: test the creation of a SSL-disabled florestad node, a electrum client that try to connect to port 50002, asserting a failure on connection.
Notes to the reviewers
When running
tests/florestad/ssl-test.py, it's worth to check it's log, since an strange error (in the last line) occured after request a ping to SSL-enabled node:Checklist
just lintcargo test