__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

namespace Tuf\Metadata\Verifier;

use Tuf\Client\SignatureVerifier;
use Tuf\Metadata\MetadataBase;
use Tuf\Metadata\RootMetadata;
use Tuf\Metadata\SnapshotMetadata;
use Tuf\Metadata\StorageInterface;
use Tuf\Metadata\TimestampMetadata;

/**
 * Verifies untrusted metadata.
 */
class UniversalVerifier
{
    /**
     * Factory constructor.
     *
     * @param \Tuf\Metadata\StorageInterface $storage
     *   The durable metadata storage.
     * @param \Tuf\Client\SignatureVerifier $signatureVerifier
     *   The signature verifier.
     * @param \DateTimeImmutable $metadataExpiration
     *   The time beyond which untrusted metadata will be considered expired.
     */
    public function __construct(private StorageInterface $storage, private SignatureVerifier $signatureVerifier, private \DateTimeImmutable $metadataExpiration)
    {
    }

    /**
     * Verifies an untrusted metadata object for a role.
     *
     * @param string $role
     *   The metadata role (e.g. 'root', 'targets', etc.)
     * @param \Tuf\Metadata\MetadataBase $untrustedMetadata
     *   The untrusted metadata object.
     *
     * @throws \Tuf\Exception\Attack\FreezeAttackException
     * @throws \Tuf\Exception\Attack\RollbackAttackException
     * @throws \Tuf\Exception\Attack\InvalidHashException
     * @throws \Tuf\Exception\Attack\SignatureThresholdException
     */
    public function verify(string $role, MetadataBase $untrustedMetadata): void
    {
        $verifier = match ($role) {
            RootMetadata::TYPE =>
                new RootVerifier($this->signatureVerifier, $this->metadataExpiration, $this->storage->getRoot()),

            SnapshotMetadata::TYPE =>
                new SnapshotVerifier($this->signatureVerifier, $this->metadataExpiration, $this->storage->getSnapshot(), $this->storage->getTimestamp()),

            TimestampMetadata::TYPE =>
                new TimestampVerifier($this->signatureVerifier, $this->metadataExpiration, $this->storage->getTimestamp()),

            default =>
                new TargetsVerifier($this->signatureVerifier, $this->metadataExpiration, $this->storage->getTargets($role), $this->storage->getSnapshot()),
        };
        $verifier->verify($untrustedMetadata);
        // If the verifier didn't throw an exception, we can trust this metadata.
        $untrustedMetadata->trust();
    }
}

Filemanager

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
Filemanager