Download the PHP package spomky-labs/pki-framework without Composer

On this page you can find all versions of the php package spomky-labs/pki-framework. 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 pki-framework

Public Key Infrastructure

CI

Latest Stable Version Total Downloads Latest Unstable Version License

[!NOTE] This framework started as a fork of the libraries published at https://github.com/sop. It has diverged substantially since — the code has been reworked, extended and maintained to meet the Spomky-Labs requirements — and the two are no longer interchangeable. All credits for the original work go to its developer.

A PHP Framework

Requirements

The extension gmp or bcmath is highly recommended

Installation

This library is distributed on Packagist; the source lives on GitHub.

Issuing certificates from a certification request

TBSCertificate::fromCSR() builds a certificate from a certification request. Everything a certification request contains is chosen by whoever submitted it, so an issuer must treat it as untrusted input:

Validating a certification path

The trust anchor is an input to the validation process, never something read out of the material the peer sent. Start from the certificates you trust and let the library build the path to the target:

If you already hold the path, name the anchor explicitly:

Do not validate a chain a peer supplied without an anchor. Left to itself, validation would fall back to the first certificate of the path — one the peer chose — and confirm only that the chain is internally consistent. A path built by CertificationPath::fromCertificateChain() refuses to validate without an explicit anchor for that reason, and a path built by CertificationPath::create() raises a deprecation notice when it falls back, so an application can find the call sites before the fallback is removed in the next major release. A path built by toTarget() is already headed by a certificate from the trust list you gave it and needs neither.

Security

Path validation checks that a chain is well-formed and leads to a trust anchor you named. It does not check revocation: the library never contacts a CRL distribution point or an OCSP responder, so a revoked certificate still validates. Revocation is the calling application's responsibility.

Attribute certificate validation does not implement RFC 5755 section 5 check 4 on its own: name the authorities you trust to issue attribute certificates with ACValidationConfig::withTrustedAttributeAuthorities(), or the validator accepts whatever end-entity certificate the issuer path ends in.

Ed25519 and Ed448 are in the default set of allowed signature algorithms, but whether a signature made with them can be checked depends on the runtime: the OpenSSL extension only grew EdDSA recently, and ext-sodium — bundled since PHP 7.2 — covers Ed25519 alone. Verification fails closed where the runtime cannot do it. Ask OpenSSLCrypto::supportsSignatureAlgorithm() if you would rather narrow the configured set than have a chain refused during validation.

Certificate::equals() compares the two encodings octet by octet, and CertificateBundle::contains() is built on it. Use Certificate::hasEqualSubjectIdentity() for the looser "same subject, same key, same serial number" question — it is not an identity check, since two certificates can agree on all three and still be issued by different issuers with different extensions.

Found a vulnerability? Do not open a public issue — read SECURITY.md and report it privately.

License

This project is licensed under the MIT License.


All versions of pki-framework with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-mbstring Version *
brick/math Version ^0.10|^0.11|^0.12|^0.13|^0.14|^0.15|^0.16|^0.17|^0.18|^0.19|^0.20|^1.0
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 spomky-labs/pki-framework contains the following files

Loading the files please wait ...