ocsptool command not found

In this troubleshooting guide we learn how to fix ocsptool command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

ocsptool: command not found

or when using sudo you get the following error message

sudo: ocsptool: command not found

Solutions to ocsptool: command not found

How To Fix ocsptool: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ocsptool is provided by gnutls-bin package.

gnutls-bin is:

GnuTLS is a portable library which implements the Transport Layer Security (TLS 1.0, 1.1, 1.2, 1.3) and Datagram Transport Layer Security (DTLS 1.0, 1.2) protocols.

GnuTLS features support for:

  • certificate path validation, as well as DANE and trust on first use.
  • the Online Certificate Status Protocol (OCSP).
  • public key methods, including RSA and Elliptic curves, as well as password and key authentication methods such as SRP and PSK protocols.
  • all the strong encryption algorithms, including AES and Camellia.
  • CPU-assisted cryptography with VIA padlock and AES-NI instruction sets.
  • HSMs and cryptographic tokens, via PKCS #11.

This package contains a commandline interface to the GNU TLS library, which can be used to set up secure connections from e.g. shell scripts, debugging connection issues or managing certificates.

Useful utilities include:

  • TLS termination: gnutls-cli, gnutls-serv
  • key and certificate management: certtool, ocsptool, p11tool
  • credential management: srptool, psktool

To fix this problem, we can install more using the command below.

sudo apt-get -y install gnutls-bin

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install gnutls-bin.

sudo apt -y install gnutls-bin

Or if you have aptitude installed you can use the following command.

sudo aptitude install gnutls-bin

Summary

In this tutorial we learn how to fix ocsptool command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.