Skip to content

Commit 2f34b16

Browse files
gaugfatherMatthew Nesbit
authored and
Matthew Nesbit
committed
Fix to allow equality of hostname (corda#3381)
* Fix to allow equality of hostname * Remove unreliable require test per pull 3381 * Remove unreliable require test per pull 3381
1 parent ed3944c commit 2f34b16

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/AMQPChannelHandler.kt

+2-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,8 @@ internal class AMQPChannelHandler(private val serverMode: Boolean,
171171
// Transfers application packet into the AMQP engine.
172172
is SendableMessageImpl -> {
173173
val inetAddress = InetSocketAddress(msg.destinationLink.host, msg.destinationLink.port)
174-
require(inetAddress == remoteAddress) {
175-
"Message for incorrect endpoint $inetAddress expected $remoteAddress"
176-
}
174+
logDebugWithMDC { "Message for endpoint $inetAddress , expected $remoteAddress "}
175+
177176
require(CordaX500Name.parse(msg.destinationLegalName) == CordaX500Name.build(remoteCert!!.subjectX500Principal)) {
178177
"Message for incorrect legal identity ${msg.destinationLegalName} expected ${remoteCert!!.subjectX500Principal}"
179178
}

0 commit comments

Comments
 (0)