blob: ba95e40f0f8da21d2ad3bd446700328544c046cc [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2
3
4namespace lbuchs\WebAuthn\Attestation\Format;
5use lbuchs\WebAuthn\Attestation\AuthenticatorData;
6use lbuchs\WebAuthn\WebAuthnException;
7
8class None extends FormatBase {
9
10
11 public function __construct($AttestionObject, AuthenticatorData $authenticatorData) {
12 parent::__construct($AttestionObject, $authenticatorData);
13 }
14
15
16 /*
17 * returns the key certificate in PEM format
18 * @return string
19 */
20 public function getCertificatePem() {
21 return null;
22 }
23
24 /**
25 * @param string $clientDataHash
26 */
27 public function validateAttestation($clientDataHash) {
28 return true;
29 }
30
31 /**
32 * validates the certificate against root certificates.
33 * Format 'none' does not contain any ca, so always false.
34 * @param array $rootCas
35 * @return boolean
36 * @throws WebAuthnException
37 */
38 public function validateRootCertificate($rootCas) {
39 return false;
40 }
41}