PHPackages                             gaesi/cert - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gaesi/cert

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gaesi/cert
==========

Gaesi Cert library

v0.1.14(5y ago)0325MITPHPPHP ^7.2.5

Since Sep 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/gaesiusp/cert)[ Packagist](https://packagist.org/packages/gaesi/cert)[ RSS](/packages/gaesi-cert/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (15)Used By (0)

Gaesi/cert
==========

[](#gaesicert)

A PHP library for working with Certificates.

- ICP-Brasil Support
- SSL Certificate Parser
- Verify Cert Chain
- Verify ICP-Brasil Cert Chain

Usage
-----

[](#usage)

For load the SSL Certificate ICPBrasil:

```
use Gaesi\Cert\IcpBrasil\IcpBrasilCertificate;

$icp = new IcpBrasilCertificate();
$icp->parseSSL();

echo $icp->cnpj;   // print the cnpj
echo $icp->name;   // print the name of the CommonName
echo $icp->oidExists('2.16.76.1.3.3'); // true
```

For load the Certificate ICPBrasil from the text or file:

```
use Gaesi\Cert\IcpBrasil\IcpBrasilCertificate;

string $cert = "-----BEGIN CERTIFICATE-----MIIG4...XLFw==-----END CERTIFICATE-----";
$icp = new IcpBrasilCertificate();
$icp->parseX509($cert);
echo $icp->cnpj;   // print the cnpj
```

### Verify CertChain

[](#verify-certchain)

For load and verify the Chain of Certificate :

```
use Gaesi\Cert\IcpBrasil\IcpBrasilCertificate;

$ca = new CALoader();
$ca->addRepositoryPath('path/to/CAs/repository');

$icp = new IcpBrasilCertificate();
$icp->parseSSL();
$icp->setChain($ca->getCAs());
echo 'Valid? :'. ($icp->validateChain())? 'true' : 'false';
```

For verify if the Chain of Certificate is a ICP-Basil Chain :

```
use Gaesi\Cert\IcpBrasil\IcpBrasilCertificate;

$icp = new IcpBrasilCertificate();
$icp->parseSSL();

// Include the Intermediates Certs to the Chain
$ca = new CALoader();
$ca->addCerts( $intermediatesCert );

$icp->setChain($ca->getCAs());
echo 'Is IcpBrasil? :'. ($icp->validateICPBrasilChain())? 'true' : 'false';
```

ICP-Brasil CAs Root
-------------------

[](#icp-brasil-cas-root)

The library store only the default ICP-Brasil CA Root on the directory `src/Resources/icpBrasil/Roots`, for verify the Chain is necessary load all the Chain of Certificate.

References
----------

[](#references)

TODO
----

[](#todo)

- parse others OIDs

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

14

Last Release

1994d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c93f2b5fed2927f326badcbf4e6b0ae4b49512702d3bf6f553b46ae93c90fd2?d=identicon)[gaesiusp](/maintainers/gaesiusp)

---

Tags

certificatecertgaesi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gaesi-cert/health.svg)

```
[![Health](https://phpackages.com/badges/gaesi-cert/health.svg)](https://phpackages.com/packages/gaesi-cert)
```

###  Alternatives

[composer/ca-bundle

Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.

3.0k346.2M191](/packages/composer-ca-bundle)[kelunik/certificate

Access certificate details and transform between different formats.

11038.3M8](/packages/kelunik-certificate)[phpseclib/mcrypt_compat

PHP 5.x-8.x polyfill for mcrypt extension

28129.7M34](/packages/phpseclib-mcrypt-compat)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[sop/crypto-encoding

A PHP implementation of textual encodings of cryptographic structures.

161.4M27](/packages/sop-crypto-encoding)[phpseclib/phpseclib2_compat

phpseclib 2.0 polyfill built with phpseclib 3.0

131.9M13](/packages/phpseclib-phpseclib2-compat)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
