mirror of
https://github.com/corda/corda.git
synced 2025-06-11 20:01:46 +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:
committed by
Matthew Nesbit
parent
ed3944c546
commit
2f34b16b07
@ -171,9 +171,8 @@ internal class AMQPChannelHandler(private val serverMode: Boolean,
|
|||||||
// Transfers application packet into the AMQP engine.
|
// Transfers application packet into the AMQP engine.
|
||||||
is SendableMessageImpl -> {
|
is SendableMessageImpl -> {
|
||||||
val inetAddress = InetSocketAddress(msg.destinationLink.host, msg.destinationLink.port)
|
val inetAddress = InetSocketAddress(msg.destinationLink.host, msg.destinationLink.port)
|
||||||
require(inetAddress == remoteAddress) {
|
logDebugWithMDC { "Message for endpoint $inetAddress , expected $remoteAddress "}
|
||||||
"Message for incorrect endpoint $inetAddress expected $remoteAddress"
|
|
||||||
}
|
|
||||||
require(CordaX500Name.parse(msg.destinationLegalName) == CordaX500Name.build(remoteCert!!.subjectX500Principal)) {
|
require(CordaX500Name.parse(msg.destinationLegalName) == CordaX500Name.build(remoteCert!!.subjectX500Principal)) {
|
||||||
"Message for incorrect legal identity ${msg.destinationLegalName} expected ${remoteCert!!.subjectX500Principal}"
|
"Message for incorrect legal identity ${msg.destinationLegalName} expected ${remoteCert!!.subjectX500Principal}"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user