SetaPDF_Signer_Signature_Module_OpenSslCli A signature module which uses the S/MIME utility of OpenSSL via command line.
File: /SetaPDF v2/Signer/Signature/Module/OpenSslCli.php
The S/MIME utility is described here: http://www.openssl.org/docs/apps/smime.html.
Class hierarchy
Implements
Summary
Properties
$_certificate
The path to the signing certificate
$_digest
The digest algorithm to use when signing
Explicity set to null, to keep behaviour as of the old versions.
$_extraCertificates
The path to the extra/other certificates
$_outPath
A temporary path of the signed message
$_privateKey
The path to the private key to use when signing
$_privateKeyPassword
The private key password source
See
Methods
createSignature()
Create the signature.
This method creates a digital signature for the file available in $tmpPath and returns it in binary format.
Parameters
- $tmpPath : SetaPDF_Core_Reader_FilePath
Exceptions
Throws SetaPDF_Signer_Exception
Throws InvalidArgumentException
setCertificate()
Set the path to the signing certificate.
Parameters
- $certificate : string
Exceptions
Throws InvalidArgumentException
setDigest()
Set the digest algorithm to use when signing.
Possible values are defined in SetaPDF_Signer_Digest
.
Parameters
- $digest : string
See
setExtraCertificates()
Set the path to a file with additional certificates which will be included in the signature.
If the certificates are saved in separate files, you will need to assemble them in one single file. Just copy them with a text editor one after another.
Parameters
- $extraCertificates : null|string
Exceptions
Throws InvalidArgumentException
setPrivateKey()
Set the path to the private key file and password argument.
Parameters
- $privateKey : array|string
An array of private key and password or only a private key.
- $password : null
Exceptions
Throws InvalidArgumentException