mailcow/data/web/inc/lib/WebAuthn/Attestation/Format/None.php

42 lines
950 B
PHP
Raw Normal View History

<?php
2022-01-13 04:09:18 +08:00
namespace lbuchs\WebAuthn\Attestation\Format;
use lbuchs\WebAuthn\Attestation\AuthenticatorData;
use lbuchs\WebAuthn\WebAuthnException;
class None extends FormatBase {
2022-01-13 04:09:18 +08:00
public function __construct($AttestionObject, AuthenticatorData $authenticatorData) {
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.
* @param array $rootCas
* @return boolean
* @throws WebAuthnException
*/
public function validateRootCertificate($rootCas) {
2022-01-13 04:09:18 +08:00
return false;
}
}