PHPackages                             ylly/certsign - 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. ylly/certsign

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

ylly/certsign
=============

PHP Library for CertSign by CertEurope

1.6.1(4y ago)41.5k3MITPHPPHP &gt;=5.6CI failing

Since Sep 14Pushed 4y ago3 watchersCompare

[ Source](https://github.com/ylly/certsign)[ Packagist](https://packagist.org/packages/ylly/certsign)[ RSS](/packages/ylly-certsign/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (24)Used By (0)

CertSign PHP library
====================

[](#certsign-php-library)

This library allows you to easily implement CertSign by CertEurope into your project.

[![Build Status](https://camo.githubusercontent.com/e704019b0f992eaf70db0d3f5902a068f3d7309fa6fe85c02463b4c68abb36ac/68747470733a2f2f7472617669732d63692e6f72672f796c6c792f636572747369676e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ylly/certsign)

Require :
---------

[](#require-)

- PHP 5.4+
- PHP CURL
- PHP GD
- PHP compiled with FreeType support, else the provided image generation service will fallback to standard text

Limitations :
-------------

[](#limitations-)

- Only SYNC sign mode is implemented

Installation :
--------------

[](#installation-)

```
composer require ylly/certsign

```

Usage :
-------

[](#usage-)

### Convert the certificate

[](#convert-the-certificate)

This library use a PEM certificate, as CertSign provide a P12 file, you need to convert this certificate into the PEM

You will need to enter the certificate's password (you can use the -passin 'pass:my\_password' argument)

```
openssl pkcs12 -in cert.p12 -out cert.pem

```

### Create a signator

[](#create-a-signator)

The signator manage authentication and signature

You can create a signator from a YAML config file

```
$signator = SignatorFactory::createFromYamlFile('/path/to/config.yml');
```

Or from an key-value array of configuration

```
$signator = SignatorFactory::createFromArray($configArray);
```

### Fill user informations and documents

[](#fill-user-informations-and-documents)

The users informations and documents are stored in a signature request

```
$signature = Signature::create()->setImage('/path/to/sign.png', false);
//$signature = Signature::create()->setImage('BASE64');
//$signature = Signature::create()->setImage(new Image(...));

$request = Request::create()
    ->setHolder('Firstname', 'Lastname', 'certsign@ylly.fr', '0601020304')
    ->addDocument('Document-1', '/path/to/doc.pdf', $signature, false)
    ->addDocument('Document-2', 'BASE64', $signature);
```

### Sign documents

[](#sign-documents)

You have two ways to sign documents, with or without authentication

The authentication can be handled by email or SMS

#### With authentication (OTP)

[](#with-authentication-otp)

```
$request->setOTP('0601020304'); // Will send a SMS
//$request->setOTP('certsign@ylly.fr'); // Will send an Email

// Generate the order, returns the order ID
$orderId = $signator->createOrder($request);

// Send the OTP, can be reused to generate a new OTP
$signator->validate($orderId);

// Create the signature request with the documents and signature image
$signator->createRequest($request, $orderId);

// Enter OTP given by SMS or Email, will return false if the code is invalid
// Returns the signed documents
$documents = $signator->sign($orderId, 'MyOTP');
```

#### Without authentication (Direct sign)

[](#without-authentication-direct-sign)

```
// Generate the order, returns the order ID
$orderId = $signator->createOrder($request);

// Create the signature request with the documents and signature image
$signator->createRequest($request, $orderId);

// Returns the signed documents
$documents = $signator->sign($orderId);
```

Configuration file :
--------------------

[](#configuration-file-)

```
env: test # or prod
cert: /etc/ssl/certsign.pem
cert_password: password
proxy: locahost:8080 # optionnal web proxy
```

Advanced usage :
----------------

[](#advanced-usage-)

A Log interface is provided to manage outputed logs, you can register your listener on the signator

```
class Listener implement LogListenerInterface
{
    public function recieve($level, $message)
    {
        // do something
    }
}

$signator->addListener(new Listener());
```

Instead of using a static image, you can generate a simple image using the following scripts :

```
$image = new Image(100, 50, new Color(255, 255, 255));
$image->setStyle(new TextStyle(0, 0, 12, 2, new Color(0, 0, 0));
$image->addText('SignText');
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 98.2% 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 ~69 days

Recently: every ~284 days

Total

23

Last Release

1683d ago

PHP version history (3 changes)1.0.0PHP &gt;=5.4

1.5.6PHP ^5.4 || ^7.0

1.6.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/73162a7f8bb82c57c453c11671608f59e3c87bf7f76724826b369d01a25e87a8?d=identicon)[ylly](/maintainers/ylly)

---

Top Contributors

[![mickaelblondeau](https://avatars.githubusercontent.com/u/3583898?v=4)](https://github.com/mickaelblondeau "mickaelblondeau (54 commits)")[![frederic34](https://avatars.githubusercontent.com/u/3624836?v=4)](https://github.com/frederic34 "frederic34 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ylly-certsign/health.svg)

```
[![Health](https://phpackages.com/badges/ylly-certsign/health.svg)](https://phpackages.com/packages/ylly-certsign)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)[altis/local-server

Local Server module for Altis

18217.0k2](/packages/altis-local-server)

PHPackages © 2026

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