Skip to content

core,netty: InputStream support in SslContextBuilder #3485

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

Closed
wants to merge 3 commits into from

Conversation

zpencer
Copy link
Contributor

@zpencer zpencer commented Sep 21, 2017

Also update unit tests to stop writing certs to temp files.

Fixes #1881

Also update unit tests to stop writing certs to temp files.

Fixes grpc#1881
* @throws UnsupportedOperationException if the server does not support TLS.
* @since 1.7.0
*/
public abstract T useTransportSecurity(InputStream certChain, InputStream privateKey);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't add new abstract methods to public classes. We need to convert to File or throw.

try {
return configure(SslContextBuilder.forServer(keyCertChain, key));
} finally {
GrpcUtil.closeQuietly(keyCertChain);
Copy link
Member

@ejona86 ejona86 Sep 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally the creator of the InputStream closes (e.g., with try-with-resources). But also this is supposed to act effectively the same as Netty's SslContextBuilder. I don't think we should be closing here.

@zpencer zpencer closed this Oct 20, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants