https://github.com/sop/x509
A PHP library for X.509 public key certificates, attribute certificates, certification requests and certification path validation.
https://github.com/sop/x509
attribute-certificates certificate-request certificate-signing-request certificates certification-path decoding encoding parser x509
Last synced: 16 days ago
JSON representation
A PHP library for X.509 public key certificates, attribute certificates, certification requests and certification path validation.
- Host: GitHub
- URL: https://github.com/sop/x509
- Owner: sop
- License: mit
- Created: 2016-04-29T12:08:12.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-02-07T10:33:08.000Z (almost 2 years ago)
- Last Synced: 2025-10-07T13:00:06.252Z (4 months ago)
- Topics: attribute-certificates, certificate-request, certificate-signing-request, certificates, certification-path, decoding, encoding, parser, x509
- Language: PHP
- Homepage:
- Size: 950 KB
- Stars: 40
- Watchers: 2
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# X.509
[](https://travis-ci.org/sop/x509)
[](https://scrutinizer-ci.com/g/sop/x509/?branch=master)
[](https://coveralls.io/github/sop/x509?branch=master)
[](https://github.com/sop/x509/blob/master/LICENSE)
A PHP library for X.509 public key certificates, attribute certificates,
certification requests and certification path validation.
## Introduction
This library provides a pure PHP implementation of X.509 certificates.
The class hierarchy adapts to the ASN.1 types, which makes it easy to use
corresponding RFC's as a reference documentation.
## Features
- X.509 certificates ([RFC 5280](https://tools.ietf.org/html/rfc5280))
- Certificate decoding and encoding
- Certificate signing
- Certification requests ([PKCS #10](https://tools.ietf.org/html/rfc2986))
- CSR decoding and encoding
- Certification path
- Path building
- Path validation
- Attribute certificates ([RFC 5755](https://tools.ietf.org/html/rfc5755))
- AC decoding and encoding
- AC signing
## Requirements
- PHP >=7.2
- gmp
- [sop/asn1](https://github.com/sop/asn1)
- [sop/x501](https://github.com/sop/x501)
- [sop/crypto-types](https://github.com/sop/crypto-types)
- [sop/crypto-bridge](https://github.com/sop/crypto-bridge)
- [sop/crypto-encoding](https://github.com/sop/crypto-encoding)
## Installation
This library is available on
[Packagist](https://packagist.org/packages/sop/x509).
composer require sop/x509
## Code examples
Examples are located in
[`/examples`](https://github.com/sop/x509/tree/master/examples)
directory.
- [Create a CA certificate](https://github.com/sop/x509/blob/master/examples/create-ca-cert.php)
- [Create a CSR](https://github.com/sop/x509/blob/master/examples/create-csr.php)
- [Issue a certificate](https://github.com/sop/x509/blob/master/examples/issue-cert.php)
- [Validate a certification path](https://github.com/sop/x509/blob/master/examples/path-validate.php)
## License
This project is licensed under the MIT License.