Created
July 17, 2019 20:13
-
-
Save nleiva/24665663329d9c97027eeff53ee18bb3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Client | |
// ... as in http://bit.ly/go-grpc-tls-ca ... | |
// Server | |
tlsConfig := &tls.Config{ | |
GetCertificate: c.GetCertificate, | |
} | |
s := grpc.NewServer(grpc.Creds(credentials.NewTLS(tlsConfig))) | |
// ... register gRPC services ... | |
if err = s.Serve(lis); err != nil { | |
log.Fatalf("failed to serve: %v", err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment