Merge pull request #2 from derjus/ssl-cert-check

Added basic SSL certificate check
fixing compiler warnings