1) Add support for Wildcard Certificates
2) For Gateway connections compare against gateway host name instead of target host
Using the more efficient code for comparing host names
Fixed a possible buffer overflow issue
Merge pull request #1297 from ccpp/master

Improve Certificate Checking (Add support for wildcard certificates and check against RDP gateway hostname)