2020-11-16 02:32:37 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
2022-01-13 04:09:18 +08:00
|
|
|
namespace lbuchs\WebAuthn\Attestation\Format;
|
|
|
|
use lbuchs\WebAuthn\Attestation\AuthenticatorData;
|
|
|
|
use lbuchs\WebAuthn\WebAuthnException;
|
2020-11-16 02:32:37 +08:00
|
|
|
|
|
|
|
class None extends FormatBase {
|
|
|
|
|
|
|
|
|
2022-01-13 04:09:18 +08:00
|
|
|
public function __construct($AttestionObject, AuthenticatorData $authenticatorData) {
|
2020-11-16 02:32:37 +08:00
|
|
|
parent::__construct($AttestionObject, $authenticatorData);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* returns the key certificate in PEM format
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getCertificatePem() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $clientDataHash
|
|
|
|
*/
|
|
|
|
public function validateAttestation($clientDataHash) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2022-01-13 04:09:18 +08:00
|
|
|
* validates the certificate against root certificates.
|
|
|
|
* Format 'none' does not contain any ca, so always false.
|
2020-11-16 02:32:37 +08:00
|
|
|
* @param array $rootCas
|
|
|
|
* @return boolean
|
|
|
|
* @throws WebAuthnException
|
|
|
|
*/
|
|
|
|
public function validateRootCertificate($rootCas) {
|
2022-01-13 04:09:18 +08:00
|
|
|
return false;
|
2020-11-16 02:32:37 +08:00
|
|
|
}
|
|
|
|
}
|