1) Add support for Wildcard Certificates
2) For Gateway connections compare against gateway host name instead of target host