PHPackages                             apex/armor-x509 - 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. apex/armor-x509

ActivePackage

apex/armor-x509
===============

x509 extension for Armor

2.0(4y ago)08501MITPHPPHP &gt;=8.0

Since May 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/apexpl/armor-x509)[ Packagist](https://packagist.org/packages/apex/armor-x509)[ Docs](https://apexpl.io)[ RSS](/packages/apex-armor-x509/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (5)Used By (1)

Armor - x.509 Extension
=======================

[](#armor---x509-extension)

An extension for the Armor package to provide x.509 signature and verify functionality. This extension is still rather rudimentary, and will be updated in the near future.

**NOTE:** Although the functionality is technically there, please do not store private keys in the database. This package is intended to provide storage for public keys and certificates, not private keys.

Installation
------------

[](#installation)

Install via Composer with:

> `composer require apex/armor-x509`

Basic Usage
-----------

[](#basic-usage)

```
use Apex\Armor\Armor;
use Apex\Armor\x509\{KeyManager, DistinguishedName, Signature};

// Init Armor
$armor = new Armor();

// Get DN
$dn = new DistinguishedName(
    country: 'CA',
    province: 'Ontario',
    locality: 'Toronto',
    org_name: 'Company XYZ',
    common_name: 'fqdn.domain.com',
    email: 'me@domain.com
);

// Generate self-signed cert for uuid u:admin
$manager = new KeyManager($armor);
$res = $manager->generate('u:admin', $dn, 'adminpass12345', true);

// Generate cert for uuid, u:581 signed by u:admin
$user = $manager->generate('u:581', $dn, 'password12345');
$manager->sign('u:581', 'u:admin', 'adminpass12345', $res['privkey']);

// Sign hash
$signer = new Signature($armor);
$user_privkey = $manager->openPrivKey($user_res['privkey'], 'password12345');
$sig = $signer->sign('message_to_sign', $user_privkey);

// Verify signature
if (!$signer->verify('message_to_sign', $sig, 'u:581', 'u:admin')) {
    echo  "Unable to verify\n";
} else {
    echo "Verification successful\n":
}
```

Support
-------

[](#support)

If you have any questions, issues or feedback, please feel free to drop a note on the [ApexPl Reddit sub](https://reddit.com/r/apexpl/) for a prompt and helpful response.

Follow Apex
-----------

[](#follow-apex)

Loads of good things coming in the near future including new quality open source packages, more advanced articles / tutorials that go over down to earth useful topics, et al. Stay informed by joining the [mailing list](https://apexpl.io/) on our web site, or follow along on Twitter at [@mdizak1](https://twitter.com/mdizak1).

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Total

4

Last Release

1511d ago

Major Versions

0.1.2 → 2.02022-01-30

PHP version history (2 changes)0.1PHP &gt;=8.0.0

2.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fe486d2ed7db571c0519bb0d52b08b5e953a911936e87331e736a381ef96f29?d=identicon)[apex](/maintainers/apex)

---

Top Contributors

[![mdizak](https://avatars.githubusercontent.com/u/59886259?v=4)](https://github.com/mdizak "mdizak (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/apex-armor-x509/health.svg)

```
[![Health](https://phpackages.com/badges/apex-armor-x509/health.svg)](https://phpackages.com/packages/apex-armor-x509)
```

PHPackages © 2026

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