Download the PHP package vatsake/php-asic-e without Composer
On this page you can find all versions of the php package vatsake/php-asic-e. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vatsake/php-asic-e
More information about vatsake/php-asic-e
Files in vatsake/php-asic-e
Package php-asic-e
Short Description Lightweight PHP library for creating and validating XAdES-T and ASiC-E digital signatures (compatible with Estonian DigiDoc).
License MIT
Homepage https://github.com/vatsake/php-asic-e
Informations about the package php-asic-e
PHP-ASICE
A lightweight PHP library for creating and validating ASiC-E (Associated Signature Container – Extended) files with XAdES-T digital signatures.
Features
- Create XAdES-T (timestamped) signatures
- Build and validate ASiC-E digital signature containers
- Built-in OCSP and timestamp support
- Certificate chain and signature validation
- ASN.1 (powered by phpseclib 3) and XML utilities
The library currently produces XAdES-T signatures (BES + trusted timestamp + OCSP).
Long-term profiles (XAdES-LT / LTA) are not yet implemented.
Installation
Install via Composer:
Configuring logging
Logging is optional. Pass any PSR-3 compatible logger to AsiceConfig::setLogger() to enable it. Example with Monolog:
Usage
Signing example with Smart-ID client library
Unfortunately the base Smart-id client doesn't support signing, so I forked the base library and added signing support
Signing example with Mobile-ID client library
Unfortunately the base Mobile-id client doesn't support signing, so I forked the base library and added signing support
Validating signatures
Official SK ID Solutions Endpoints & Docs
For full technical information about Estonian OCSP and TSA services, see:
- Timestamping service: https://github.com/SK-EID/Timestamping/wiki/Timestamping-Service-Technical-Information
- OCSP service: https://github.com/SK-EID/ocsp/wiki
Default production endpoints (Estonia):
Default test endpoints (Estonia):
These public endpoints are operated by SK ID Solutions AS (Estonia) and are used by ID-card, Mobile-ID and Smart-ID.
Signatures created with them are fully compatible with DigiDoc4.
Best practices
Load the LOTL (List of Trusted Lists) once on startup and cache it to avoid network delays.
It is recommended to update LOTL every 24h.
⚠️ Without filtering by country code, the LOTL contains ≈ 4 500 CA certificates,
which can slow initialization and increase memory use.
Requirements
- PHP 8.1 or higher
- phpseclib 3 (used internally for ASN.1, OCSP, and TSA parsing)
- OpenSSL extension enabled
- DOM and XML extensions
Technical notes
- Implements the ETSI EN 319 162 / XAdES-T profile (BES + timestamp + OCSP), identical in structure to DigiDoc’s “BES / time-stamp” signatures.
- Uses phpseclib 3 for:
- ASN.1 DER decoding
- OCSP and TSA response parsing
- Certificate and key handling where OpenSSL alone is insufficient
- Long-term (LT/LTA) and archival timestamping are planned for future versions.
- Fully compatible with Estonian DigiDoc — DigiDoc will display these as
“BES / time-stamp“ (XAdES-T) signatures
[!NOTE] This library has a limited user base (me, myself and I 😉), so there's bound to be some bugs. Feel free to report issues or contribute improvements!
⚖️ License
Released under the MIT License.
All versions of php-asic-e with dependencies
phpseclib/phpseclib Version ^3.0
psr/log Version ^3.0
ext-curl Version *
ext-zip Version *