From: jcain@... Date: 2021-03-31T17:24:37+00:00 Subject: [ruby-core:103129] [Ruby master Bug#17766] Net::HTTP verify_callback is called three times when opening a connection Issue #17766 has been reported by jecain (Jim Cain). ---------------------------------------- Bug #17766: Net::HTTP verify_callback is called three times when opening a connection https://bugs.ruby-lang.org/issues/17766 * Author: jecain (Jim Cain) * Status: Open * Priority: Normal * ruby -v: 2.7.2 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- I've noticed that verify_callback is called three times when opening a connection. Here is an example: (Change "localhost" to whatever host can receive an HTTPS connection.) ``` ruby -e 'require "net/http"; Net::HTTP.start("localhost", 443, nil, nil, nil, nil, use_ssl: true, verify_callback: ->(v,s){puts "verify_callback"; true}) {}' ``` The output: ``` verify_callback verify_callback verify_callback ``` This requires awkwardness in the callback to account for the multiple calls per single connection. -- https://bugs.ruby-lang.org/ Unsubscribe: