diff options
author | Masood Malekghassemi <soltanmm@users.noreply.github.com> | 2015-08-28 11:06:52 -0400 |
---|---|---|
committer | Masood Malekghassemi <soltanmm@users.noreply.github.com> | 2015-08-28 11:06:52 -0400 |
commit | 400e0cdd321fbec7311d58d9e407c2426490eb69 (patch) | |
tree | c4671059c38c8dc8d5d41b054b40e904a2009c79 | |
parent | 89a333053c44d2e3f105c341f4889ea70ff57591 (diff) | |
parent | 0908c23c442f0fdf586dae064ad9adf551e4f028 (diff) |
Merge pull request #3117 from nathanielmanistaatgoogle/force-client-auth
Expand force_client_auth to old ServerCredentials
-rw-r--r-- | src/python/grpcio/grpc/_adapter/_intermediary_low.py | 4 | ||||
-rw-r--r-- | src/python/grpcio/grpc/_adapter/fore.py | 2 | ||||
-rw-r--r-- | src/python/grpcio/grpc/_links/service.py | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/python/grpcio/grpc/_adapter/_intermediary_low.py b/src/python/grpcio/grpc/_adapter/_intermediary_low.py index 1fb6a2b27d..06358e72bc 100644 --- a/src/python/grpcio/grpc/_adapter/_intermediary_low.py +++ b/src/python/grpcio/grpc/_adapter/_intermediary_low.py @@ -255,6 +255,6 @@ class ClientCredentials(object): class ServerCredentials(object): """Adapter from old _low.ServerCredentials interface to new _low.ServerCredentials.""" - def __init__(self, root_credentials, pair_sequence): + def __init__(self, root_credentials, pair_sequence, force_client_auth): self._internal = _low.ServerCredentials.ssl( - root_credentials, list(pair_sequence), False) + root_credentials, list(pair_sequence), force_client_auth) diff --git a/src/python/grpcio/grpc/_adapter/fore.py b/src/python/grpcio/grpc/_adapter/fore.py index 7d88bda263..daa41e8bde 100644 --- a/src/python/grpcio/grpc/_adapter/fore.py +++ b/src/python/grpcio/grpc/_adapter/fore.py @@ -288,7 +288,7 @@ class ForeLink(base_interfaces.ForeLink, activated.Activated): self._port = self._server.add_http2_addr(address) else: server_credentials = _low.ServerCredentials( - self._root_certificates, self._key_chain_pairs) + self._root_certificates, self._key_chain_pairs, False) self._server = _low.Server(self._completion_queue) self._port = self._server.add_secure_http2_addr( address, server_credentials) diff --git a/src/python/grpcio/grpc/_links/service.py b/src/python/grpcio/grpc/_links/service.py index 43c4c0e80c..10634e43b5 100644 --- a/src/python/grpcio/grpc/_links/service.py +++ b/src/python/grpcio/grpc/_links/service.py @@ -366,10 +366,10 @@ class ServiceLink(links.Link): """Adds a port on which to service RPCs after this link has been started. Args: - port: The port on which to service RPCs, or zero to request that a port be - automatically selected and used. - server_credentials: A ServerCredentials object, or None for insecure - service. + port: The port on which to service RPCs, or zero to request that a port + be automatically selected and used. + server_credentials: An _intermediary_low.ServerCredentials object, or + None for insecure service. Returns: A port on which RPCs will be serviced after this link has been started. |