ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SAML2\Signature\FingerprintValidator Class Reference

Validates the signature based on the fingerprint of the certificate. More...

+ Inheritance diagram for SAML2\Signature\FingerprintValidator:
+ Collaboration diagram for SAML2\Signature\FingerprintValidator:

Public Member Functions

 __construct (LoggerInterface $logger, FingerprintLoader $fingerprintLoader)
 
 canValidate (SignedElement $signedElement, CertificateProvider $configuration)
 Test whether or not this link in the chain can validate the signedElement signature. More...
 
- Public Member Functions inherited from SAML2\Signature\AbstractChainedValidator
 __construct (LoggerInterface $logger)
 
- Public Member Functions inherited from SAML2\Signature\ValidatorInterface
 hasValidSignature (SignedElement $signedElement, CertificateProvider $configuration)
 Validate the signature of the signed Element based on the configuration. More...
 

Private Attributes

 $certificates
 
 $fingerprintLoader
 

Additional Inherited Members

- Protected Member Functions inherited from SAML2\Signature\AbstractChainedValidator
 validateElementWithKeys (SignedElement $element, $pemCandidates)
 BC compatible version of the signature check. More...
 
- Protected Attributes inherited from SAML2\Signature\AbstractChainedValidator
 $logger
 

Detailed Description

Validates the signature based on the fingerprint of the certificate.

Deprecated:
Please use full certificates instead.

Definition at line 16 of file FingerprintValidator.php.

Constructor & Destructor Documentation

◆ __construct()

SAML2\Signature\FingerprintValidator::__construct ( LoggerInterface  $logger,
FingerprintLoader  $fingerprintLoader 
)
Deprecated:
Please use full certificates instead.

Definition at line 31 of file FingerprintValidator.php.

References SAML2\Signature\FingerprintValidator\$fingerprintLoader.

34  {
35  $this->fingerprintLoader = $fingerprintLoader;
36 
37  parent::__construct($logger);
38  }

Member Function Documentation

◆ canValidate()

SAML2\Signature\FingerprintValidator::canValidate ( SignedElement  $signedElement,
CertificateProvider  $configuration 
)

Test whether or not this link in the chain can validate the signedElement signature.

Parameters
\SAML2\SignedElement$signedElement
\SAML2\Configuration\CertificateProvider$configuration
Returns
bool

Implements SAML2\Signature\ChainedValidator.

Definition at line 40 of file FingerprintValidator.php.

References $certificate, SAML2\Signature\FingerprintValidator\$certificates, array, SAML2\Certificate\X509\createFromCertificateData(), SAML2\Configuration\CertificateProvider\getCertificateFingerprints(), SAML2\SignedElement\getCertificates(), SAML2\Signature\ValidatorInterface\hasValidSignature(), and SAML2\Signature\AbstractChainedValidator\validateElementWithKeys().

43  {
44  if ($configuration->getCertificateFingerprints() === null) {
45  $this->logger->debug(
46  'Configuration does not have "certFingerprint" value, cannot validate signature with fingerprint'
47  );
48  return false;
49  }
50 
51  // use internal cache to prevent doing certificate extraction twice.
52  $this->certificates = $signedElement->getCertificates();
53  if (empty($this->certificates)) {
54  $this->logger->debug(
55  'Signed element does not have certificates, cannot validate signature with fingerprint'
56  );
57  return false;
58  }
59 
60  return true;
61  }
+ Here is the call graph for this function:

Field Documentation

◆ $certificates

SAML2\Signature\FingerprintValidator::$certificates
private

◆ $fingerprintLoader

SAML2\Signature\FingerprintValidator::$fingerprintLoader
private

The documentation for this class was generated from the following file: