Branch Coverage

blib/lib/Metabrik/Crypto/X509.pm
Criterion Covered Total %
branch 0 88 0.0


line true false branch
61 0 0 unless $self->brik_help_run_undef_arg("set_ca_attributes", $ca_name)
88 0 0 unless $self->brik_help_run_undef_arg("ca_init", $ca_name)
89 0 0 unless $self->brik_help_run_undef_arg("ca_init", $ca_directory)
91 0 0 unless $self->set_ca_attributes($ca_name)
94 0 0 if (-d $ca_directory) { }
98 0 0 unless mkdir $ca_directory
100 0 0 unless mkdir $ca_directory . "/certs"
102 0 0 unless mkdir $ca_directory . "/csrs"
105 0 0 unless my $ft = "Metabrik::File::Text"->new_from_brik_init($self)
106 0 0 unless $ft->write("", $ca_directory . "/index.txt")
107 0 0 unless $ft->write("01", $ca_directory . "/serial")
172 0 0 unless my $ft = "Metabrik::File::Text"->new_from_brik_init($self)
174 0 0 unless $ft->write($content, $ca_conf)
182 0 0 unless $self->system($cmd)
184 0 0 unless my $hash = $self->cert_hash($ca_cert)
186 0 0 unless my $sf = "Metabrik::System::File"->new_from_brik_init($self)
187 0 0 unless $sf->link($ca_cert, $ca_directory . "/" . $hash . ".0")
197 0 0 unless $self->brik_help_run_undef_arg("ca_show", $ca_name)
199 0 0 unless $self->set_ca_attributes($ca_name)
211 0 0 unless $self->brik_help_run_undef_arg("csr_new", $base_file)
218 0 0 if (-f $csr_cert)
225 0 0 unless ($use_passphrase)
230 0 0 if ($?)
242 0 0 unless $self->brik_help_run_undef_arg("ca_sign_csr", $csr_cert)
243 0 0 unless $self->brik_help_run_file_not_found("ca_sign_csr", $csr_cert)
244 0 0 unless $self->brik_help_run_undef_arg("ca_sign_csr", $ca_name)
246 0 0 unless $self->set_ca_attributes($ca_name)
251 0 0 unless my $sf = "Metabrik::System::File"->new_from_brik_init($self)
252 0 0 unless my $base_file = $sf->basefile($csr_cert)
259 0 0 if ($?)
273 0 0 unless $self->brik_help_run_undef_arg("cert_hash", $cert_file)
274 0 0 unless $self->brik_help_run_file_not_found("cert_hash", $cert_file)
277 0 0 unless my $lines = $self->capture($cmd)
279 0 0 if (@$lines == 0)
291 0 0 unless $self->brik_help_run_undef_arg("cert_verify", $cert_file)
292 0 0 unless $self->brik_help_run_file_not_found("cert_verify", $cert_file)
293 0 0 unless $self->brik_help_run_undef_arg("cert_verify", $ca_name)
295 0 0 unless $self->set_ca_attributes($ca_name)
309 0 0 unless $self->brik_help_run_undef_arg("cert_show", $cert_file)
310 0 0 unless $self->brik_help_run_file_not_found("cert_show", $cert_file)
320 0 0 unless $self->brik_help_run_undef_arg("parse_certificate_string", $string)
323 0 0 unless (length $string)
334 0 0 if (defined $pubkeyalg and $pubkeyalg eq 'RSA') { }
348 0 0 if ($decoded->error)