2020-11-15 19:32:37 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
2022-01-12 21:09:18 +01:00
|
|
|
namespace lbuchs\WebAuthn\Attestation\Format;
|
|
|
|
use lbuchs\WebAuthn\Attestation\AuthenticatorData;
|
|
|
|
use lbuchs\WebAuthn\WebAuthnException;
|
2020-11-15 19:32:37 +01:00
|
|
|
|
|
|
|
class None extends FormatBase {
|
|
|
|
|
|
|
|
|
2022-01-12 21:09:18 +01:00
|
|
|
public function __construct($AttestionObject, AuthenticatorData $authenticatorData) {
|
2020-11-15 19:32:37 +01: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-12 21:09:18 +01:00
|
|
|
* validates the certificate against root certificates.
|
|
|
|
* Format 'none' does not contain any ca, so always false.
|
2020-11-15 19:32:37 +01:00
|
|
|
* @param array $rootCas
|
|
|
|
* @return boolean
|
|
|
|
* @throws WebAuthnException
|
|
|
|
*/
|
|
|
|
public function validateRootCertificate($rootCas) {
|
2022-01-12 21:09:18 +01:00
|
|
|
return false;
|
2020-11-15 19:32:37 +01:00
|
|
|
}
|
|
|
|
}
|