Preparing 5.0.0 #703
Annotations
1 error and 10 warnings
|
src/metadata-service/src/CertificateChain/CertificateToolbox.php#L36
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
$pem .= chunk_split($data, 64, PHP_EOL);
return $pem . (self::PEM_FOOTER . $type . '-----' . PHP_EOL);
}
- public static function convertDERToPEM(string $data, string $type = 'CERTIFICATE') : string
+ protected static function convertDERToPEM(string $data, string $type = 'CERTIFICATE') : string
{
if (str_contains($data, self::PEM_HEADER)) {
return $data;
|
src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L69
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->dispatcher->dispatch(BeforeCertificateChainValidation::create($untrustedCertificates, $trustedCertificate));
try {
if ($this->validateChain($untrustedCertificates, $trustedCertificate)) {
- $this->dispatcher->dispatch(CertificateChainValidationSucceeded::create($untrustedCertificates, $trustedCertificate));
+
return;
}
} catch (Throwable $exception) {
|
src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L119
Escaped Mutant for Mutator "SpreadOneItem":
--- Original
+++ New
@@ @@
if (!$this->validateCertificates($trustedCertificate, ...$untrustedCertificates)) {
return false;
}
- $certificates = [$trustedCertificate, ...$untrustedCertificates];
+ $certificates = [$trustedCertificate, [...$untrustedCertificates][0]];
$numCerts = count($certificates);
for ($i = 1; $i < $numCerts; $i++) {
if ($this->isRevoked($certificates[$i])) {
|
src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L119
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (!$this->validateCertificates($trustedCertificate, ...$untrustedCertificates)) {
return false;
}
- $certificates = [$trustedCertificate, ...$untrustedCertificates];
+ $certificates = [...$untrustedCertificates];
$numCerts = count($certificates);
for ($i = 1; $i < $numCerts; $i++) {
if ($this->isRevoked($certificates[$i])) {
|
src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L121
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
}
$certificates = [$trustedCertificate, ...$untrustedCertificates];
$numCerts = count($certificates);
- for ($i = 1; $i < $numCerts; $i++) {
+ for ($i = 2; $i < $numCerts; $i++) {
if ($this->isRevoked($certificates[$i])) {
throw CertificateChainException::create($untrustedCertificates, [$trustedCertificate], 'Unable to validate the certificate chain. Revoked certificate found.');
}
|
src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L121
Escaped Mutant for Mutator "LessThanNegotiation":
--- Original
+++ New
@@ @@
}
$certificates = [$trustedCertificate, ...$untrustedCertificates];
$numCerts = count($certificates);
- for ($i = 1; $i < $numCerts; $i++) {
+ for ($i = 1; $i >= $numCerts; $i++) {
if ($this->isRevoked($certificates[$i])) {
throw CertificateChainException::create($untrustedCertificates, [$trustedCertificate], 'Unable to validate the certificate chain. Revoked certificate found.');
}
|
src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L121
Escaped Mutant for Mutator "For_":
--- Original
+++ New
@@ @@
}
$certificates = [$trustedCertificate, ...$untrustedCertificates];
$numCerts = count($certificates);
- for ($i = 1; $i < $numCerts; $i++) {
+ for ($i = 1; false; $i++) {
if ($this->isRevoked($certificates[$i])) {
throw CertificateChainException::create($untrustedCertificates, [$trustedCertificate], 'Unable to validate the certificate chain. Revoked certificate found.');
}
|
src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L162
Escaped Mutant for Mutator "Foreach_":
--- Original
+++ New
@@ @@
}
throw InvalidCertificateException::create($subject->toPEM()->string(), 'Failed to get CRL distribution points: ' . $e->getMessage(), $e);
}
- foreach ($urls as $url) {
+ foreach (array() as $url) {
try {
$revokedCertificates = $this->retrieveRevokedSerialNumbers($url);
if (in_array($csn, $revokedCertificates, true)) {
|
src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L218
Escaped Mutant for Mutator "Throw_":
--- Original
+++ New
@@ @@
return $sequence->at(0)->asInteger()->number();
}, $list->elements());
} catch (Throwable $e) {
- throw CertificateRevocationListException::create($url, 'Failed to download the CRL', $e);
+ CertificateRevocationListException::create($url, 'Failed to download the CRL', $e);
}
}
/**
|
src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L232
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
try {
$urls = [];
$extensions = $subject->tbsCertificate()->extensions();
- if ($extensions->hasCRLDistributionPoints()) {
+ if (!$extensions->hasCRLDistributionPoints()) {
$crlDists = $extensions->crlDistributionPoints();
foreach ($crlDists->distributionPoints() as $dist) {
$url = $dist->fullName()->names()->firstURI();
|
The logs for this run have expired and are no longer available.
Loading