Legal name validation for X500Name (#983)

* * Legal name validation for X500Name while loading from config file.

* * Removed unintended changes.
This commit is contained in:
Patrick Kuo
2017-07-11 12:09:30 +01:00
committed by GitHub
parent d52b0e5db9
commit 7e8de79848
5 changed files with 15 additions and 8 deletions

View File

@ -30,7 +30,7 @@ import java.util.concurrent.atomic.AtomicInteger
class P2PMessagingTest : NodeBasedTest() {
private companion object {
val DISTRIBUTED_SERVICE_NAME = getTestX509Name("DistributedService")
val SERVICE_2_NAME = getTestX509Name("Service Node 2")
val SERVICE_2_NAME = getTestX509Name("Service 2")
}
@Test

View File

@ -30,7 +30,7 @@ class P2PSecurityTest : NodeBasedTest() {
@Test
fun `incorrect legal name for the network map service config`() {
val incorrectNetworkMapName = X509Utilities.getDevX509Name(random63BitValue().toString())
val incorrectNetworkMapName = X509Utilities.getDevX509Name("NetworkMap-${random63BitValue()}")
val node = startNode(BOB.name, configOverrides = mapOf(
"networkMapService" to mapOf(
"address" to networkMapNode.configuration.p2pAddress.toString(),