Skip to content
Snippets Groups Projects
Commit 0908c23c authored by Nathaniel Manista's avatar Nathaniel Manista
Browse files

Expand force_client_auth to old ServerCredentials

parent ee8d6a38
Branches
Tags
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment