__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Tuf\Metadata\Verifier;
use Tuf\Client\SignatureVerifier;
use Tuf\Metadata\MetadataBase;
use Tuf\Metadata\SnapshotMetadata;
/**
* Verifier for targets metadata.
*/
class TargetsVerifier extends VerifierBase
{
use TrustedAuthorityTrait;
/**
* TargetsVerifier constructor.
*
* @param SignatureVerifier $signatureVerifier
* The signature verifier.
* @param \DateTimeImmutable $expiration
* The time beyond which untrusted metadata will be considered expired.
* @param MetadataBase|null $trustedMetadata
* The trusted metadata, if any.
* @param SnapshotMetadata|null $snapshotMetadata
* The trusted snapshot metadata, if any.
*/
public function __construct(SignatureVerifier $signatureVerifier, \DateTimeImmutable $expiration, MetadataBase $trustedMetadata = null, SnapshotMetadata $snapshotMetadata = null)
{
parent::__construct($signatureVerifier, $expiration, $trustedMetadata);
$this->setTrustedAuthority($snapshotMetadata);
}
/**
* {@inheritdoc}
*/
public function verify(MetadataBase $untrustedMetadata): void
{
// § 5.6.2
$this->checkAgainstHashesFromTrustedAuthority($untrustedMetadata);
// § 5.6.3
$this->signatureVerifier->checkSignatures($untrustedMetadata);
// § 5.6.4
$this->checkAgainstVersionFromTrustedAuthority($untrustedMetadata);
// § 5.6.5
static::checkFreezeAttack($untrustedMetadata, $this->metadataExpiration);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| FileInfoVerifier.php | File | 1.65 KB | 0664 |
|
| RootVerifier.php | File | 1.94 KB | 0664 |
|
| SnapshotVerifier.php | File | 2.87 KB | 0664 |
|
| TargetsVerifier.php | File | 1.52 KB | 0664 |
|
| TimestampVerifier.php | File | 1.06 KB | 0664 |
|
| TrustedAuthorityTrait.php | File | 2.68 KB | 0664 |
|
| UniversalVerifier.php | File | 2.31 KB | 0664 |
|
| VerifierBase.php | File | 3.23 KB | 0664 |
|