Correct ISO country code in names

This commit is contained in:
Ross Nicoll 2017-06-20 16:58:00 +01:00
parent d9d20f2215
commit 19ff72a411
39 changed files with 74 additions and 74 deletions

View File

@ -219,15 +219,15 @@ tasks.withType(Test) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes" directory "./build/nodes"
networkMap "CN=Controller,O=R3,OU=corda,L=London,C=UK" networkMap "CN=Controller,O=R3,OU=corda,L=London,C=GB"
node { node {
name "CN=Controller,O=R3,OU=corda,L=London,C=UK" name "CN=Controller,O=R3,OU=corda,L=London,C=GB"
advertisedServices = ["corda.notary.validating"] advertisedServices = ["corda.notary.validating"]
p2pPort 10002 p2pPort 10002
cordapps = [] cordapps = []
} }
node { node {
name "CN=Bank A,O=R3,OU=corda,L=London,C=UK" name "CN=Bank A,O=R3,OU=corda,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10012 p2pPort 10012
rpcPort 10013 rpcPort 10013
@ -235,7 +235,7 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
cordapps = [] cordapps = []
} }
node { node {
name "CN=Bank B,O=R3,OU=corda,L=London,C=UK" name "CN=Bank B,O=R3,OU=corda,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10007 p2pPort 10007
rpcPort 10008 rpcPort 10008

View File

@ -1,4 +1,4 @@
myLegalName : "CN=Bank A,O=Bank A,L=London,C=UK" myLegalName : "CN=Bank A,O=Bank A,L=London,C=GB"
keyStorePassword : "cordacadevpass" keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass" trustStorePassword : "trustpass"
p2pAddress : "localhost:10002" p2pAddress : "localhost:10002"
@ -7,6 +7,6 @@ webAddress : "localhost:10004"
extraAdvertisedServiceIds : [ "corda.interest_rates" ] extraAdvertisedServiceIds : [ "corda.interest_rates" ]
networkMapService : { networkMapService : {
address : "localhost:10000" address : "localhost:10000"
legalName : "CN=Network Map Service,O=R3,OU=corda,L=London,C=UK" legalName : "CN=Network Map Service,O=R3,OU=corda,L=London,C=GB"
} }
useHTTPS : false useHTTPS : false

View File

@ -1,4 +1,4 @@
myLegalName : "CN=Bank B,O=Bank A,L=London,C=UK" myLegalName : "CN=Bank B,O=Bank A,L=London,C=GB"
keyStorePassword : "cordacadevpass" keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass" trustStorePassword : "trustpass"
p2pAddress : "localhost:10005" p2pAddress : "localhost:10005"
@ -7,6 +7,6 @@ webAddress : "localhost:10007"
extraAdvertisedServiceIds : [ "corda.interest_rates" ] extraAdvertisedServiceIds : [ "corda.interest_rates" ]
networkMapService : { networkMapService : {
address : "localhost:10000" address : "localhost:10000"
legalName : "CN=Network Map Service,O=R3,OU=corda,L=London,C=UK" legalName : "CN=Network Map Service,O=R3,OU=corda,L=London,C=GB"
} }
useHTTPS : false useHTTPS : false

View File

@ -1,4 +1,4 @@
myLegalName : "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" myLegalName : "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
keyStorePassword : "cordacadevpass" keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass" trustStorePassword : "trustpass"
p2pAddress : "localhost:10000" p2pAddress : "localhost:10000"

View File

@ -78,7 +78,7 @@ object X509Utilities {
nameBuilder.addRDN(BCStyle.O, "R3") nameBuilder.addRDN(BCStyle.O, "R3")
nameBuilder.addRDN(BCStyle.OU, "corda") nameBuilder.addRDN(BCStyle.OU, "corda")
nameBuilder.addRDN(BCStyle.L, "London") nameBuilder.addRDN(BCStyle.L, "London")
nameBuilder.addRDN(BCStyle.C, "UK") nameBuilder.addRDN(BCStyle.C, "GB")
return nameBuilder.build() return nameBuilder.build()
} }
@ -280,4 +280,4 @@ enum class CertificateType(val keyUsage: KeyUsage, vararg val purposes: KeyPurpo
TLS(KeyUsage(KeyUsage.digitalSignature or KeyUsage.keyEncipherment or KeyUsage.keyAgreement), KeyPurposeId.id_kp_serverAuth, KeyPurposeId.id_kp_clientAuth, KeyPurposeId.anyExtendedKeyUsage, isCA = false), TLS(KeyUsage(KeyUsage.digitalSignature or KeyUsage.keyEncipherment or KeyUsage.keyAgreement), KeyPurposeId.id_kp_serverAuth, KeyPurposeId.id_kp_clientAuth, KeyPurposeId.anyExtendedKeyUsage, isCA = false),
// TODO: Identity certs should have only limited depth (i.e. 1) CA signing capability, with tight name constraints // TODO: Identity certs should have only limited depth (i.e. 1) CA signing capability, with tight name constraints
IDENTITY(KeyUsage(KeyUsage.digitalSignature or KeyUsage.keyCertSign), KeyPurposeId.id_kp_serverAuth, KeyPurposeId.id_kp_clientAuth, KeyPurposeId.anyExtendedKeyUsage, isCA = true) IDENTITY(KeyUsage(KeyUsage.digitalSignature or KeyUsage.keyCertSign), KeyPurposeId.id_kp_serverAuth, KeyPurposeId.id_kp_clientAuth, KeyPurposeId.anyExtendedKeyUsage, isCA = true)
} }

