diff --git a/package.json b/package.json index c624c45107e..54efb69b042 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "src/core", "test/proto", "include", + "etc", "binding.gyp" ], "main": "src/node/index.js", diff --git a/src/node/index.js b/src/node/index.js index 591d9dd9155..0d1a7fd887b 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -33,6 +33,14 @@ 'use strict'; +var path = require('path'); + +var SSL_ROOTS_PATH = path.resolve(__dirname, '..', '..', 'etc', 'roots.pem'); + +if (!process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH) { + process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH = SSL_ROOTS_PATH; +} + var _ = require('lodash'); var ProtoBuf = require('protobufjs');