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

Re-introduce (but discourage) withSslContext #979

Merged
merged 2 commits into from
May 29, 2020

Conversation

raboof
Copy link
Member

@raboof raboof commented May 22, 2020

Refs #978

builder.sslContext((tm match {
case None => context
case Some(trustManager) => context.trustManager(trustManager)
}).build())
Copy link
Member

Choose a reason for hiding this comment

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

Hm, this gives precedence to SSLContext over TrustManager. I naïvely expected the opposite would be preferred but I have no argument backing the idea.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll throw an error when both are set.

@raboof raboof requested a review from ignasi35 May 26, 2020 15:11
@raboof raboof merged commit 4050af0 into akka:master May 29, 2020
dwhjames added a commit to dwhjames/akka-grpc that referenced this pull request Aug 3, 2022
Inserting a JDK `javax.net.ssl.SSLContext` into Netty originated in commit
https://github.com/richdougherty/akka-grpc/blob/aa05239c6cddcb20dfa0770e8e8e7649e3bbaaef/runtime/src/main/scala/akka/grpc/internal/NettyClientUtils.scala#L59-L82
in PR akka#266

It was removed in PR akka#964
to address Issue akka#946

It was returned in PR akka#979
to address Issue akka#978

---

Original comment was
```scala
    // FIXME: Create a JdkSslContext using a normal constructor. Need to work out sensible values for all args first.
    // In the meantime, use a Netty SslContextBuild to create a JdkSslContext, then use reflection to patch the
    // object's internal SSLContext. It's not pretty, but it gets something working for now.
```

---

This commit addresses the original `FIXME` comment, and avoids using
deprecated constructors on `io.grpc.netty.shaded.io.netty.handler.ssl.JdkSslContext`
raboof pushed a commit that referenced this pull request Aug 22, 2022
Inserting a JDK `javax.net.ssl.SSLContext` into Netty originated in commit
https://github.com/richdougherty/akka-grpc/blob/aa05239c6cddcb20dfa0770e8e8e7649e3bbaaef/runtime/src/main/scala/akka/grpc/internal/NettyClientUtils.scala#L59-L82
in PR #266

It was removed in PR #964
to address Issue #946

It was returned in PR #979
to address Issue #978

---

Original comment was
```scala
    // FIXME: Create a JdkSslContext using a normal constructor. Need to work out sensible values for all args first.
    // In the meantime, use a Netty SslContextBuild to create a JdkSslContext, then use reflection to patch the
    // object's internal SSLContext. It's not pretty, but it gets something working for now.
```

---

This commit addresses the original `FIXME` comment, and avoids using
deprecated constructors on `io.grpc.netty.shaded.io.netty.handler.ssl.JdkSslContext`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants