Correct construction of anonymous parties

Correct construction of anonymous parties to use the first certificate (the target)
rather than the last (the trust root). Worked because early tests used single certificate
paths, but later work introducing multi-certificate paths reveal it's rather broken.
This commit is contained in:
Ross Nicoll 2017-06-16 13:43:09 +01:00
parent 949879e126
commit 56ad64c524

@ -84,6 +84,6 @@ object TxKeyFlow {
val identity: AnonymousParty) {
constructor(myIdentity: Pair<X509CertificateHolder, CertPath>) : this(myIdentity.second,
myIdentity.first,
AnonymousParty(myIdentity.second.certificates.last().publicKey))
AnonymousParty(myIdentity.second.certificates.first().publicKey))
}
}