Perl Requires Chilkat v11.0.0+
Chilkat2 Perl
Example: Http.GetServerCert method
Demonstrates how to call the GetServerCert method.Chilkat Perl Downloads
use strict;
use warnings;
use Chilkat2;
my $http = Chilkat2::Http->new;
my $cert = Chilkat2::Cert->new;
my $success = $http->GetServerCert('chilkatsoft.com', 443, $cert);
if (!$success) {
print $http->LastErrorText, "\n";
exit;
}
print $cert->SubjectDN, "\n";
print $cert->ValidToStr, "\n";
# Output:
# CN=*.chilkatsoft.com
# Wed, 10 Jun 2026 23:59:59 GMT