fromPemData static method

X509Certificate fromPemData({
  1. required Uint8List pem,
})

Implementation

static X509Certificate fromPemData({required Uint8List pem}) {
  var derData = X509Certificate.decodeToDER(pemData: pem);
  if (derData == null) {
    throw ASN1ParseError();
  }
  return X509Certificate.fromDerData(der: derData);
}