Download the PHP package lufox11/pdf-sign-validator without Composer
On this page you can find all versions of the php package lufox11/pdf-sign-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lufox11/pdf-sign-validator
More information about lufox11/pdf-sign-validator
Files in lufox11/pdf-sign-validator
Package pdf-sign-validator
Short Description A simple wrapper to validate a PDF signature against a public key.
License MIT
Informations about the package pdf-sign-validator
PDF Sign Validator
PDF Sign Validator is a simple wrapper to validate a PDF signature against a public key.\ After spending an entire day looking for a similar solution I gave up and ended up building a solution by myself with the help of my best friend, John Stack Overflow.\ This is nothing more than just a wrapper of real cryptographic functions from Sop\ANS1 and Sop\X509 repositories.
Installation
Just require this package in your project using Composer:
Usage
Methods you may'd like to use:
signCount: Returns the amount of signatures found in file.\ signIsValid: Validates that the file signature corresponds to the issuer's root PEM certificate.\ certIsValid: Validates that the subject certificate was issued by the issuer certificate.\ signMatchSubject: Validates that the certificate (extracted from the signature) match the subject's PEM certificate.\ infoFromPDF: Reads an attached signature to a PDF file and returns the info inside.\ infoFromPEM: Reads a certificate in PEM format and returns the info inside.
A real use case (Argentina):
- Sign a PDF file through Firmar.gob.ar and download the file (
signed.pdf
). - Download the issuer's root certificate (
issuer.cer
). - Download your public certificate (
subject.cer
).
License
This project is licensed under the MIT License.
All versions of pdf-sign-validator with dependencies
sop/asn1 Version ^4.1
sop/x509 Version ^0.7.1
binary-cube/dot-array Version dev-master