Code Monkey home page Code Monkey logo

ssl_cert_check's Introduction

ssl_cert_check

c++ https ssl certificate expiration time and info check tool.

Library Usage

#include "ssl_cert_check.h"
...
scc::SSLCertCheck check;
// add target endpoint,default port is 443;
check.Add("google.com");
check.Add("www.google.com",443);
check.BeginCheck(
    [&](const scc::SSLCertCheckResult& result) -> void
    {
        if (result.HasError())
            std::cout << "error:" << result.Message() << std::endl;
        std::cout << v << std::endl;
    });

Cli usage

./ssl_cert_check google.com

or specify port

./ssl_cert_check google.com 443

output:

domain -> google.com
port -> 443
not before -> 209 days,11390 secs
not after -> 170 days,75009 secs

you could also specify domains to resolve by file,a domain (and a port) per line.
-f arg to specify file.

domains.txt

google.com 443
www.google.com
youtube.com 444
cloudflare.com
./ssl_cert_check -fdomains.txt
----------------------------------------
domain -> google.com
port -> 443
not before -> 745 days,12886 secs
not after -> 24 days,30314 secs
----------------------------------------
domain -> www.google.com
port -> 443
not before -> 745 days,0 secs
not after -> 24 days,30314 secs
----------------------------------------
error:connect to target endpoint failed
domain -> youtube.com
port -> 444
not before -> 0 days,0 secs
not after -> 0 days,0 secs
----------------------------------------
domain -> cloudflare.com
port -> 443
not before -> 745 days,0 secs
not after -> 24 days,30314 secs
----------------------------------------

Compile

  1. Init all git module
git submodule update --init --recursive
  1. use CMake to compile.
# linux
mkdir build ; cd build ; cmake .. ; make ;

For Linux user,you need to install openssl in your system.
For Windows user,there are openssl header files and precompiled openssl lib in this repository.
You could simply CMake it using Visual Studio.But if the compile has any unexpected error,you might need to change the openssl
dependency yourself.

ssl_cert_check's People

Contributors

alpsmonaco avatar

Stargazers

 avatar  avatar

Watchers

 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.