None.php 842 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace WebAuthn\Attestation\Format;
  3. use WebAuthn\WebAuthnException;
  4. class None extends FormatBase {
  5. public function __construct($AttestionObject, \WebAuthn\Attestation\AuthenticatorData $authenticatorData) {
  6. parent::__construct($AttestionObject, $authenticatorData);
  7. }
  8. /*
  9. * returns the key certificate in PEM format
  10. * @return string
  11. */
  12. public function getCertificatePem() {
  13. return null;
  14. }
  15. /**
  16. * @param string $clientDataHash
  17. */
  18. public function validateAttestation($clientDataHash) {
  19. return true;
  20. }
  21. /**
  22. * validates the certificate against root certificates
  23. * @param array $rootCas
  24. * @return boolean
  25. * @throws WebAuthnException
  26. */
  27. public function validateRootCertificate($rootCas) {
  28. return true;
  29. }
  30. }