grpc的自用ssl协议证书: 报错
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"
参考: https://www.cnblogs.com/remixnameless/p/14288193.html
在 path中添加 GODEBUG=x509ignoreCN=0 ,重启计算机
windows 的go环境文件在 C:UsersAdministrator.USER-20190427VGAppDataRoaminggo/env 里面
dir, _ := os.UserConfigDir()
fmt.Println("哈哈:",dir) // 打印出的结果 C:UsersAdministrator.USER-20190427VGAppDataRoaming
在go文件总运行
也可以参考这个
https://blog.csdn.net/java_1996/article/details/113915386