[prober/tcp] get servername for TLS from target (#231)
authorTobias Hintze <thz@users.noreply.github.com>
Wed, 20 Sep 2017 10:22:49 +0000 (12:22 +0200)
committerBrian Brazil <brian.brazil@robustperception.io>
Wed, 20 Sep 2017 10:22:49 +0000 (11:22 +0100)
commit3f69b389ad9fa9529b233470f78d09783ea945ab
tree6478dc0033aea6d10833fdf569afa5a2adacd511
parentf89dab2d859a69f13faa02b783b98bf202059c4a
[prober/tcp] get servername for TLS from target (#231)

Because dialTCP manually resolves name to IP, the
actual tls.DialWithDialer call cannot deduce the name
from the target. This changes puts the "lost" name
into tlsConfig to fix certficate name verification.
Tests are also added which fail without and succeed
with this change.
example.yml
prober/tcp.go
prober/tcp_test.go
prober/utils_test.go