/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Certificate } from "./Certificate.js";
class AttestationBaseCertificate extends Certificate {
  /**
   * Sign the certificate using the provided crypto and key.
   * If the certificate is already signed, it throws a CertificateError.
   */
  async sign(crypto, key) {
    this.signature = await crypto.signEcdsa(key, this.asUnsignedDer());
  }
}
class Paa extends AttestationBaseCertificate {
  /** Construct the class from an ASN.1/DER encoded certificate */
  static fromAsn1(asn1) {
    const cert = Certificate.parseAsn1Certificate(asn1, Certificate.REQUIRED_PAA_EXTENSIONS);
    return new Paa(cert);
  }
}
class Pai extends AttestationBaseCertificate {
}
class Dac extends AttestationBaseCertificate {
}
export {
  AttestationBaseCertificate,
  Dac,
  Paa,
  Pai
};
//# sourceMappingURL=AttestationCertificates.js.map
