forked from threemarb/threema
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make static certificate pinning optional
WHY: I chatted with Threema developers and one of them discouraged me from implementing static certificate pinning because they have no workflow to inform developers of upcoming changes to their HTTPS certificates. So that's why we have at least * get rid of the hardcoded HTTPS fingerprint, because it's unmaintainable * disable static certificate pinning by default Nevertheless, @rugk writes that static certificate pinning is a useful feature and does not suffer from the problems of HTTP public key pinning, see: https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning So I changed the source code in such a way that it's still possible to configure the used HTTP client for certificate pinning as it used to be. This commit includes a refactoring: DRY the threema client by passing a reference to `threema` instance. Thus, the client does not have to remember it's own `private_key`, `api_identity` and `api_secret`. Less redundancy, less errors. Fix threemarb#19
- Loading branch information
1 parent
286b223
commit b5d9b3f
Showing
6 changed files
with
100 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters