{"action":"closed","issue":{"url":"https://api.github.com/repos/masaki/p5-LWP-UserAgent-DNS-Hosts/issues/4","repository_url":"https://api.github.com/repos/masaki/p5-LWP-UserAgent-DNS-Hosts","labels_url":"https://api.github.com/repos/masaki/p5-LWP-UserAgent-DNS-Hosts/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/masaki/p5-LWP-UserAgent-DNS-Hosts/issues/4/comments","events_url":"https://api.github.com/repos/masaki/p5-LWP-UserAgent-DNS-Hosts/issues/4/events","html_url":"https://github.com/masaki/p5-LWP-UserAgent-DNS-Hosts/issues/4","id":225127273,"number":4,"title":"https.pm - add SSL_hostname in addition to SSL_verifycn_name","user":{"login":"noxxi","id":302525,"avatar_url":"https://avatars2.githubusercontent.com/u/302525?v=3","gravatar_id":"","url":"https://api.github.com/users/noxxi","html_url":"https://github.com/noxxi","followers_url":"https://api.github.com/users/noxxi/followers","following_url":"https://api.github.com/users/noxxi/following{/other_user}","gists_url":"https://api.github.com/users/noxxi/gists{/gist_id}","starred_url":"https://api.github.com/users/noxxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noxxi/subscriptions","organizations_url":"https://api.github.com/users/noxxi/orgs","repos_url":"https://api.github.com/users/noxxi/repos","events_url":"https://api.github.com/users/noxxi/events{/privacy}","received_events_url":"https://api.github.com/users/noxxi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-28T16:12:31Z","updated_at":"2017-05-01T05:56:55Z","closed_at":"2017-05-01T05:56:55Z","body":"To support setups using the SNI TLS extension it is necessary, that not only the target IP address and hostname used for validation are adapted, but that also the hostname used for SNI gets provided. By default this name gets extracted from the PeerAddr/PeerHost configuration but this is not possible if only an IP address is provided. The following code should probably work (not tested):\r\n\r\n```\r\n12    if (my $peer_addr = LWP::UserAgent::DNS::Hosts->_registered_peer_addr($host)) {\r\n13        push @opts, (\r\n14            PeerAddr          => $peer_addr,\r\n15            Host              => $host,\r\n16            SSL_verifycn_name => $host,\r\n+             SSL_hostname      => $host,   # for SNI\r\n17        );\r\n18    }\r\n```\r\n\r\nSee also https://stackoverflow.com/a/43684553/3081018"}}
{"actor":{"display_login":"masaki"}}