Perl Requires Chilkat v10.0.0+
Chilkat2 Perl
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).Chilkat Perl Downloads
use strict;
use warnings;
use Chilkat2;
my $cert = Chilkat2::Cert->new;
my $success = $cert->LoadByCommonName('Chilkat Software, Inc.');
if (!$success) {
print $cert->LastErrorText, "\n";
exit;
}
print $cert->SubjectDN, "\n";
print "Success.\n";