Skip to content

Commit c543303

Browse files
authored
fix: Properly suppress log messages after updating to multi-threading support (#98)
1 parent a1b3110 commit c543303

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

kotlin-mbedtls/src/main/kotlin/org/opencoap/ssl/SslConfig.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@ class SslConfig(
189189
if (debugLevel == 1) {
190190
// Introduced in MbedTLS 4.0.0: this log message should be at trace level, not warning
191191
// These should be fixed in the next MbedTLS release of 4.x
192-
if (message?.startsWith("Perform PSA-based ECDH computation") == true) return
193-
if (message?.startsWith("<= mbedtls_ssl_check_record") == true) return
194-
if (message?.startsWith("=> mbedtls_ssl_check_record") == true) return
192+
if (message?.contains("Perform PSA-based ECDH computation") == true) return
193+
if (message?.contains("<= mbedtls_ssl_check_record") == true) return
194+
if (message?.contains("=> mbedtls_ssl_check_record") == true) return
195195

196196
// logs when close notify is received
197-
if (message?.startsWith("mbedtls_ssl_handle_message_type() returned -30848 (-0x7880)") == true) return
198-
if (message?.startsWith("mbedtls_ssl_read_record() returned -30848 (-0x7880)") == true) return
197+
if (message?.contains("mbedtls_ssl_handle_message_type() returned -30848 (-0x7880)") == true) return
198+
if (message?.contains("mbedtls_ssl_read_record() returned -30848 (-0x7880)") == true) return
199199
}
200200

201201
when (debugLevel) {

0 commit comments

Comments
 (0)