mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
This removes an expensive call to X509_STORE_set_default_paths() which was parsing certificates from disk on every TLS connection with custom options. Since we already have all certificates parsed and loaded in memory, we can skip the expensive disk I/O and ASN.1 parsing entirely by directly adding our pre-parsed certificates to the X509_STORE. This eliminates the expensive callstack: - cbs_get_any_asn1_element - CBS_get_any_asn1_element - ASN1_get_object - ... (30+ ASN.1 parsing functions) - X509_STORE_set_default_paths The optimization maintains full compatibility while significantly reducing overhead for TLS connections, especially when using custom CA certificates. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>