37 parent::__construct($logger);
46 'Configuration does not have "certFingerprint" value, cannot validate signature with fingerprint' 53 if (empty($this->certificates)) {
55 'Signed element does not have certificates, cannot validate signature with fingerprint' 73 $this->certificates = array_map(
function (
$certificate) {
77 $fingerprintCollection = $this->fingerprintLoader->loadFromConfiguration($configuration);
79 $pemCandidates =
array();
82 $certificateFingerprint = $certificate->getFingerprint();
83 if ($fingerprintCollection->contains($certificateFingerprint)) {
88 if (empty($pemCandidates)) {
90 'Unable to match a certificate of the SignedElement matching a configured fingerprint' validateElementWithKeys(SignedElement $element, $pemCandidates)
BC compatible version of the signature check.
CertificateProvider interface.
if(@file_exists(dirname(__FILE__).'/lang/eng.php')) $certificate
getCertificates()
Retrieve the certificates that are included in the element (if any).
Create styles array
The data for the language used.
static createFromCertificateData($certificateContents)
hasValidSignature(SignedElement $signedElement, CertificateProvider $configuration)
Validate the signature of the signed Element based on the configuration.
Describes a logger instance.
__construct(LoggerInterface $logger, FingerprintLoader $fingerprintLoader)
Validates the signature based on the fingerprint of the certificate.
getCertificateFingerprints()
Returns an array or where each element represents a certificate fingerprint.
canValidate(SignedElement $signedElement, CertificateProvider $configuration)
Test whether or not this link in the chain can validate the signedElement signature.