diff options
author | thinkerou <thinkerou@gmail.com> | 2016-06-09 11:57:15 +0800 |
---|---|---|
committer | thinkerou <thinkerou@gmail.com> | 2016-06-17 09:41:04 +0800 |
commit | f3bc3b62a776c34b916c7771177629b4620dbfec (patch) | |
tree | 5361402c84a202dafb831d65ccd8aef1eeea4789 /src/php/lib/Grpc | |
parent | fa9b7c1bc6488be17d18007f45c57dac39ea5b79 (diff) |
Load default roots.pem in PHP via grpc_set_ssl_roots_override_callback
Diffstat (limited to 'src/php/lib/Grpc')
-rwxr-xr-x | src/php/lib/Grpc/BaseStub.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php index 70644fac87..df3fe85d44 100755 --- a/src/php/lib/Grpc/BaseStub.php +++ b/src/php/lib/Grpc/BaseStub.php @@ -56,6 +56,10 @@ class BaseStub */ public function __construct($hostname, $opts, $channel = null) { + $ssl_roots = file_get_contents( + dirname(__FILE__).'/../../../../etc/roots.pem'); + ChannelCredentials::setDefaultRootsPem($ssl_roots); + $this->hostname = $hostname; $this->update_metadata = null; if (isset($opts['update_metadata'])) { |