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

Remove hard-coded fingerprint #55

Merged
merged 1 commit into from
May 17, 2021
Merged

Conversation

lgrahl
Copy link
Contributor

@lgrahl lgrahl commented May 17, 2021

The fingerprint will change from time to time and hard-coding it in this library we cannot forcibly deploy (unlike e.g. the Threema apps) is a surprising footgun since your services may suddenly fail (when Threema changes the fingerprint). As pointed out in #17, hard-coding the fingerprint (over the public key) is also undesirable. Furthermore, we want users to use their custom aiohttp.ClientSession instance. Therefore, we have decided to remove it. If you want to retain this feature, all you have to do is provide your own aiohttp.ClientSession in the following way:

Connection(session=aiohttp.ClientSession(
    connector=aiohttp.TCPConnector(ssl=<fingerprint>)))

See the aiohttp docs for details.

Closes #17
Resolves #54
Resolves #13 (by providing your own SSLContext)

The fingerprint will change from time to time and hard-coding it in this
library we cannot forcibly deploy (unlike e.g. the Threema apps) is a
surprising footgun since your services may suddenly fail (when Threema changes
the fingerprint). As pointed out in #17, hard-coding the fingerprint (over the
public key) is also undesirable. Furthermore, we want users to use their
custom `aiohttp.ClientSession` instance. Therefore, we have decided to remove
it. If you want to retain this feature, all you have to do is provide your own
`aiohttp.ClientSession` in the following way:

    Connection(session=aiohttp.ClientSession(
        connector=aiohttp.TCPConnector(ssl=<fingerprint>)))

See the aiohttp docs for details.

Closes #17
Resolves #13 (by providing your own `SSLContext`)
@lgrahl lgrahl force-pushed the custom-client-and-connector branch from 4a79901 to aaaeb5c Compare May 17, 2021 13:06
@lgrahl lgrahl merged commit 648e865 into master May 17, 2021
@lgrahl lgrahl deleted the custom-client-and-connector branch May 17, 2021 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

https_proxy env is ignored Improve public key pinning Ability to "pin" TLS version and/or ciphers
1 participant