ENT-5140: Tighten network parameters checks (#6390)

* ENT-5140: Tighten network parameters checks
This commit is contained in:
Ryan Fowler 2020-07-20 11:26:27 +01:00 committed by GitHub
parent 3721b7c701
commit d4444e520a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,7 @@ class NetworkParametersReader(private val trustRoot: X509Certificate,
logger.info("No network-parameters file found. Expecting network parameters to be available from the network map.")
networkMapClient ?: throw Error.NetworkMapNotConfigured()
val signedParams = networkMapClient.getNetworkParameters(parametersHash)
signedParams.verifiedNetworkParametersCert(trustRoot)
signedParams.serialize().open().copyTo(baseDirectory / NETWORK_PARAMS_FILE_NAME)
return signedParams
}