Download the PHP package setasign/setapdf-signer-addon-ovhcloud-kms without Composer

On this page you can find all versions of the php package setasign/setapdf-signer-addon-ovhcloud-kms. 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 setapdf-signer-addon-ovhcloud-kms

SetaPDF-Signer component module for the OVHcloud KMS

This package offers a module for the SetaPDF-Signer component that allows you to use the OVHcloud Key Management Service to digital sign PDF documents in pure PHP.

At the moment of writing the OVHcloud KMS only supports keys which are stored and secured on a software level. This level doesn't allows you to use the keys with e.g. AATL conforming certificates.

BUT, actually OVH is working on a new OVHcloud Shared HSM service which will fill this gap. More details can be found in the related GitHub issue.

Requirements

The current version of the module is developed and tested on PHP >= 8.1 up to PHP 8.5. Requirements of the SetaPDF-Signer component can be found in the manual.

For sure you will need to have an active OVHcloud KMS-Domain with an related access certificate and at least one managed service key. Simply read and follow the "Getting started" guide for this.

For PDF signing you will also need a X509 certificate with the corresponding public key. To create a self-signed test certificate or a CSR (Certificate Signing Request), OVH provides a great CLI tool for this.

You can e.g. create a simple self-signed testing certificate with the following command:

Installation

Add following to your composer.json:

and execute composer update. You need to define the repository to evaluate the dependency to the SetaPDF-Signer component (see here for more details).

The Setasign repository requires authentication data: You can use your credentials of your account at setasign.com to which your licenses are assigned or use an access token which you can create in your personal composer settings on setasign.com. See here for more options for authentication with composer.

Usage

All classes in this package are located in the namespace setasign\SetaPDF\Signer\Module\OVHcloudKMS.

The Client class

The client class is some kind of wrapper to the REST API of the OVHcloud KMS. It comes with a simple call() method that allows you to call individual endpoints, but also implements the sign() method which is used by the Module class.

Its constructor requires the following arguments:

The PSR-18 HTTP Client implementation needs to support mTLS authentication. We use and suggest e.g. Guzzle for this.

So creating a Client instance could look like this:

The Module class

This is the main signature module which can be used with the SetaPDF-Signer component. Its constructor requires only an instance of the Client class:

Then you have to configure the instance through various methods:

Module::setKeyId(string $keyId)

Set the id of the service key. E.g.:

Module::setDigest(string $digest)

A proxy method to the setDigest() method of internally used Pades instance.

Module::setSignatureAlgorithm(string $signatureAlgorithm)

Set the signature algorithm. You have to make sure that the algorithm matches your key. Possible values are Digest::RSA_PSS_ALGORITHM, Digest::RSA_ALGORITHM or Digest::ECDSA_ALGORITHM.

A simple complete signature process would look like this:

License

This package is open-source software licensed under the MIT license.


All versions of setapdf-signer-addon-ovhcloud-kms with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1 <=8.5.99999
ext-json Version *
setasign/setapdf-signer Version ^2.51
psr/http-client Version ^1.0
psr/http-factory Version ^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 setasign/setapdf-signer-addon-ovhcloud-kms contains the following files

Loading the files please wait ...