diff options
author | murgatroid99 <mlumish@google.com> | 2015-07-27 16:13:28 -0700 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2015-07-27 16:13:28 -0700 |
commit | 1a7dcac038dfb64ca499847b42f1ccb03849211f (patch) | |
tree | 614542fa24bdb718815e90034219a904e0623b50 /src/node/interop | |
parent | 2aff2b449f22e0eb7995d31a6c137e6a5951d6c6 (diff) |
Made binding a server to a port insecurely explicit
Diffstat (limited to 'src/node/interop')
-rw-r--r-- | src/node/interop/interop_server.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node/interop/interop_server.js b/src/node/interop/interop_server.js index 505c6bb537..ece22cce31 100644 --- a/src/node/interop/interop_server.js +++ b/src/node/interop/interop_server.js @@ -161,7 +161,7 @@ function handleHalfDuplex(call) { function getServer(port, tls) { // TODO(mlumish): enable TLS functionality var options = {}; - var server_creds = null; + var server_creds; if (tls) { var key_path = path.join(__dirname, '../test/data/server1.key'); var pem_path = path.join(__dirname, '../test/data/server1.pem'); @@ -171,6 +171,8 @@ function getServer(port, tls) { server_creds = grpc.ServerCredentials.createSsl(null, key_data, pem_data); + } else { + server_creds = grpc.ServerCredentials.createInsecure(); } var server = new grpc.Server(options); server.addProtoService(testProto.TestService.service, { |