zimosworld / ssltools
Tools to decode/match SSL Certificate and check installed SSL Certificates
v1.1.0
2018-01-30 19:41 UTC
Requires
- php: >=5.4.0
- ext-openssl: *
Requires (Dev)
- phpunit/phpunit: 6.5.*
This package is not auto-updated.
Last update: 2025-06-22 09:15:40 UTC
README
What is this?
SSL Tools is a set of tools that allows you to
- Decode PEM encoded certificate and certificate request
- Confirm if a certificate/private key and certificate/certificate request (CSR) go together
- Check to confirm if a SSL Certificate has been installed correctly and if it will be trusted in most major browsers
Installation
Install via composer
composer require zimosworld/ssltools
Usage
Methods
Available methods that can be called:
- decodeCertificate( $certificate )
- decodeCertificateRequest( $certificateRequest )
- matchWithPrivateKey( $privateKey, $certificate )
- matchWithCSR( $certificateRequest, $certificate )
- checkInstalledCertificate( $url )
Usage Example
Basic usage example using the decodeCertificate method:
$certificate = '-----BEGIN CERTIFICATE----- .... -----END CERTIFICATE-----'; $sslTools = SSLTools::getInstance(); $result = $sslTools->decodeCertificate( $certificate ); var_dump( $result->getCommonName() );
Running Tests
Installation and Usage commands need to be run from the library root.
Installation
- Run
composer install
Usage
- Run
vendor/bin/phpunit