mirror of
https://github.com/corda/corda.git
synced 2025-02-20 09:26:41 +00:00
Fix to allow equality of hostname (#3381)
* Fix to allow equality of hostname * Remove unreliable require test per pull 3381 * Remove unreliable require test per pull 3381
This commit is contained in:
parent
ed3944c546
commit
2f34b16b07
@ -171,9 +171,8 @@ internal class AMQPChannelHandler(private val serverMode: Boolean,
|
||||
// Transfers application packet into the AMQP engine.
|
||||
is SendableMessageImpl -> {
|
||||
val inetAddress = InetSocketAddress(msg.destinationLink.host, msg.destinationLink.port)
|
||||
require(inetAddress == remoteAddress) {
|
||||
"Message for incorrect endpoint $inetAddress expected $remoteAddress"
|
||||
}
|
||||
logDebugWithMDC { "Message for endpoint $inetAddress , expected $remoteAddress "}
|
||||
|
||||
require(CordaX500Name.parse(msg.destinationLegalName) == CordaX500Name.build(remoteCert!!.subjectX500Principal)) {
|
||||
"Message for incorrect legal identity ${msg.destinationLegalName} expected ${remoteCert!!.subjectX500Principal}"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user