Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added code for certificate pinning for hardcoded peers. #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xloem
Copy link

@xloem xloem commented Feb 20, 2022

I'm curious as to anybody's thoughts on the idea of using TLS certificate hashes to verify peer identity.

This is some code I wrote to add to the 'real_name' format so that cert hashes can be provided, and check them. So, a peer name in coins.py can now look like the below and the peer will be marked bad if its TLS certificate doesn't match the hashes:

'electrumx.bitcoinsv.io s xsha256=08aa855b19599d84871cc4ce2218dee0f585eefae8fd8fa1899cad27ebe05d7f xblake2b=36b2e8aae9547d38d18de1f2e0f90153efb60f577acfb078ed330ec414e18d24de6c4c03aba0946bd4c3118707dede3443e6e9e68ce91b5cf18d0cac84703339'

I haven't looked at how features and peers are exchanged between servers at this time. I'm pretty new to the electrum protocol, and can often struggle to write code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant