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'
An exception for terminatinating execution or to throw for unit testing.
Specific Certificate Key.
static createFromCertificateData($certificateContents)
validateElementWithKeys(SignedElement $element, $pemCandidates)
BC compatible version of the signature check.
Validates the signature based on the fingerprint of the certificate.
canValidate(SignedElement $signedElement, CertificateProvider $configuration)
Test whether or not this link in the chain can validate the signedElement signature.
__construct(LoggerInterface $logger, FingerprintLoader $fingerprintLoader)
if(@file_exists(dirname(__FILE__).'/lang/eng.php')) $certificate
Describes a logger instance.
CertificateProvider interface.
getCertificateFingerprints()
Returns an array or \Traversable where each element represents a certificate fingerprint.
hasValidSignature(SignedElement $signedElement, CertificateProvider $configuration)
Validate the signature of the signed Element based on the configuration.
getCertificates()
Retrieve the certificates that are included in the element (if any).