PHPackages                             exonet/certificate-converter - 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. exonet/certificate-converter

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

exonet/certificate-converter
============================

PHP package to convert an SSL certificate to various formats (e.g PKC12, PEM).

v3.0.1(2mo ago)220.4k↑125%1[1 PRs](https://github.com/exonet/certificate-converter/pulls)MITPHPPHP ~7.1|^8.0|^8.1|^8.3CI passing

Since Jan 30Pushed 2w ago7 watchersCompare

[ Source](https://github.com/exonet/certificate-converter)[ Packagist](https://packagist.org/packages/exonet/certificate-converter)[ RSS](/packages/exonet-certificate-converter/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (9)Dependencies (4)Versions (13)Used By (0)

Certificate converter
=====================

[](#certificate-converter)

PHP package to convert an SSL certificate to various formats (e.g PKC12, PEM).

Install
-------

[](#install)

Via Composer

```
$ composer require exonet/certificate-converter
```

Example usage
-------------

[](#example-usage)

The example below shows how combine separate contents of a certificate to a combined PEM string.

- `crt` The certificate (typically the contents of `.crt` file).
- `key` The private key (typically the contents of the `.key` file)
- `ca bundle` The certificate of the intermediate and/or the trusted root certificate

```
// Initialise a new certificate converter.
$converter = new Converter();

// Setup the plain format class that should be converted.
$plain = new Plain();
$plain
    ->setKey('-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
')
    ->setCrt('-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
')
    ->setCaBundle('-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
');

// Convert the plain certificate to PEM.
$pem = $converter
    ->from($plain)
    ->to(new Pem());

// Get certificate files as a zip file.
$zipFile = $pem->asZip(); // SplTempFileObject

// Get an array with the certificate files:
print_r($pem->asFiles());

// Get the certificate as string:
print_r($pem->asString());
```

Change log
----------

[](#change-log)

Please see [releases](https://github.com/exonet/certificate-converter/releases) for more information on what has changed recently.

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance91

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~328 days

Recently: every ~363 days

Total

9

Last Release

82d ago

Major Versions

v0.1.0 → v1.0.02022-04-20

v1.0.1 → v2.0.02025-06-11

v2.0.0 → v3.0.02026-04-10

PHP version history (4 changes)v0.0.1PHP ~7.1

v0.1.0PHP ~7.1|^8.0

v1.0.0PHP ~7.1|^8.0|^8.1

v2.0.0PHP ~7.1|^8.0|^8.1|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c233226e0fbf5dd5e3f42f3e1b832a51a825d08ca0d9e58abaf10c29740a9ba?d=identicon)[exonet](/maintainers/exonet)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (36 commits)")[![robbinjanssen](https://avatars.githubusercontent.com/u/120077?v=4)](https://github.com/robbinjanssen "robbinjanssen (36 commits)")[![trizz](https://avatars.githubusercontent.com/u/832056?v=4)](https://github.com/trizz "trizz (14 commits)")[![rsplithof](https://avatars.githubusercontent.com/u/805008?v=4)](https://github.com/rsplithof "rsplithof (12 commits)")[![styxit](https://avatars.githubusercontent.com/u/1370548?v=4)](https://github.com/styxit "styxit (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/exonet-certificate-converter/health.svg)

```
[![Health](https://phpackages.com/badges/exonet-certificate-converter/health.svg)](https://phpackages.com/packages/exonet-certificate-converter)
```

###  Alternatives

[streamcommon/promise

PHP-CLI promise implementation

142.0k](/packages/streamcommon-promise)

PHPackages © 2026

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