Project

ocsprf

0.0
No release in over 3 years
Low commit activity in last 3 years
OCSP Response Fetch
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

ocsprf

Gem Version Actions Status Maintainability

ocsprf is OCSP Response Fetch CLI.

Installation

The gem is available at rubygems.org. You can install it the following.

$ gem install ocsprf

Usage

$ ocsprf --help
Usage: ocsprf [options] PATH
    -i, --issuer PATH                issuer certificate path
    -o, --output PATH                output file path
    -s, --strict                     strict mode                   (default false)
    -v, --verbose                    verbose mode                  (default false)

You can run it the following and print the DER-encoded OCSP Response that fetched.

$ ocsprf /path/to/subject/certificate
$DER_BINARY

If you need to print OCSP Response text, you can run it the following.

$ ocsprf /path/to/subject/certificate --verbose > /dev/null
OCSP Response Data:
    OCSP Response Status: (0x0)
    Responses:
    Certificate ID:
      Hash Algorithm: sha1
      Issuer Name Hash: 0123456789ABCDEF0123456789ABCDEF01234567
      Issuer Key Hash: 0123456789ABCDEF0123456789ABCDEF01234567
      Serial Number: 0123456789ABCDEF0123456789ABCDEF01234567
    Cert Status: good
    This Update: 2020-01-01 12:00:00 UTC
    Next Update: 2020-01-08 12:00:00 UTC

If you have the issuer certificate corresponding to the subject certificate, you can pass it using --issuer option. By default, ocsprf tries to get the issuer certificate using AIA extension.

$ ocsprf /path/to/subject/certificate --issuer /path/to/issuer/certificate --verbose > /dev/null
OCSP Response Data:
    OCSP Response Status: (0x0)
    Responses:
    Certificate ID:
      Hash Algorithm: sha1
      Issuer Name Hash: 0123456789ABCDEF0123456789ABCDEF01234567
      Issuer Key Hash: 0123456789ABCDEF0123456789ABCDEF01234567
      Serial Number: 0123456789ABCDEF0123456789ABCDEF01234567
    Cert Status: good
    This Update: 2020-01-01 12:00:00 UTC
    Next Update: 2020-01-08 12:00:00 UTC

License

The gem is available as open source under the terms of the MIT License.