/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { ImplementationError } from "#general";
const MAX_DER_CERTIFICATE_SIZE = 600;
function assertCertificateDerSize(certBytes) {
  if (certBytes.byteLength > MAX_DER_CERTIFICATE_SIZE) {
    throw new ImplementationError(
      `Certificate to generate is too big: ${certBytes.byteLength} bytes instead of max ${MAX_DER_CERTIFICATE_SIZE} bytes`
    );
  }
}
export {
  MAX_DER_CERTIFICATE_SIZE,
  assertCertificateDerSize
};
//# sourceMappingURL=common.js.map
