Download the PHP package liquidweb/ssl-certificate without Composer

On this page you can find all versions of the php package liquidweb/ssl-certificate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ssl-certificate

A php package to validate SSL certificates

Latest Version on Packagist Build Status Scrutinizer Code Quality Scrutinizer Code Coverage StyleCI Total Downloads

This package was inspired by, and forked from, the original spatie/ssl-certificate SSL certificate data validation and query class. Where this package differs is the scope of validation and intended goals. This package takes the SSL certificate validation a few steps further than the original class that inspired it.

This variant is able to detect if an ssl is:

Additionally, this package tracks and provides methods to view SSL Chain information.

Here are a few examples:

Installation

You can install the package via composer:

While not required it is highly suggested to install the PHP gmp extension as this will help speed up the CRL verification methods. This is due to the usage of phpseclib to work with decoding and comparing of ASN1 serials in the CRL lists.

Usage

You can create an instance of LiquidWeb\SslCertificate\SslCertificate with this named constructor:

If the given hostName is invalid LiquidWeb\SslCertificate\InvalidUrl will be thrown.

If the given hostName is valid but there was a problem downloading the certifcate LiquidWeb\SslCertificate\CouldNotDownloadCertificate will be thrown.

Getting the issuer name

Getting the domain name

Getting a domain can be done one of two ways; you can either use getDomain or getCertificateDomain. They are very similar but work slightly different in subtle ways.

Returns the user input domain, or the primary domain name for the certificate. This dynamic style of results helps to resolve issues with CloudFlare SSLs. If the certificate's primary domain is not at all similar to the input domain then this method returns the input domain.

Returns the primary domain name for the certificate; this will consistently and ONLY return the SSLs subject CN.

Getting the certificate's signing algorithm

Returns the algorithm used for signing the certificate

Getting the additional domain names

A certificate can cover multiple (sub)domains. Here's how to get them.

A domain name return with this method can start with * meaning it is valid for all subdomains of that domain.

Getting the date when the certificate becomes valid

Getting the expiration date

Determining if the certificate is still valid

Returns true if the SSL is valid for the domain, trusted by default, and is not currently expired.

An SSL is valid for the domain provided if the domain is the main subject, or a SAN. Trust status is determined based on how the SSL was downloaded; if it requires no cURL ssl verificaiton then it's untrused. Expiration status is found valid if current Date and time is between validFromDate and expirationDate.

You also use this method to determine if a given domain is covered by the certificate. Of course it'll keep checking if the current Date and time is between validFromDate and expirationDate.

Determining if the certificate is still valid until a given date

Returns true if a given date is within the certificate's expiration window. The SSL may still be invlaid for other reasons, this simply checks the date agains the validFromDate and expirationDate dates of the SSL.

Determining if the certificate is still valid until a given date and ensure it's a valid SSL

Returns true if the certificate is valid and if the expirationDate is before the given date.

Determining if the certificate is expired

Determining if a certificate has been revoked

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Note: When working to test your implementation of this library you can use BadSSL to simulate various SSL scenarios.

Credits

The helper functions and tests were copied from the Laravel Framework.

License

The MIT License (MIT). Please see License File for more information.


All versions of ssl-certificate with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
ext-mbstring Version *
ext-filter Version *
ext-openssl Version *
league/uri Version ^5.3.0
nesbot/carbon Version ^1.39.1|^2.0
phpseclib/phpseclib Version ^2.0.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package liquidweb/ssl-certificate contains the following files

Loading the files please wait ....