Is there a way to make `GrpcClient`s use TLS 1.3 o...
# kotlinx-rpc
m
Is there a way to make `GrpcClient`s use TLS 1.3 only? Our backend does not talk 1.2, so the client's connection attempt is rejected.
👀 1
Example stacktrace:
Copy code
Caused by: javax.net.ssl.SSLProtocolException: Read error: ssl=0xb4000074f8c3aa98: Failure in SSL library, usually a protocol error
error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION (/usr/local/google/home/prb/src/boringssl/ssl/tls_record.cc:594 0xb400007478c66dd8:0x00000001)
	at org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method)
	at org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:567)
	at org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1099)
	at org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1083)
	at org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:880)
	... 26 more
a
Is this jvm or native? Or android?
In principle it can, though I need to check how to configure it
m
The target is an Android application
👀 1
a
Hey! Will this work for you?
-Djdk.tls.client.protocols="TLSv1.3"
https://www.java.com/en/configure_crypto.html
gRPC should pick this up
👀 1
m
It's looking promising! I can confirm that the server starts responding with data after setting this in my application's
onCreate
via
System.setProperty
! Thank you very much
kodee happy 1