More validation for SSL certificates

Updated the SSL certificate validation to check for expired certificates. Also changed the IP address in test program to connect to localhost.