From e21d0a34d5eb360fb7b06ba2cd4f137eec529489 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Mon, 5 Aug 2024 19:00:28 +0100 Subject: [PATCH] TLS & httpc: suggested higher limit of max intermediate certs (#701) TLS: raise limit on max intermediate certs to same as OpenSSL Prevents validation error for endpoints presenting a longer certificate chain. Reference: * https://docs.openssl.org/3.3/man3/SSL_CTX_set_verify/#notes --- lib/tesla/adapter/httpc.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tesla/adapter/httpc.ex b/lib/tesla/adapter/httpc.ex index 10b365e7..d074b88a 100644 --- a/lib/tesla/adapter/httpc.ex +++ b/lib/tesla/adapter/httpc.ex @@ -34,7 +34,7 @@ defmodule Tesla.Adapter.Httpc do ssl: [ verify: :verify_peer, cacerts: :public_key.cacerts_get(), - depth: 3, + depth: 100, customize_hostname_check: [ match_fun: :public_key.pkix_verify_hostname_match_fun(:https) ],