Open addame2 opened 1 month ago
There's not currently a way to specify which TLS version to use, however this is something that I believe is already implemented in the version 2 branch (currently on hold).
It is also worth noting that Isahc uses libcurl, and not the curl
command, so in a way, Isahc and the curl
command are both equally consumers of libcurl.
It could very well be just differences in which libcurl version is being used. Isahc by default uses a bundled libcurl and not the one installed on your system. I would check to see which versions of libcurl are being used in both places. You can see the libcurl version used by Isahc by checking the return value of version
.
You can also disable the static-curl
default crate feature to get Isahc to link to your system-wide libcurl, which might behave more similarly to the curl
command.
@sagebind thanks for quick reply
Isahc version: isahc/1.7.2 (features:default,encoding-rs,http2,mime,static-curl,text-decoding) libcurl/8.9.0-DEV SecureTransport zlib/1.2.12 nghttp2/1.61.0
but I will run my code in Docker so it more important my docker will run TLS 1.3 then on my MacBook
how I can disable the static-curl
?
I have try this
isahc = { version = "1.7.2", default-features = false, features = ["http2", "mime", "text-decoding"] }
still same
thanks this WORK
isahc = { version = "1.7.2", default-features = false, features = ["http2", "mime", "text-decoding"] }
[2024-10-08 09:04:43][DEBUG] ALPN: curl offers h2,http/1.1
[2024-10-08 09:04:43][DEBUG] CAfile: /etc/ssl/cert.pem
[2024-10-08 09:04:43][DEBUG] CApath: none
[2024-10-08 09:04:43][DEBUG] (304) (OUT), TLS handshake, Client hello (1):
[2024-10-08 09:04:45][DEBUG] (304) (IN), TLS handshake, Server hello (2):
[2024-10-08 09:04:45][DEBUG] (304) (IN), TLS handshake, Unknown (8):
[2024-10-08 09:04:45][DEBUG] (304) (IN), TLS handshake, Certificate (11):
[2024-10-08 09:04:45][DEBUG] (304) (IN), TLS handshake, CERT verify (15):
[2024-10-08 09:04:45][DEBUG] (304) (IN), TLS handshake, Finished (20):
[2024-10-08 09:04:45][DEBUG] (304) (OUT), TLS handshake, Finished (20):
[2024-10-08 09:04:45][DEBUG] SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
[2024-10-08 09:04:45][DEBUG] ALPN: server accepted h2
[2024-10-08 09:04:45][DEBUG] Server certificate:
[2024-10-08 09:04:45][DEBUG] start date: Feb 24 00:00:00 2024 GMT
[2024-10-08 09:04:45][DEBUG] expire date: Feb 25 23:59:59 2025 GMT
[2024-10-08 09:04:45][DEBUG] subjectAltName: host "global.com" matched cert's "*.global.com"
[2024-10-08 09:04:45][DEBUG] issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=GTrust TLS RSA CA G1
[2024-10-08 09:04:45][DEBUG] SSL certificate verify ok.
[2024-10-08 09:04:45][DEBUG] using HTTP/2
for docker do I need to add something ?
SSL connection should be this SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / x25519 / RSASSA-PSS
but I am getting this SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
@sagebind can you help me little bit confuse
SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
When i use this lib i can see it veoonectign with TLS 1.2 here is logs
but when i use pure Command::new("curl") i can see it useing http2 and TLSv1.3
here I my current code