Dart
Dart
Windows Certificate Stores - Find Certificate by Common Name
See more Certificates Examples
Searches the Windows certificate stores for a certificate that matches the specified common name (CN).Note: This example requires Chilkat v10.0.0 or greater.
Chilkat Dart Downloads
import 'package:chilkat/chilkat.dart';
void main() {
final cert = CkCert();
try {
cert.loadByCommonName('Chilkat Software, Inc.');
} on ChilkatException catch (e) {
print(e.lastErrorText);
return;
}
print(cert.subjectDN);
print('Success.');
}