View File

@ -15,7 +15,7 @@ import java.security.PublicKey
* cryptographic public key primitives into a tree structure. * cryptographic public key primitives into a tree structure.
* *
* For example: Alice has two key pairs (pub1/priv1 and pub2/priv2), and wants to be able to sign transactions with either of them. * For example: Alice has two key pairs (pub1/priv1 and pub2/priv2), and wants to be able to sign transactions with either of them.
* Her advertised [Party] then has a legal X.500 [name] "CN=Alice Corp,O=Alice Corp,L=London,C=UK" and an [owningKey] * Her advertised [Party] then has a legal X.500 [name] "CN=Alice Corp,O=Alice Corp,L=London,C=GB" and an [owningKey]
* "pub1 or pub2". * "pub1 or pub2".
* *
* [Party] is also used for service identities. E.g. Alice may also be running an interest rate oracle on her Corda node, * [Party] is also used for service identities. E.g. Alice may also be running an interest rate oracle on her Corda node,

View File

@ -32,7 +32,7 @@ val DUMMY_MAP: Party get() = Party(X500Name("CN=Network Map Service,O=R3,OU=cord
val DUMMY_BANK_A_KEY: KeyPair by lazy { entropyToKeyPair(BigInteger.valueOf(40)) } val DUMMY_BANK_A_KEY: KeyPair by lazy { entropyToKeyPair(BigInteger.valueOf(40)) }
/** Dummy bank identity for tests and simulations */ /** Dummy bank identity for tests and simulations */
val DUMMY_BANK_A: Party get() = Party(X500Name("CN=Bank A,O=Bank A,L=London,C=UK"), DUMMY_BANK_A_KEY.public) val DUMMY_BANK_A: Party get() = Party(X500Name("CN=Bank A,O=Bank A,L=London,C=GB"), DUMMY_BANK_A_KEY.public)
val DUMMY_BANK_B_KEY: KeyPair by lazy { entropyToKeyPair(BigInteger.valueOf(50)) } val DUMMY_BANK_B_KEY: KeyPair by lazy { entropyToKeyPair(BigInteger.valueOf(50)) }
/** Dummy bank identity for tests and simulations */ /** Dummy bank identity for tests and simulations */
@ -63,7 +63,7 @@ val DUMMY_REGULATOR: Party get() = Party(X500Name("CN=Regulator A,OU=Corda,O=AMF
val DUMMY_CA_KEY: KeyPair by lazy { entropyToKeyPair(BigInteger.valueOf(110)) } val DUMMY_CA_KEY: KeyPair by lazy { entropyToKeyPair(BigInteger.valueOf(110)) }
val DUMMY_CA: CertificateAndKeyPair by lazy { val DUMMY_CA: CertificateAndKeyPair by lazy {
// TODO: Should be identity scheme // TODO: Should be identity scheme
val cert = X509Utilities.createSelfSignedCACertificate(X500Name("CN=Dummy CA,OU=Corda,O=R3 Ltd,L=London,C=UK"), DUMMY_CA_KEY) val cert = X509Utilities.createSelfSignedCACertificate(X500Name("CN=Dummy CA,OU=Corda,O=R3 Ltd,L=London,C=GB"), DUMMY_CA_KEY)
CertificateAndKeyPair(cert, DUMMY_CA_KEY) CertificateAndKeyPair(cert, DUMMY_CA_KEY)
} }

View File

@ -103,7 +103,7 @@ class X509NameConstraintsTest {
} }
assertTrue { assertTrue {
val (keystore, trustStore) = makeKeyStores(X500Name("CN=Bank A TLS, UID=, E=me@email.com, C=UK"), nameConstraints) val (keystore, trustStore) = makeKeyStores(X500Name("CN=Bank A TLS, UID=, E=me@email.com, C=GB"), nameConstraints)
val params = PKIXParameters(trustStore) val params = PKIXParameters(trustStore)
params.isRevocationEnabled = false params.isRevocationEnabled = false
val certPath = certFactory.generateCertPath(keystore.getCertificateChain(X509Utilities.CORDA_CLIENT_TLS).asList()) val certPath = certFactory.generateCertPath(keystore.getCertificateChain(X509Utilities.CORDA_CLIENT_TLS).asList())
@ -112,7 +112,7 @@ class X509NameConstraintsTest {
} }
assertTrue { assertTrue {
val (keystore, trustStore) = makeKeyStores(X500Name("O=Bank A, UID=, E=me@email.com, C=UK"), nameConstraints) val (keystore, trustStore) = makeKeyStores(X500Name("O=Bank A, UID=, E=me@email.com, C=GB"), nameConstraints)
val params = PKIXParameters(trustStore) val params = PKIXParameters(trustStore)
params.isRevocationEnabled = false params.isRevocationEnabled = false
val certPath = certFactory.generateCertPath(keystore.getCertificateChain(X509Utilities.CORDA_CLIENT_TLS).asList()) val certPath = certFactory.generateCertPath(keystore.getCertificateChain(X509Utilities.CORDA_CLIENT_TLS).asList())
@ -121,4 +121,4 @@ class X509NameConstraintsTest {
} }
} }
} }

View File

@ -155,7 +155,7 @@ We use the network map to retrieve information about other nodes on the network:
val allNotaryNodes = networkMap.notaryNodes val allNotaryNodes = networkMap.notaryNodes
val randomNotaryNode = networkMap.getAnyNotary() val randomNotaryNode = networkMap.getAnyNotary()
val alice = networkMap.getNodeByLegalName(X500Name("CN=Alice,O=Alice,L=London,C=UK")) val alice = networkMap.getNodeByLegalName(X500Name("CN=Alice,O=Alice,L=London,C=GB"))
val bob = networkMap.getNodeByLegalIdentityKey(bobsKey) val bob = networkMap.getNodeByLegalIdentityKey(bobsKey)
.. sourcecode:: java .. sourcecode:: java
@ -166,7 +166,7 @@ We use the network map to retrieve information about other nodes on the network:
final List<NodeInfo> allNotaryNodes = networkMap.getNotaryNodes(); final List<NodeInfo> allNotaryNodes = networkMap.getNotaryNodes();
final Party randomNotaryNode = networkMap.getAnyNotary(null); final Party randomNotaryNode = networkMap.getAnyNotary(null);
final NodeInfo alice = networkMap.getNodeByLegalName(new X500Name("CN=Alice,O=Alice,L=London,C=UK")); final NodeInfo alice = networkMap.getNodeByLegalName(new X500Name("CN=Alice,O=Alice,L=London,C=GB"));
final NodeInfo bob = networkMap.getNodeByLegalIdentityKey(bobsKey); final NodeInfo bob = networkMap.getNodeByLegalIdentityKey(bobsKey);
Communication between parties Communication between parties

View File

@ -34,7 +34,7 @@ NetworkMapService plus Simple Notary configuration file.
.. parsed-literal:: .. parsed-literal::
myLegalName : "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" myLegalName : "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
keyStorePassword : "cordacadevpass" keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass" trustStorePassword : "trustpass"
p2pAddress : "localhost:12345" p2pAddress : "localhost:12345"

View File

@ -70,9 +70,9 @@ task integrationTest(type: Test) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes" directory "./build/nodes"
networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
node { node {
name "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" name "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
advertisedServices = ["corda.notary.validating"] advertisedServices = ["corda.notary.validating"]
p2pPort 10002 p2pPort 10002
rpcPort 10003 rpcPort 10003
@ -80,7 +80,7 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
cordapps = [] cordapps = []
} }
node { node {
name "CN=Alice Corp,O=Alice Corp,L=London,C=UK" name "CN=Alice Corp,O=Alice Corp,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10005 p2pPort 10005
rpcPort 10006 rpcPort 10006

View File

@ -1,4 +1,4 @@
myLegalName : "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" myLegalName : "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
keyStorePassword : "cordacadevpass" keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass" trustStorePassword : "trustpass"
p2pAddress : "my-network-map:10000" p2pAddress : "my-network-map:10000"

View File

@ -1,4 +1,4 @@
myLegalName : "CN=Bank A,O=Bank A,L=London,C=UK" myLegalName : "CN=Bank A,O=Bank A,L=London,C=GB"
keyStorePassword : "cordacadevpass" keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass" trustStorePassword : "trustpass"
dataSourceProperties : { dataSourceProperties : {
@ -13,7 +13,7 @@ webAddress : "localhost:10004"
extraAdvertisedServiceIds : [ "corda.interest_rates" ] extraAdvertisedServiceIds : [ "corda.interest_rates" ]
networkMapService : { networkMapService : {
address : "my-network-map:10000" address : "my-network-map:10000"
legalName : "CN=Network Map Service,O=R3,OU=corda,L=London,C=UK" legalName : "CN=Network Map Service,O=R3,OU=corda,L=London,C=GB"
} }
useHTTPS : false useHTTPS : false
rpcUsers : [ rpcUsers : [

View File

@ -1,8 +1,8 @@
myLegalName : "CN=Bank A,O=Bank A,L=London,C=UK" myLegalName : "CN=Bank A,O=Bank A,L=London,C=GB"
p2pAddress : "my-corda-node:10002" p2pAddress : "my-corda-node:10002"
webAddress : "localhost:10003" webAddress : "localhost:10003"
networkMapService : { networkMapService : {
address : "my-network-map:10000" address : "my-network-map:10000"
legalName : "CN=Network Map Service,O=R3,OU=corda,L=London,C=UK" legalName : "CN=Network Map Service,O=R3,OU=corda,L=London,C=GB"
} }
verifierType: "OutOfProcess" verifierType: "OutOfProcess"

View File

@ -21,9 +21,9 @@ nodes - the Controller, and NodeA, NodeB and NodeC:
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) { task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
directory "./build/nodes" directory "./build/nodes"
networkMap "CN=Controller,O=R3,OU=corda,L=London,C=UK" networkMap "CN=Controller,O=R3,OU=corda,L=London,C=GB"
node { node {
name "CN=Controller,O=R3,OU=corda,L=London,C=UK" name "CN=Controller,O=R3,OU=corda,L=London,C=GB"
advertisedServices = ["corda.notary.validating"] advertisedServices = ["corda.notary.validating"]
p2pPort 10002 p2pPort 10002
rpcPort 10003 rpcPort 10003
@ -31,7 +31,7 @@ nodes - the Controller, and NodeA, NodeB and NodeC:
cordapps = [] cordapps = []
} }
node { node {
name "CN=NodeA,O=NodeA,L=London,C=UK" name "CN=NodeA,O=NodeA,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10005 p2pPort 10005
rpcPort 10006 rpcPort 10006
@ -162,14 +162,14 @@ The vaults of Node A and Node B should both display the following output:
- state: - state:
data: data:
value: 99 value: 99
sender: "CN=NodeA,O=NodeA,L=London,C=UK" sender: "CN=NodeA,O=NodeA,L=London,C=GB"
recipient: "CN=NodeB,O=NodeB,L=New York,C=US" recipient: "CN=NodeB,O=NodeB,L=New York,C=US"
contract: contract:
legalContractReference: "559322B95BCF7913E3113962DC3F3CBD71C818C66977721580C045DC41C813A5" legalContractReference: "559322B95BCF7913E3113962DC3F3CBD71C818C66977721580C045DC41C813A5"
participants: participants:
- "CN=NodeA,O=NodeA,L=London,C=UK" - "CN=NodeA,O=NodeA,L=London,C=GB"
- "CN=NodeB,O=NodeB,L=New York,C=US" - "CN=NodeB,O=NodeB,L=New York,C=US"
notary: "CN=Controller,O=R3,OU=corda,L=London,C=UK,OU=corda.notary.validating" notary: "CN=Controller,O=R3,OU=corda,L=London,C=GB,OU=corda.notary.validating"
encumbrance: null encumbrance: null
ref: ref:
txhash: "656A1BF64D5AEEC6F6C944E287F34EF133336F5FC2C5BFB9A0BFAE25E826125F" txhash: "656A1BF64D5AEEC6F6C944E287F34EF133336F5FC2C5BFB9A0BFAE25E826125F"

View File

@ -64,7 +64,7 @@ distinguished names (see RFC 1779 for details on the construction of distinguish
enforced, however it will be in a later milestone. enforced, however it will be in a later milestone.
* "myLegalName" in node configurations will need to be replaced, for example "Bank A" is replaced with * "myLegalName" in node configurations will need to be replaced, for example "Bank A" is replaced with
"CN=Bank A,O=Bank A,L=London,C=UK". Obviously organisation, location and country ("O", "L" and "C" respectively) "CN=Bank A,O=Bank A,L=London,C=GB". Obviously organisation, location and country ("O", "L" and "C" respectively)
must be given values which are appropriate to the node, do not just use these example values. must be given values which are appropriate to the node, do not just use these example values.
* "networkMap" in node configurations must be updated to match any change to the legal name of the network map. * "networkMap" in node configurations must be updated to match any change to the legal name of the network map.
* If you are using mock parties for testing, try to standardise on the ``DUMMY_NOTARY``, ``DUMMY_BANK_A``, etc. provided * If you are using mock parties for testing, try to standardise on the ``DUMMY_NOTARY``, ``DUMMY_BANK_A``, etc. provided

View File

@ -159,9 +159,9 @@ is a three node example;
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes" // The output directory directory "./build/nodes" // The output directory
networkMap "CN=Controller,O=R3,OU=corda,L=London,C=UK" // The distinguished name of the node named here will be used as the networkMapService.address on all other nodes. networkMap "CN=Controller,O=R3,OU=corda,L=London,C=GB" // The distinguished name of the node named here will be used as the networkMapService.address on all other nodes.
node { node {
name "CN=Controller,O=R3,OU=corda,L=London,C=UK" name "CN=Controller,O=R3,OU=corda,L=London,C=GB"
advertisedServices = [ "corda.notary.validating" ] advertisedServices = [ "corda.notary.validating" ]
p2pPort 10002 p2pPort 10002
rpcPort 10003 rpcPort 10003
@ -170,7 +170,7 @@ is a three node example;
cordapps [] cordapps []
} }
node { node {
name "CN=NodeA,O=R3,OU=corda,L=London,C=UK" name "CN=NodeA,O=R3,OU=corda,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10005 p2pPort 10005
rpcPort 10006 rpcPort 10006

View File

@ -68,7 +68,7 @@ Yaml (yet another markup language) is a simple JSON-like way to describe object
that make it helpful for our use case, like a lightweight syntax and support for "bare words" which mean you can that make it helpful for our use case, like a lightweight syntax and support for "bare words" which mean you can
often skip the quotes around strings. Here is an example of how this syntax is used: often skip the quotes around strings. Here is an example of how this syntax is used:
``flow start CashIssue amount: $1000, issueRef: 1234, recipient: "CN=Bank A,O=Bank A,L=London,C=UK", notary: "CN=Notary Service,O=R3,OU=corda,L=London,C=UK"`` ``flow start CashIssue amount: $1000, issueRef: 1234, recipient: "CN=Bank A,O=Bank A,L=London,C=GB", notary: "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"``
This invokes a constructor of a flow with the following prototype in the code: This invokes a constructor of a flow with the following prototype in the code:

View File

@ -125,7 +125,7 @@ In the instructions above the server node permissions are configured programmati
driver(driverDirectory = baseDirectory) { driver(driverDirectory = baseDirectory) {
val user = User("user", "password", permissions = setOf(startFlowPermission<CashFlow>())) val user = User("user", "password", permissions = setOf(startFlowPermission<CashFlow>()))
val node = startNode("CN=Alice Corp,O=Alice Corp,L=London,C=UK", rpcUsers = listOf(user)).get() val node = startNode("CN=Alice Corp,O=Alice Corp,L=London,C=GB", rpcUsers = listOf(user)).get()
When starting a standalone node using a configuration file we must supply the RPC credentials as follows: When starting a standalone node using a configuration file we must supply the RPC credentials as follows:

View File

@ -448,7 +448,7 @@ Navigate to the "create IOU" button at the top left of the page, and enter the I
Order Number: 1 Order Number: 1
Delivery Date: 2018-09-15 Delivery Date: 2018-09-15
City: London City: London
Country Code: UK Country Code: GB
Item name: Wow such item Item name: Wow such item
Item amount: 5 Item amount: 5
@ -776,9 +776,9 @@ like to deploy for testing. See further details below:
task deployNodes(type: com.r3corda.plugins.Cordform, dependsOn: ['jar']) { task deployNodes(type: com.r3corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./kotlin-source/build/nodes" // The output directory. directory "./kotlin-source/build/nodes" // The output directory.
networkMap "CN=Controller,O=R3,OU=corda,L=London,C=UK" // The distinguished name of the node to be used as the network map. networkMap "CN=Controller,O=R3,OU=corda,L=London,C=GB" // The distinguished name of the node to be used as the network map.
node { node {
name "CN=Controller,O=R3,OU=corda,L=London,C=UK" // Distinguished name of node to be deployed. name "CN=Controller,O=R3,OU=corda,L=London,C=GB" // Distinguished name of node to be deployed.
advertisedServices = ["corda.notary.validating"] // A list of services you wish the node to offer. advertisedServices = ["corda.notary.validating"] // A list of services you wish the node to offer.
p2pPort 10002 p2pPort 10002
rpcPort 10003 // Usually 1 higher than the messaging port. rpcPort 10003 // Usually 1 higher than the messaging port.
@ -786,7 +786,7 @@ like to deploy for testing. See further details below:
cordapps = [] // Add package names of CordaApps. cordapps = [] // Add package names of CordaApps.
} }
node { // Create an additional node. node { // Create an additional node.
name "CN=NodeA,O=R3,OU=corda,L=London,C=UK" name "CN=NodeA,O=R3,OU=corda,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10005 p2pPort 10005
rpcPort 10006 rpcPort 10006

View File

@ -209,7 +209,7 @@ infix fun Cash.State.`with deposit`(deposit: PartyAndReference): Cash.State = wi
/** A randomly generated key. */ /** A randomly generated key. */
val DUMMY_CASH_ISSUER_KEY by lazy { entropyToKeyPair(BigInteger.valueOf(10)) } val DUMMY_CASH_ISSUER_KEY by lazy { entropyToKeyPair(BigInteger.valueOf(10)) }
/** A dummy, randomly generated issuer party by the name of "Snake Oil Issuer" */ /** A dummy, randomly generated issuer party by the name of "Snake Oil Issuer" */
val DUMMY_CASH_ISSUER by lazy { Party(X500Name("CN=Snake Oil Issuer,O=R3,OU=corda,L=London,C=UK"), DUMMY_CASH_ISSUER_KEY.public).ref(1) } val DUMMY_CASH_ISSUER by lazy { Party(X500Name("CN=Snake Oil Issuer,O=R3,OU=corda,L=London,C=GB"), DUMMY_CASH_ISSUER_KEY.public).ref(1) }
/** An extension property that lets you write 100.DOLLARS.CASH */ /** An extension property that lets you write 100.DOLLARS.CASH */
val Amount<Currency>.CASH: Cash.State get() = Cash.State(Amount(quantity, Issued(DUMMY_CASH_ISSUER, token)), NULL_PARTY) val Amount<Currency>.CASH: Cash.State get() = Cash.State(Amount(quantity, Issued(DUMMY_CASH_ISSUER, token)), NULL_PARTY)
/** An extension property that lets you get a cash state from an issued token, under the [NULL_PARTY] */ /** An extension property that lets you get a cash state from an issued token, under the [NULL_PARTY] */

View File

@ -726,7 +726,7 @@ infix fun <T : Any> Obligation.State<T>.`issued by`(party: AbstractParty) = copy
/** A randomly generated key. */ /** A randomly generated key. */
val DUMMY_OBLIGATION_ISSUER_KEY by lazy { entropyToKeyPair(BigInteger.valueOf(10)) } val DUMMY_OBLIGATION_ISSUER_KEY by lazy { entropyToKeyPair(BigInteger.valueOf(10)) }
/** A dummy, randomly generated issuer party by the name of "Snake Oil Issuer" */ /** A dummy, randomly generated issuer party by the name of "Snake Oil Issuer" */
val DUMMY_OBLIGATION_ISSUER by lazy { Party(X500Name("CN=Snake Oil Issuer,O=R3,OU=corda,L=London,C=UK"), DUMMY_OBLIGATION_ISSUER_KEY.public) } val DUMMY_OBLIGATION_ISSUER by lazy { Party(X500Name("CN=Snake Oil Issuer,O=R3,OU=corda,L=London,C=GB"), DUMMY_OBLIGATION_ISSUER_KEY.public) }
val Issued<Currency>.OBLIGATION_DEF: Obligation.Terms<Currency> val Issued<Currency>.OBLIGATION_DEF: Obligation.Terms<Currency>
get() = Obligation.Terms(nonEmptySetOf(Cash().legalContractReference), nonEmptySetOf(this), TEST_TX_TIME) get() = Obligation.Terms(nonEmptySetOf(Cash().legalContractReference), nonEmptySetOf(this), TEST_TX_TIME)

View File

@ -22,7 +22,7 @@ import kotlin.test.assertEquals
import kotlin.test.assertFailsWith import kotlin.test.assertFailsWith
class RaftNotaryServiceTests : NodeBasedTest() { class RaftNotaryServiceTests : NodeBasedTest() {
private val notaryName = X500Name("CN=RAFT Notary Service,O=R3,OU=corda,L=London,C=UK") private val notaryName = X500Name("CN=RAFT Notary Service,O=R3,OU=corda,L=London,C=GB")
@Test @Test
fun `detect double spend`() { fun `detect double spend`() {
@ -62,4 +62,4 @@ class RaftNotaryServiceTests : NodeBasedTest() {
StateAndRef(builder.outputStates().first(), StateRef(stx.id, 0)) StateAndRef(builder.outputStates().first(), StateRef(stx.id, 0))
} }
} }
} }

View File

@ -76,7 +76,7 @@ class NotaryChangeTests {
@Test @Test
fun `should throw when a participant refuses to change Notary`() { fun `should throw when a participant refuses to change Notary`() {
val state = issueMultiPartyState(clientNodeA, clientNodeB, oldNotaryNode) val state = issueMultiPartyState(clientNodeA, clientNodeB, oldNotaryNode)
val newEvilNotary = getTestPartyAndCertificate(X500Name("CN=Evil Notary,O=Evil R3,OU=corda,L=London,C=UK"), generateKeyPair().public) val newEvilNotary = getTestPartyAndCertificate(X500Name("CN=Evil Notary,O=Evil R3,OU=corda,L=London,C=GB"), generateKeyPair().public)
val flow = NotaryChangeFlow(state, newEvilNotary.party) val flow = NotaryChangeFlow(state, newEvilNotary.party)
val future = clientNodeA.services.startFlow(flow) val future = clientNodeA.services.startFlow(flow)

View File

@ -60,7 +60,7 @@ class InMemoryIdentityServiceTests {
val service = InMemoryIdentityService(trustRoot = trustRoot.certificate) val service = InMemoryIdentityService(trustRoot = trustRoot.certificate)
service.registerIdentity(ALICE_IDENTITY) service.registerIdentity(ALICE_IDENTITY)
service.registerIdentity(BOB_IDENTITY) service.registerIdentity(BOB_IDENTITY)
val alicente = getTestPartyAndCertificate(X500Name("O=Alicente Worldwide,L=London,C=UK"), generateKeyPair().public) val alicente = getTestPartyAndCertificate(X500Name("O=Alicente Worldwide,L=London,C=GB"), generateKeyPair().public)
service.registerIdentity(alicente) service.registerIdentity(alicente)
assertEquals(setOf(ALICE, alicente.party), service.partiesFromName("Alice", false)) assertEquals(setOf(ALICE, alicente.party), service.partiesFromName("Alice", false))
assertEquals(setOf(ALICE), service.partiesFromName("Alice Corp", true)) assertEquals(setOf(ALICE), service.partiesFromName("Alice Corp", true))
@ -71,7 +71,7 @@ class InMemoryIdentityServiceTests {
fun `get identity by name`() { fun `get identity by name`() {
val service = InMemoryIdentityService(trustRoot = DUMMY_CA.certificate) val service = InMemoryIdentityService(trustRoot = DUMMY_CA.certificate)
val identities = listOf("Node A", "Node B", "Node C") val identities = listOf("Node A", "Node B", "Node C")
.map { getTestPartyAndCertificate(X500Name("CN=$it,O=R3,OU=corda,L=London,C=UK"), generateKeyPair().public) } .map { getTestPartyAndCertificate(X500Name("CN=$it,O=R3,OU=corda,L=London,C=GB"), generateKeyPair().public) }
assertNull(service.partyFromX500Name(identities.first().name)) assertNull(service.partyFromX500Name(identities.first().name))
identities.forEach { service.registerIdentity(it) } identities.forEach { service.registerIdentity(it) }
identities.forEach { assertEquals(it.party, service.partyFromX500Name(it.name)) } identities.forEach { assertEquals(it.party, service.partyFromX500Name(it.name)) }

View File

@ -45,9 +45,9 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
ext.rpcUsers = [['username': "demo", 'password': "demo", 'permissions': ["StartFlow.net.corda.attachmentdemo.AttachmentDemoFlow"]]] ext.rpcUsers = [['username': "demo", 'password': "demo", 'permissions': ["StartFlow.net.corda.attachmentdemo.AttachmentDemoFlow"]]]
directory "./build/nodes" directory "./build/nodes"
networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
node { node {
name "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" name "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
advertisedServices["corda.notary.validating"] advertisedServices["corda.notary.validating"]
p2pPort 10002 p2pPort 10002
rpcPort 10003 rpcPort 10003
@ -55,7 +55,7 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
rpcUsers = ext.rpcUsers rpcUsers = ext.rpcUsers
} }
node { node {
name "CN=Bank A,O=Bank A,L=London,C=UK" name "CN=Bank A,O=Bank A,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10005 p2pPort 10005
rpcPort 10006 rpcPort 10006

View File

@ -66,7 +66,7 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
] ]
} }
node { node {
name "CN=BigCorporation,O=R3,OU=corda,L=London,C=UK" name "CN=BigCorporation,O=R3,OU=corda,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10008 p2pPort 10008
rpcPort 10009 rpcPort 10009

View File

@ -30,7 +30,7 @@ fun main(args: Array<String>) {
val BANK_USERNAME = "bankUser" val BANK_USERNAME = "bankUser"
val BIGCORP_USERNAME = "bigCorpUser" val BIGCORP_USERNAME = "bigCorpUser"
val BIGCORP_LEGAL_NAME = X500Name("CN=BigCorporation,O=R3,OU=corda,L=London,C=UK") val BIGCORP_LEGAL_NAME = X500Name("CN=BigCorporation,O=R3,OU=corda,L=London,C=GB")
private class BankOfCordaDriver { private class BankOfCordaDriver {
enum class Role { enum class Role {

View File

@ -48,9 +48,9 @@ dependencies {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes" directory "./build/nodes"
networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
node { node {
name "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" name "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
advertisedServices = ["corda.notary.validating", "corda.interest_rates"] advertisedServices = ["corda.notary.validating", "corda.interest_rates"]
p2pPort 10002 p2pPort 10002
rpcPort 10003 rpcPort 10003
@ -59,7 +59,7 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
useTestClock true useTestClock true
} }
node { node {
name "CN=Bank A,O=Bank A,L=London,C=UK" name "CN=Bank A,O=Bank A,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10005 p2pPort 10005
rpcPort 10006 rpcPort 10006

View File

@ -2,7 +2,7 @@
define(['utils/dayCountBasisLookup'], (dayCountBasisLookup) => { define(['utils/dayCountBasisLookup'], (dayCountBasisLookup) => {
return { return {
fixedRatePayer: "CN=Bank A,O=Bank A,L=London,C=UK", fixedRatePayer: "CN=Bank A,O=Bank A,L=London,C=GB",
notional: { notional: {
quantity: 2500000000 quantity: 2500000000
}, },

View File

@ -1,6 +1,6 @@
{ {
"fixedLeg": { "fixedLeg": {
"fixedRatePayer": "CN=Bank A,O=Bank A,L=London,C=UK", "fixedRatePayer": "CN=Bank A,O=Bank A,L=London,C=GB",
"notional": "€25000000", "notional": "€25000000",
"paymentFrequency": "SemiAnnual", "paymentFrequency": "SemiAnnual",
"effectiveDate": "2016-03-11", "effectiveDate": "2016-03-11",

View File

@ -51,7 +51,7 @@ class NodeInterestRatesTest {
""".trimIndent()) """.trimIndent())
val DUMMY_CASH_ISSUER_KEY = generateKeyPair() val DUMMY_CASH_ISSUER_KEY = generateKeyPair()
val DUMMY_CASH_ISSUER = Party(X500Name("CN=Cash issuer,O=R3,OU=corda,L=London,C=UK"), DUMMY_CASH_ISSUER_KEY.public) val DUMMY_CASH_ISSUER = Party(X500Name("CN=Cash issuer,O=R3,OU=corda,L=London,C=GB"), DUMMY_CASH_ISSUER_KEY.public)
lateinit var oracle: NodeInterestRates.Oracle lateinit var oracle: NodeInterestRates.Oracle
lateinit var dataSource: Closeable lateinit var dataSource: Closeable

View File

@ -49,7 +49,7 @@ abstract class Simulation(val networkSendManuallyPumped: Boolean,
throw IllegalArgumentException("The latency injector is only useful when using manual pumping.") throw IllegalArgumentException("The latency injector is only useful when using manual pumping.")
} }
val bankLocations = listOf(Pair("London", "UK"), Pair("Frankfurt", "DE"), Pair("Rome", "IT")) val bankLocations = listOf(Pair("London", "GB"), Pair("Frankfurt", "DE"), Pair("Rome", "IT"))
// This puts together a mock network of SimulatedNodes. // This puts together a mock network of SimulatedNodes.

View File

@ -58,15 +58,15 @@ dependencies {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes" directory "./build/nodes"
networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
node { node {
name "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" name "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
advertisedServices = ["corda.notary.validating"] advertisedServices = ["corda.notary.validating"]
p2pPort 10002 p2pPort 10002
cordapps = [] cordapps = []
} }
node { node {
name "CN=Bank A,O=Bank A,L=London,C=UK" name "CN=Bank A,O=Bank A,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10004 p2pPort 10004
webPort 10005 webPort 10005

View File

@ -1,7 +1,7 @@
"use strict"; "use strict";
var FixedLegViewModel = (function () { var FixedLegViewModel = (function () {
function FixedLegViewModel() { function FixedLegViewModel() {
this.fixedRatePayer = "CN=Bank A,O=Bank A,L=London,C=UK"; this.fixedRatePayer = "CN=Bank A,O=Bank A,L=London,C=GB";
this.notional = { this.notional = {
quantity: 2500000000 quantity: 2500000000
}; };

View File

@ -59,15 +59,15 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes" directory "./build/nodes"
// This name "Notary" is hard-coded into TraderDemoClientApi so if you change it here, change it there too. // This name "Notary" is hard-coded into TraderDemoClientApi so if you change it here, change it there too.
// In this demo the node that runs a standalone notary also acts as the network map server. // In this demo the node that runs a standalone notary also acts as the network map server.
networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" networkMap "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
node { node {
name "CN=Notary Service,O=R3,OU=corda,L=London,C=UK" name "CN=Notary Service,O=R3,OU=corda,L=London,C=GB"
advertisedServices = ["corda.notary.validating"] advertisedServices = ["corda.notary.validating"]
p2pPort 10002 p2pPort 10002
cordapps = [] cordapps = []
} }
node { node {
name "CN=Bank A,O=Bank A,L=London,C=UK" name "CN=Bank A,O=Bank A,L=London,C=GB"
advertisedServices = [] advertisedServices = []
p2pPort 10005 p2pPort 10005
rpcPort 10006 rpcPort 10006

View File

@ -15,7 +15,7 @@ import org.bouncycastle.asn1.x500.X500Name
class SimpleMQClient(val target: HostAndPort, class SimpleMQClient(val target: HostAndPort,
override val config: SSLConfiguration? = configureTestSSL(DEFAULT_MQ_LEGAL_NAME)) : ArtemisMessagingComponent() { override val config: SSLConfiguration? = configureTestSSL(DEFAULT_MQ_LEGAL_NAME)) : ArtemisMessagingComponent() {
companion object { companion object {
val DEFAULT_MQ_LEGAL_NAME = X500Name("CN=SimpleMQClient,O=R3,OU=corda,L=London,C=UK") val DEFAULT_MQ_LEGAL_NAME = X500Name("CN=SimpleMQClient,O=R3,OU=corda,L=London,C=GB")
} }
lateinit var sessionFactory: ClientSessionFactory lateinit var sessionFactory: ClientSessionFactory
lateinit var session: ClientSession lateinit var session: ClientSession
@ -42,4 +42,4 @@ class SimpleMQClient(val target: HostAndPort,
// sessionFactory might not have initialised. // sessionFactory might not have initialised.
} }
} }
} }

View File

@ -249,7 +249,7 @@ class NodeConfigTest {
} }
private fun createConfig( private fun createConfig(
legalName: X500Name = X500Name("CN=Unknown,O=R3,OU=corda,L=Nowhere,C=UK"), legalName: X500Name = X500Name("CN=Unknown,O=R3,OU=corda,L=Nowhere,C=GB"),
p2pPort: Int = -1, p2pPort: Int = -1,
rpcPort: Int = -1, rpcPort: Int = -1,
webPort: Int = -1, webPort: Int = -1,

View File

@ -79,7 +79,7 @@ class ExplorerSimulation(val options: OptionSet) {
val bob = startNode(BOB.name, rpcUsers = arrayListOf(user), val bob = startNode(BOB.name, rpcUsers = arrayListOf(user),
advertisedServices = setOf(ServiceInfo(ServiceType.corda.getSubType("cash"))), advertisedServices = setOf(ServiceInfo(ServiceType.corda.getSubType("cash"))),
customOverrides = mapOf("nearestCity" to "Madrid")) customOverrides = mapOf("nearestCity" to "Madrid"))
val ukBankName = X500Name("CN=UK Bank Plc,O=UK Bank Plc,L=London,C=UK") val ukBankName = X500Name("CN=UK Bank Plc,O=UK Bank Plc,L=London,C=GB")
val usaBankName = X500Name("CN=USA Bank Corp,O=USA Bank Corp,L=New York,C=USA") val usaBankName = X500Name("CN=USA Bank Corp,O=USA Bank Corp,L=New York,C=USA")
val issuerGBP = startNode(ukBankName, rpcUsers = arrayListOf(manager), val issuerGBP = startNode(ukBankName, rpcUsers = arrayListOf(manager),
advertisedServices = setOf(ServiceInfo(ServiceType.corda.getSubType("issuer.GBP"))), advertisedServices = setOf(ServiceInfo(ServiceType.corda.getSubType("issuer.GBP"))),