|
|
@ -213,8 +213,11 @@ void RunServer() { |
|
|
|
builder.RegisterService(&service); |
|
|
|
builder.RegisterService(&service); |
|
|
|
std::shared_ptr<ServerCredentials> creds = grpc::InsecureServerCredentials(); |
|
|
|
std::shared_ptr<ServerCredentials> creds = grpc::InsecureServerCredentials(); |
|
|
|
if (FLAGS_enable_ssl) { |
|
|
|
if (FLAGS_enable_ssl) { |
|
|
|
SslServerCredentialsOptions ssl_opts = { |
|
|
|
SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key, |
|
|
|
"", {{test_server1_key, test_server1_cert}}}; |
|
|
|
test_server1_cert}; |
|
|
|
|
|
|
|
SslServerCredentialsOptions ssl_opts; |
|
|
|
|
|
|
|
ssl_opts.pem_root_certs = ""; |
|
|
|
|
|
|
|
ssl_opts.pem_key_cert_pairs.push_back(pkcp); |
|
|
|
creds = grpc::SslServerCredentials(ssl_opts); |
|
|
|
creds = grpc::SslServerCredentials(ssl_opts); |
|
|
|
} |
|
|
|
} |
|
|
|
builder.AddListeningPort(server_address.str(), creds); |
|
|
|
builder.AddListeningPort(server_address.str(), creds); |
|
|
|