https://github.com/h0llyw00dzz/ocsp-fiber
This PKIX OCSP Fiber Framework
https://github.com/h0llyw00dzz/ocsp-fiber
advanced cryptography go idiomatic-go restful-api security
Last synced: 3 months ago
JSON representation
This PKIX OCSP Fiber Framework
- Host: GitHub
- URL: https://github.com/h0llyw00dzz/ocsp-fiber
- Owner: H0llyW00dzZ
- License: bsd-3-clause
- Created: 2024-07-04T03:21:29.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-01-06T16:28:56.000Z (5 months ago)
- Last Synced: 2025-02-23T00:13:04.966Z (3 months ago)
- Topics: advanced, cryptography, go, idiomatic-go, restful-api, security
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ocsp-fiber
[](LICENSE)
[](https://pkg.go.dev/github.com/H0llyW00dzZ/ocsp-fiber)
[](https://goreportcard.com/report/github.com/H0llyW00dzZ/ocsp-fiber)ocsp-fiber is a Go package that provides an [`OCSP`](https://datatracker.ietf.org/doc/html/rfc6960) (Online Certificate Status Protocol) middleware for the Fiber web framework. It allows to validate the revocation status of client certificates using [`OCSP`](https://datatracker.ietf.org/doc/html/rfc6960) in Fiber applications.
## Features
- 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## Hacking
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.
### Hack Setup
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:
1. Obtain a valid certificate and key pair from a trusted (public) or private Certificate Authority (CA) for a domain that you own or control.
2. Place the certificate and key files in the `testdata` directory of the package.
3. 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.
## License
ocsp-fiber is released under the [BSD 3-Clause License](LICENSE).