-
Notifications
You must be signed in to change notification settings - Fork 3.9k
core, netty: allow InputStream based certs #4316
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
Conversation
Allow ServerBuilder to read certs from InputStream, not just from a File.
/me runs over to compare to a branch I was working on https://github.com/ejona86/grpc-java/commits/security-inputstream, which I got pulled in via #1791 (comment) 😄 This seems fine, and appears to be a subset of what I was working on, since I was more focused on cleaning up the current test references. I want to look at the TlsTest a little bit. |
BTW: I also tracked the InputStreams through SslContextBuilder.forServer() (and similar) and verified that the methods take on the responsibility of closing the InputStream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General changes seem fine. But the test seems unhelpful.
*/ | ||
@Test | ||
public void basicClientServerIntegrationTestInputStreamCerts() throws Exception { | ||
InputStream serverCertChain = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these InputStreams are passed to our code. This test is not adding any value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These assigned to on lines 193/194 , 218/219 and used immediately after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only see them passed to SslContextBuilder
. That's Netty code, not gRPC code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I will remove the test.
@@ -37,7 +37,9 @@ | |||
import io.netty.handler.ssl.SslContextBuilder; | |||
import io.netty.handler.ssl.SslProvider; | |||
import java.io.File; | |||
import java.io.FileInputStream; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert changes to this file.
Allow ServerBuilder to read certs from InputStream, not just from a
File.
This PR revives #1881