Not sure what exactly is the concern: 1. if you're concerned that you need a PEM + KEY file pair instead of using PFX (which is what ASP.NET core uses when starting a secure server), then please note that these formats are interchangeable and you can convert them back and forth (e.g. using the openssl command line tool - see https://github.com/grpc/grpc-dotnet/blob/master/testassets/Certs/InteropTests/README.md). So this shouldn't really be limiting for you. 2. If you're concerned that you need a certificate and a private key at all to setup a secure server, then note that this is simply required by TLS. You cannot have a secure server that doesn't have a cert/private key, because otherwise it wouldn't be able to prove its identity to the client. If this is a problem for you, you'll have to use an insecure server (regardless of what framework you're using).
On Monday, June 15, 2020 at 6:05:46 AM UTC+2 [email protected] wrote: > While we want to move to .net core in the future, we would like to use > grpc with .net framework. However this needs PEM file during service start, > is there any workaround/solution that doesn't need PEM file? Also, why does > gRPC with .Net core not require the PEM file and why is PEM file only > needed when using gRPC with .Net framework? > SslServerCredentials sslServerCredentials = new > SslServerCredentials(new List<KeyCertificatePair>() { new > KeyCertificatePair(certificatePem, certificateKey) }, null, false); > Grpc.Core.Server server = new Grpc.Core.Server > { > Services = { service.BindService(new Server()) }, > Ports = { new ServerPort(server.Host, server.Port, > sslServerCredentials) } > }; > server.Start(); > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/42f9bb5c-f2c1-4f8c-b7c8-7c2e3edd08d7n%40googlegroups.com.
