Debian Codegraph @

lib/3rdParty/composer/web-auth/webauthn-lib/src/Exception/CertificateChainException.php

raw symbols SCIP
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Webauthn\Exception;
6
7 use Throwable;
8
9 class CertificateChainException extends MetadataServiceException
10 {
11 /**
12 * @param array<string> $untrustedCertificates
13 * @param array<string> $trustedCertificates
14 */
15 public function __construct(
16 public readonly array $untrustedCertificates,
17 public readonly array $trustedCertificates,
18 string $message,
19 ?Throwable $previous = null
20 ) {
21 parent::__construct($message, $previous);
22 }
23
24 /**
25 * @param array<string> $untrustedCertificates
26 * @param array<string> $trustedCertificates
27 */
28 public static function create(
29 array $untrustedCertificates,
30 array $trustedCertificates,
31 string $message = 'Unable to validate the certificate chain.',
32 ?Throwable $previous = null
33 ): self {
34 return new self($untrustedCertificates, $trustedCertificates, $message, $previous);
35 }
36 }