grpc / grpc/grpc-java

Support SslMasterKeyHandler in NettyServerBuilder

Offen
#7,199 15 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
enhancement good first issue
Vorherrschende Sprache
Java
Sterne
12.1k
Forks
4k
Ø Merge
2 T. 17 Std.
Gemergte PRs (30 T.)
37

Beschreibung

I have a problem with adding SslMasterKeyHandler#newWireSharkSslMasterKeyHandler on the server side. I tried to do this with channelFactory:
```
builder.channelFactory(() -> {
final ServerChannel ch = GrpcUtil.getDefaultServerChannelFactory().newChannel();
final ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(SslMasterKeyHandler.newWireSharkSslMasterKeyHandler());
return ch;
})
```
and later with ProtocolNegotiator:
```
final SslContext sslContext = GrpcSslContexts.configure(sslClientContextBuilder).build();
final io.grpc.netty.ProtocolNegotiator negotiator = ProtocolNegotiators.serverTls(sslContext);
builder.protocolNegotiator(tlsNegotiator(negotiator);
```

In the first case, the setting had no effect. In the second case, the server worked incorrectly (it stopped accepting connections, even without a handler, just with a negotiator wrapper).

What should be the proper implementation?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.