Project import generated by Copybara.
GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/src/lib/WebAuthn/Attestation/Format/None.php b/src/lib/WebAuthn/Attestation/Format/None.php
new file mode 100644
index 0000000..ba95e40
--- /dev/null
+++ b/src/lib/WebAuthn/Attestation/Format/None.php
@@ -0,0 +1,41 @@
+<?php
+
+
+namespace lbuchs\WebAuthn\Attestation\Format;
+use lbuchs\WebAuthn\Attestation\AuthenticatorData;
+use lbuchs\WebAuthn\WebAuthnException;
+
+class None extends FormatBase {
+
+
+ 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;
+ }
+
+ /**
+ * 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) {
+ return false;
+ }
+}