tls/

directory
v0.0.0-...-7760e95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2020 License: MIT

README

Secure RPC with TLS/SSL

  • Client: Single request
  • Server: Single response
Generate code
protoc -I . --go_out=plugins=grpc:. proto/center.proto
Generate server key and certificate
  • server.key: a private RSA key to sign and authenticate the public key
  • server.crt: self-signed X.509 public keys for distribution
openssl req -new -x509 -days 365 -sha256 -newkey rsa:2048 -nodes \
    -keyout "server.key" -out "server.crt" \
    -subj "/emailAddress=admin@devplayg.com/CN=devplayg.com/OU=Cert/O=Devplayg/L=Pangyo/ST=Sungnam/C=KR"
Run server
go run server/main.go
Run client

Secure

go run client/main.go

Insecure

go run client/main-insecure.go
References

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL