fromCertPem static method

(PublicKey, BigInt, BigInt) fromCertPem(
  1. String pem, {
  2. required PublicKey signer,
})

Parses a public key from a PEM-encoded certificate, verifying the signature.

Returns a tuple of (key, notBefore, notAfter) where notBefore and notAfter are Unix timestamps in seconds defining the certificate validity period.

Implementation

static (PublicKey, BigInt, BigInt) fromCertPem(
  String pem, {
  required PublicKey signer,
}) {
  final (key, notBefore, notAfter) = ffi.XdsaPublicKey.fromCertPem(
    pem: pem,
    signer: signer._inner,
  );
  return (PublicKey._(key), notBefore, notAfter);
}