SSL Certificate Validation

-checks if the certificate is expired or not
-warning can occur based on user settings
This shouldn't be hardcoded. Is there a better way to get the certificates ?