toCertDer method

Uint8List toCertDer({
  1. required SecretKey signer,
  2. required String subjectName,
  3. required String issuerName,
  4. required BigInt notBefore,
  5. required BigInt notAfter,
  6. required bool isCa,
  7. int? pathLen,
})

Generates a DER-encoded X.509 certificate for this public key, signed by the given xDSA secret key with the specified validity period.

  • signer: The xDSA secret key to sign the certificate
  • subjectName: The subject's common name (CN)
  • issuerName: The issuer's common name (CN)
  • notBefore: Certificate validity start time (Unix timestamp)
  • notAfter: Certificate validity end time (Unix timestamp)
  • isCa: Whether this is a CA certificate
  • pathLen: Maximum intermediate CAs allowed (only if isCa is true)

Implementation

Uint8List toCertDer({
  required SecretKey signer,
  required String subjectName,
  required String issuerName,
  required BigInt notBefore,
  required BigInt notAfter,
  required bool isCa,
  int? pathLen,
}) => _inner.toCertDer(
  signer: signer._inner,
  subjectName: subjectName,
  issuerName: issuerName,
  notBefore: notBefore,
  notAfter: notAfter,
  isCa: isCa,
  pathLen: pathLen,
);