Files
2021-09-28 11:47:19 +08:00
..
2021-09-28 11:47:19 +08:00
2021-09-28 11:47:19 +08:00
2021-09-28 11:47:19 +08:00

GRPC

生成proto

    protoc --go_out=plugins=grpc:. *.proto

完整示例:

    protoc --go_out=plugins=grpc,Mfoo/bar.proto=bar,import_prefix=,import_path=foo/bar:. ./*.proto

TLS私钥和公钥

  • TLS私钥和公钥
    • 制作私钥 (.key)
     openssl genrsa -out server.key 2048
    
     openssl ecparam -genkey -name secp384r1 -out server.key
    
      openssl req -new -x509 -sha256 -key server.key -out server.pem -days 3650
    
    Country Name (2 letter code) [AU]:CN
    State or Province Name (full name) [Some-State]:Anhui
    Locality Name (eg, city) []:Hefei
    Organization Name (eg, company) [Internet Widgits Pty Ltd]:IPEACE.ORG.CN
    Organizational Unit Name (eg, section) []:DEVELOPER
    Common Name (e.g. server FQDN or YOUR name) []:TOKYO_HOT.RPC
    Email Address []:email@ipeace.org.cn