From 2009ee0230922abb0042729d16fb849fe9fa6be5 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Wed, 27 Apr 2016 16:33:05 -0400 Subject: [PATCH] Set gRPC cipher suites sooner in node.js example. While here, also rename OpenSSL to BoringSSL since gRPC Core has switched to that. Fixes #429. --- rpc/documentation/clientusage.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rpc/documentation/clientusage.md b/rpc/documentation/clientusage.md index fd16e84..2030082 100644 --- a/rpc/documentation/clientusage.md +++ b/rpc/documentation/clientusage.md @@ -144,7 +144,7 @@ auto read_file(std::string const& file_path) -> std::string { auto main() -> int { // Before the gRPC native library (gRPC Core) is lazily loaded and - // initialized, an environment variable must be set so OpenSSL is + // initialized, an environment variable must be set so BoringSSL is // configured to use ECDSA TLS certificates (required by btcwallet). setenv("GRPC_SSL_CIPHER_SUITES", "HIGH+ECDSA", 1); @@ -244,7 +244,7 @@ namespace Example static async Task ExampleAsync() { // Before the gRPC native library (gRPC Core) is lazily loaded and initialized, - // an environment variable must be set so OpenSSL is configured to use ECDSA TLS + // an environment variable must be set so BoringSSL is configured to use ECDSA TLS // certificates (required by btcwallet). Environment.SetEnvironmentVariable("GRPC_SSL_CIPHER_SUITES", "HIGH+ECDSA"); @@ -345,6 +345,11 @@ the client project directory, or reference the file from the `btcwallet` project directory. ```JavaScript +// Before the gRPC native library (gRPC Core) is lazily loaded and +// initialized, an environment variable must be set so BoringSSL is +// configured to use ECDSA TLS certificates (required by btcwallet). +process.env['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'; + var fs = require('fs'); var path = require('path'); var os = require('os'); @@ -352,11 +357,6 @@ var grpc = require('grpc'); var protoDescriptor = grpc.load('./api.proto'); var walletrpc = protoDescriptor.walletrpc; -// Before the gRPC native library (gRPC Core) is lazily loaded and -// initialized, an environment variable must be set so OpenSSL is -// configured to use ECDSA TLS certificates (required by btcwallet). -process.env['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'; - var certPath = path.join(process.env.HOME, '.btcwallet', 'rpc.cert'); if (os.platform == 'win32') { certPath = path.join(process.env.LOCALAPPDATA, 'Btcwallet', 'rpc.cert'); @@ -412,7 +412,7 @@ timeout = 1 # seconds def main(): # Before the gRPC native library (gRPC Core) is lazily loaded and - # initialized, an environment variable must be set so OpenSSL is + # initialized, an environment variable must be set so BoringSSL is # configured to use ECDSA TLS certificates (required by btcwallet). os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'