Expand force_client_auth to old ServerCredentials

pull/3117/head
Nathaniel Manista 9 years ago
parent ee8d6a381a
commit 0908c23c44
  1. 4
      src/python/grpcio/grpc/_adapter/_intermediary_low.py
  2. 2
      src/python/grpcio/grpc/_adapter/fore.py
  3. 8
      src/python/grpcio/grpc/_links/service.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)

@ -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)

@ -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.

Loading…
Cancel
Save