File tree Expand file tree Collapse file tree
main/java/ai/openclaw/app
test/java/ai/openclaw/app/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -632,7 +632,7 @@ class GatewaySession(
632632
633633 private fun shouldPersistBootstrapHandoffTokens (authSource : GatewayConnectAuthSource ): Boolean {
634634 if (authSource != GatewayConnectAuthSource .BOOTSTRAP_TOKEN ) return false
635- if (isLoopbackGatewayHost (endpoint.host)) return true
635+ if (isLocalCleartextGatewayHost (endpoint.host)) return true
636636 return tls != null
637637 }
638638
@@ -1212,9 +1212,7 @@ class GatewaySession(
12121212 endpoint : GatewayEndpoint ,
12131213 tls : GatewayTlsParams ? ,
12141214 ): Boolean {
1215- if (isLoopbackGatewayHost(endpoint.host)) {
1216- return true
1217- }
1215+ if (isLocalCleartextGatewayHost(endpoint.host)) return true
12181216 return tls?.expectedFingerprint?.trim()?.isNotEmpty() == true
12191217 }
12201218}
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class ConnectionManager(
4444 }
4545
4646 if (isManual) {
47+ if (! manualTlsEnabled && cleartextAllowedHost) return null
4748 if (! stored.isNullOrBlank()) {
4849 return GatewayTlsParams (
4950 required = true ,
@@ -52,7 +53,6 @@ class ConnectionManager(
5253 stableId = stableId,
5354 )
5455 }
55- if (! manualTlsEnabled && cleartextAllowedHost) return null
5656 return GatewayTlsParams (
5757 required = true ,
5858 expectedFingerprint = null ,
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ class ConnectionManagerTest {
123123 }
124124
125125 @Test
126- fun resolveTlsParamsForEndpoint_manualPrivateLanPreservesStoredPin () {
126+ fun resolveTlsParamsForEndpoint_manualPrivateLanCleartextCanOverrideStoredPin () {
127127 val endpoint = GatewayEndpoint .manual(host = " 192.168.1.20" , port = 18789 )
128128
129129 val params =
@@ -133,9 +133,7 @@ class ConnectionManagerTest {
133133 manualTlsEnabled = false ,
134134 )
135135
136- assertEquals(true , params?.required)
137- assertEquals(" pinned" , params?.expectedFingerprint)
138- assertEquals(false , params?.allowTOFU)
136+ assertNull(params)
139137 }
140138
141139 @Test
You can’t perform that action at this time.
0 commit comments