Skip to content

[FEATURE] Add SSL Certificate Expiry Countdown and Warning Indicators #260

Description

@LovelySharma-dev

Short description

Enhance the SSL Expiry Checker script by displaying the number of days remaining until certificate expiration and highlighting certificates that are close to expiry.

Describe the improvements you would like to make

The current SSL Expiry Checker displays certificate validity dates and issuer information. While useful, users must manually calculate how many days remain before expiration.

The script could automatically:

  • Calculate remaining days until expiration.
  • Display a clear countdown.
  • Highlight certificates expiring soon.
  • Show warning messages for certificates nearing expiration.

Example output:

Certificate expires in 27 days
⚠ Warning: Certificate expires within 30 days

Why is this needed?

System administrators and DevOps engineers often monitor multiple domains and services.

Displaying only the raw expiration date requires manual interpretation and increases the chance of overlooking certificates that are about to expire.

Providing an automatic countdown and warning system would:

  • Improve usability.
  • Reduce operational mistakes.
  • Make the script more suitable for routine monitoring tasks.
  • Provide quicker visibility into certificate health.

How would you implement this?

Possible implementation:

  1. Retrieve the notAfter date from the certificate.
  2. Convert the date into a Unix timestamp.
  3. Compare it with the current timestamp.
  4. Calculate remaining days.
  5. Display status levels such as:
  6. Healthy (>30 days)
  7. Warning (≤30 days)
  8. Critical (≤7 days)

Optionally, add color-coded output to improve readability.

Screenshots for UI changes

No response

How to reproduce

Current behavior:

  1. Run the SSL Expiry Checker script.
  2. Enter a domain name.
  3. Observe that only certificate dates and issuer information are displayed.

Proposed behavior:

  1. Run the SSL Expiry Checker script.
  2. Enter a domain name.
  3. Observe certificate dates, issuer information, remaining days, and warning indicators.

Checklist

  • I have read the contributing guidelines
  • I have checked for duplicate issues
  • I would like to work on a pull request to implement this

Additional information

This enhancement maintains the script's simplicity while providing more actionable information for monitoring and troubleshooting SSL/TLS certificates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions