Write a program to print the validity of the SSL certificate in your local Linux server running any web technology (like Apache, Nginx, etc.).
Output format:
-Print validity of expiry date
-Print “CRITICAL” in red color, if your certificate expires within next 15 days
-Print “WARNING” in yellow color, if your certificate expires within next 15 to 30 days
-Print “INFO” in green color, if your certificate doesn’t expire within next 30 days
Based on above program, please write another function which can check SSL cert validity of remote Linux server running any web technology (like Apache, Nginx, etc.).
Output format:
-Print validity of expiry date
-Print “CRITICAL” in red color, if your certificate expires within next 15 days
-Print “WARNING” in yellow color, if your certificate expires within next 15 to 30 days
-Print “INFO” in green color, if your certificate doesn’t expire within next 30 days