Catch also NoAddressFoundException from DNS.

The certificate validation might fail on NoAddressFoundException - if the
hostname from certificate could not be translated to IP address.