Git Product home page Git Product logo

ssl-cert-check's Introduction

ssl-cert-check

Usage:

  • ./ssl-cert-check <days> <certspec1,certspec2,...>
  • ./ssl-cert-check <days> --list=<FILE>
  • ./ssl-cert-check <days> --glob=<FILE>

This tool will warn you if any of the specified certificates expires in the next <days> days. If the --list mode is used, the file is expected to contain one certspec per line. Similarly, --glob mode expects one certspec per line in the given file, but each line will be evaluated as a wildcard glob pattern. In both cases, lines starting with the character '#' as well as empty lines will be ignored.

Parameters

The first parameter is the number of days to warn in advance for expiring certificates. All following parameters are treated as certificate specifications and can be in one of the following formats:

  • An absolute path to a x509 PEM certificate file
    For example:

    • /etc/apache2/ssl/example.org.pem
  • A file://<path> URI
    For example:

    • file:///etc/apache2/ssl/example.org.pem
  • A ssl://<host>:<port> URI
    For example: * ssl://example.org:443

  • A <proto>://<host>[:<port>] URI, this is the same as ssl://<host>:<proto>.
    The real port number is usually looked up in /etc/services, note that you often need the one with the 's' suffix, like "https", "imaps", etc.
    For example:

  • A <proto>+starttls://<host>[:<port>] URI
    Use the STARTTLS command to start a in-protocol TLS session after opening an unencrypted connection. The openssl s_client needs to support this protocol. At time of this writing, the supported protocols are "smtp", "pop3", "imap", "ftp" and "xmpp".
    For example:

    • imap+starttls://example.org
    • smtp+starttls://example.org:587

Examples

Example for your crontab:

MAILTO=root
6       6    * * *   nobody /usr/local/bin/ssl-cert-check 30 /etc/apache2/ssl/*.crt /etc/ssl/certs/dovecot.pem https://localhost ssl://localhost:465 smtp+starttls://localhost:587

ssl-cert-check's People

Contributors

dnnr avatar mateusza avatar raimue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.