pverdu / x509-certificate-validator
A X509 Certificate validator
1.0.1
2020-01-09 13:46 UTC
Requires
- php: >=7.2
- illuminate/contracts: ^6.0
- phpseclib/phpseclib: ^2.0
- symfony/finder: ^4.3.4
- symfony/http-kernel: ^4.3.4
Requires (Dev)
- laravel/framework: ^6.0
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-10-25 20:09:48 UTC
README
Features
- CRL (Certificate Revocation List) validation
- Expiration validation
- Signed by a Trusted CA validation (with self-signed support)
Requirements
- PHP >=7.2
- Laravel >=6
Installation
composer require pverdu/x509-certificate-validator`
The service provider should be autodiscovered, if not you can add it to your container using:
// ... PVerdu\x509CertificateValidator\x509CertificateValidatorServiceProvider::class // ...
Configuration
Make sure your webserver sends the client certificate to your application either via the headers or the global $_SERVER
variable.
Add the PVerdu\x509CertificateValidator\Middleware\CertificateValidatorMiddleware
to any routes you want the certificate to be validated on per request.
Publish configuration
If you want to change the configuration, for example to change the trusted certificate store paths, you must publish the configuration using the command below:
php artisan vendor:publish --provider=PVerdu\\x509CertificateValidator\\x509CertificateValidatorServiceProvider