ocsp-fiber is a Go package that provides an OCSP
(Online Certificate Status Protocol) middleware for the Fiber web framework. It allows to validate the revocation status of client certificates using OCSP
in Fiber applications.
- Middleware for validating client certificates using OCSP
- Configurable OCSP responder URL and issuer certificate
- Seamless integration with the Fiber web framework
- Easy to use and customize
To ensure the reliability and correctness of the ocsp-fiber package, it includes a set of tests. The tests cover various scenarios and edge cases to validate the behavior of the OCSP middleware.
The tests require a valid certificate and key pair for testing purposes. It is important to use a proper certificate and key pair to simulate a production-like environment. Using insecure options like InsecureSkipVerify
is considered bad practice
and should be avoided in tests.
To set up the test environment, follow these steps:
- Obtain a valid certificate and key pair from a trusted (public) or private Certificate Authority (CA) for a domain that you own or control.
- Place the certificate and key files in the
testdata
directory of the package. - Update the test code to load the certificate and key files from the
testdata
directory.
Make sure that the certificate is properly signed by a trusted (public) or private CA and that the domain used in the certificate matches the host you will be testing against.
ocsp-fiber is released under the BSD 3-Clause License.