App-CamelPKI
view release on metacpan or search on metacpan
lib/App/CamelPKI/CA.pm view on Meta::CPAN
$opts{-signature_hash}));
}
=head2 get_certificates_issued()
Builds a list of certificates already issued by the CA and not revoked.
Certificates are returned as an array of L<App::CamelPKI::Certificate>.
=cut
sub get_certificates_issued(){
my ($self) = @_;
my @certs;
for(my $cursor = $self->{db}->search();
$cursor->has_more; $cursor->next) {
push @certs, $cursor->certificate;
}
return @certs;
}
=head2 get_certificates_revoked()
Builds a list of certificates already issued by the CA and not revoked.
Certificates are returned as an array of L<App::CamelPKI::Certificate>.
=cut
sub get_certificates_revoked(){
my ($self) = @_;
my @certs;
for(my $cursor = $self->{db}->search(-revoked => 1);
$cursor->has_more; $cursor->next) {
push @certs, $cursor->certificate;
}
return @certs;
}
=head2 get_certificate_by_serial($serial)
Builds a list of certificates already issued by the CA and not revoked.
Certificates are returned as an array of L<App::CamelPKI::Certificate>.
=cut
sub get_certificate_by_serial(){
my ($self, $serial) = @_;
for(my $cursor = $self->{db}->search( -serial=>$serial, -revoked=>undef ); $cursor->has_more; $cursor->next) {
warn "on est bon";
return $cursor->certificate;
}
}
=head2 rescind()
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
return;
}
=item I<is_php_cli_present()>
Returns true if the php executable (php-cli) is found on the system using File::Which.
It searches for exectables named "php" or "php5".
=cut
sub is_php_cli_present(){
my ($php) = (File::Which::which("php"), File::Which::which("php5"));
if ($php){
my @mods = `$php -m`;
foreach(@mods){
$_ =~ s/\n//g;
return 1 if $_ =~ /curl/;
}
}
return 0;
}
( run in 0.569 second using v1.01-cache-2.11-cpan-65fba6d93b7 )