diff options
author | murgatroid99 <mlumish@google.com> | 2015-03-02 17:28:02 -0800 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2015-03-02 17:31:25 -0800 |
commit | da02a67e0551228e5ecd2055c116310edd0aa202 (patch) | |
tree | dd875d1f69e8149b3b65d8752e29934b280654d3 /src/node/interop | |
parent | 22176cbbf89aeef3128d4e01bc51014e11e3e28a (diff) |
Updated Node library to new secure server API
Diffstat (limited to 'src/node/interop')
-rw-r--r-- | src/node/interop/interop_server.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/node/interop/interop_server.js b/src/node/interop/interop_server.js index 125ede1746..8e5c03666f 100644 --- a/src/node/interop/interop_server.js +++ b/src/node/interop/interop_server.js @@ -165,16 +165,16 @@ function handleHalfDuplex(call) { function getServer(port, tls) { // TODO(mlumish): enable TLS functionality var options = {}; + var server_creds = null; if (tls) { var key_path = path.join(__dirname, '../test/data/server1.key'); var pem_path = path.join(__dirname, '../test/data/server1.pem'); var key_data = fs.readFileSync(key_path); var pem_data = fs.readFileSync(pem_path); - var server_creds = grpc.ServerCredentials.createSsl(null, - key_data, - pem_data); - options.credentials = server_creds; + server_creds = grpc.ServerCredentials.createSsl(null, + key_data, + pem_data); } var server = new Server({ 'grpc.testing.TestService' : { @@ -186,7 +186,7 @@ function getServer(port, tls) { halfDuplexCall: handleHalfDuplex } }, null, options); - var port_num = server.bind('0.0.0.0:' + port, tls); + var port_num = server.bind('0.0.0.0:' + port, server_creds); return {server: server, port: port_num}; } |