nvflare.fuel.f3.drivers.net_utils module¶
- enhance_credential_info(params: dict)[source]¶
Enhance the params by loading additional cert and key from the folder that contains the CA cert.
This is necessary because the params initially only contains basic credentials: - for server, only CA cert, and the server’s cert and key; - for client, only CA cert, the client’s cert and key.
However, a client could also behave like a server for other processes, and could have a server cert as well. This function loads all certs and keys, regardless the role of the process.
- Parameters:
params – the dict that contains initial credentials
Returns: None
- get_tcp_urls(scheme: str, resources: dict) -> (<class 'str'>, <class 'str'>)[source]¶
Generate URL pairs for connecting and listening for TCP-based protocols
- Parameters:
scheme – The transport scheme
resources – The resource restrictions like port ranges
- Returns:
a tuple with connecting and listening URL
- Raises:
CommError – If any error happens while sending the request