Git Product home page Git Product logo

go-grpc-example's People

Contributors

eddycjy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-grpc-example's Issues

need more documentation(help) on tls client certificates

你好,我是从你的技术博客转过来的,这些示例非常有用。
我是grpc的初学者,使用过基本的grpc的java,python,go客户端编程,服务端代码不熟悉。之前一直用的是plaintext传输,现在想学习tls。但网上没多少有用资料,你的这个算是又精简又可以直接下载运行的,所以非常好。
能不能再帮忙解答以下疑惑(也许你可以加到readme里面):

  1. 我们都知道grpc是基于httpv2的,那么使用Plaintext(比如java建联的时候用usePlaintext)可以与https共用吗?如果可以,https不就已经实现了安全性了吗(grpc不用再写相关代码了)?如果不能共用,那为什么?
  2. 你的代码的simple_server和simple_client我下载运行是成功的,但和网上很多教程一样,你都用了自己签发的证书,所以客户端需要加载相应的证书。那么grpc的tls有可能像我们平时访问https网站的时候,客户端不需要增加额外代码吗(拿python的requests来说,就没任何额外代码,也没要求输入本地证书路径)?如果服务端用的不是自签名证书,而用的权威证书颁发机构的证书,那么客户端的代码应该怎么写?类似的问题我在StackOverflow也看到一个

Go1.15以上,证书需要SANs

client.Search err : rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.