Dart Requires Chilkat v11.0.0+
Dart
Get Certificate Public Key from PEM
See more Certificates Examples
Demonstrates how to load a PEM file containing a certificate and access the public key.Chilkat Dart Downloads
import 'package:chilkat/chilkat.dart';
void main() {
final cert = CkCert();
try {
cert.loadFromFile('qa_data/pem/my_cert.pem');
} on ChilkatException catch (e) {
print(e.lastErrorText);
return;
}
final pubkey = CkPublicKey();
cert.getPublicKey(pubkey);
// Examine the public key as XML..
print(pubkey.getXml());
}