Repository navigation
http3: improving upstream TLS code - #16281
Conversation
Signed-off-by: Alyssa Wilk <[email protected]>
antoniovicente
left a comment
There was a problem hiding this comment.
Looks good. Could you merge upstream/main and resolve conflicts?
| * @return true if the certificate chain is verified, false otherwise. | ||
| */ | ||
| virtual bool verifyCertChain(x509_st& /*leaf_cert*/, stack_st_X509& /*intermediates*/, | ||
| std::string& /*error_details*/) { |
There was a problem hiding this comment.
Should this interface method also be PURE?
There was a problem hiding this comment.
I think it'd be a mess due to the openssl / boringssl requirement. I'll add a comment.
There was a problem hiding this comment.
For that reason, I'm really not a fan of having boring/openssl types in the interface at all. Can we do something to hide the types here?
There was a problem hiding this comment.
I think the other option is to dynanmic cast the interface to the impl over in source/common/quic/envoy_quic_proof_verifier.cc Want me to go that route?
There was a problem hiding this comment.
I think that's probably better. Especially because how these types are declared/defined in boring/openssl is unique.
There was a problem hiding this comment.
I wonder if use of pointers instead of references would play better with test mocks. I see you undid this change in a more recent update, I guess that also works.
Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
| /** | ||
| * Create transport socket factory for Quic upstream transport socket. | ||
| * @param context supplies the port to connect to on localhost. | ||
| * @param san_to_match configs |context| to match Subject Alternative Name during certificate |
There was a problem hiding this comment.
yep. I took out args which no longer existed though didn't add comments for things others had added as it's only a test util.
| * @return true if the certificate chain is verified, false otherwise. | ||
| */ | ||
| virtual bool verifyCertChain(x509_st& /*leaf_cert*/, stack_st_X509& /*intermediates*/, | ||
| std::string& /*error_details*/) { |
There was a problem hiding this comment.
I wonder if use of pointers instead of references would play better with test mocks. I see you undid this change in a more recent update, I guess that also works.
Addressing a TODO for upstream quic crypto. The clientContextConfig looks safe to access, as it does not reload, but QUIC was using the context to create a fresh Tls::ClientContextImpl per connection instead of reusing the factory built shared Ssl::ClientContextSharedPtr. Moving over to the shared pointer means also
Risk Level: low (mostly H3 only)
Testing: n/a (refactor)
Docs Changes: n/a
Release Notes: n/a
part of #15649