
Squid で自己署名証明書を受け入れる必要があるユースケースがあります。エンドポイントは、自己署名証明書を使用する Kubernetes クラスターです。クラスターは、異なる自己署名証明書を使用してオンデマンドで再作成されるため、正規表現、優先方法、またはテスト目的でグローバルに受け入れる必要があります。
現在の Squid バージョンは 6.0.0 で、次のフラグを使用してコンパイルされています。
Squid Cache: Version 6.0.0-VCS
Service Name: squid
This binary uses OpenSSL 1.1.1 11 Sep 2018. For legal restrictions on distribution see https://www.openssl.org/source/license.html
configure options: '--prefix=/apps/squid' '--enable-icap-client' '--enable-ssl' '--with-openssl' '--enable-ssl-crtd' '--enable-security-cert-generators=file' '--enable-au
th' '--with-default-user=proxy'
私のテストでは、ssl_bump 構成と tls_outgoing_options を試しました。
http_port 8080 ssl-bump cert=/apps/squid/etc/ssl_cert/CA_crt.pem key=/apps/squid/etc/ssl_cert/CA_key.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB
sslcrtd_program /apps/squid/libexec/security_file_certgen -s /apps/squid/var/logs/ssl_db -M 4MB
sslcrtd_children 5
ssl_bump bump all
sslproxy_cert_error allow all
tls_outgoing_options options=ALL flags=DONT_VERIFY_PEER,DONT_VERIFY_DOMAIN
しかし、私が達成できる最高の結果は_curl: (51) SSL: no alternative certificate subject name matches target host name
またはssl_bumpなし
http_port 8080 ssl-bump cert=/apps/squid/etc/ssl_cert/CA_crt.pem key=/apps/squid/etc/ssl_cert/CA_key.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB
sslcrtd_program /apps/squid/libexec/security_file_certgen -s /apps/squid/var/logs/ssl_db -M 4MB
sslcrtd_children 5
sslproxy_cert_error allow all
tls_outgoing_options options=ALL flags=DONT_VERIFY_PEER,DONT_VERIFY_DOMAIN
私は得るcurl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to
今日は K8S エンドポイントが必要ですが、明日は他のエンドポイントが必要になる可能性があります。そのため、CN を騙して squid に接続を作成させる必要があるかもしれません。