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

Support TLS certificate validation #49

Open
Abb4d0n opened this issue Aug 6, 2022 · 2 comments
Open

Support TLS certificate validation #49

Abb4d0n opened this issue Aug 6, 2022 · 2 comments

Comments

@Abb4d0n
Copy link

Abb4d0n commented Aug 6, 2022

Currently, the TLS certificate of the FritzBox is not validated, which makes the library vulnerable to machine-in-the-middle attacks.

It would be better to support some kind of certificate pinning by comparing the hash of the FritzBox's certificate with the provided hash.
Another solution would be to compare the fingerprint of the certificate with the provided fingerprint.

@kaklakariada
Copy link
Owner

@Abb4d0n Thank you for your proposal! OkHttp (the HTTP client we use) supports certificate pinning, but only for non-self-signed certificates (see https://square.github.io/okhttp/4.x/okhttp/okhttp3/-certificate-pinner/#note-about-self-signed-certificates).

I am thinking about migrating from OkHttp to the HTTP client included in JDK 11. Then I will revisit your proposal.

@kaklakariada
Copy link
Owner

Blocked by #51

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

No branches or pull requests

2 participants