-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fixes to Complement's Federation Certificate #69
Conversation
Without this the certificate will not be accepted by peers.
This certificate is not replaced after it has been generated, thus it only lasting 5 hours before expiring is not too helpful.
b01c1ea
to
0808aa0
Compare
Copy from the Complement Room:
|
Perhaps a better solution may be to create a HTTP client that is used for federation requests to homeservers which contains the CA cert (see tls.Config.RootCAs? That way we wouldn't be adding the cert to the host (and wouldn't be littering it with loads of expired certs).
Yeah, I agree. FYI see the discussion in #65 regarding whether to remove the
This sounds worthwhile, though let's make a separate issue for that. |
That sounds reasonable and also helps with implementing an invalid federation endpoint for testing TLS verification. |
@anoadragon453 can you merge this please? |
@kegsay Apologies for the delay. I've been working on and off on some improvements to this PR as discussed above with @valkum. Mainly having Complement verify federation certificates and seeding Complement's federation client with the CA cert instead of needing to add it to the host. Those changes can certainly come in a separate PR though. |
This PR contains two fixes, separated by commit.
Because the longterm CA certificate is not regenerated if it already exists, people will need to clear the old certificates (located in
/tests/ca/
) to generate a new certificate.Note: I think for 1. information is only required for the CA cert, but I've added the same to the ephemeral cert just in case.