Skip to content

Add RSASSA-PSS support to CryptoTypes (#51) #7

Add RSASSA-PSS support to CryptoTypes (#51)

Add RSASSA-PSS support to CryptoTypes (#51) #7

Triggered via push March 30, 2024 16:53
Status Success
Total duration 10m 13s
Artifacts

infection.yml

on: push
5️⃣ Mutation Testing
10m 3s
5️⃣ Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L100
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $byte = ord($data[$idx++]); // bits 8 and 7 (class) // 0 = universal, 1 = application, 2 = context-specific, 3 = private - $class = (0b11000000 & $byte) >> 6; + $class = (193 & $byte) >> 6; // bit 6 (0 = primitive / 1 = constructed) $pc = (0b100000 & $byte) >> 5; // bits 5 to 1 (tag number)
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L102
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ // 0 = universal, 1 = application, 2 = context-specific, 3 = private $class = (0b11000000 & $byte) >> 6; // bit 6 (0 = primitive / 1 = constructed) - $pc = (0b100000 & $byte) >> 5; + $pc = (33 & $byte) >> 5; // bits 5 to 1 (tag number) $tag = 0b11111 & $byte; // long-form identifier
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L120
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $bytes = []; $byte = $this->_class << 6 | $this->_pc << 5; $tag = $this->_tag->getValue(); - if ($tag->isLessThan(0x1f)) { + if ($tag->isLessThan(30)) { $bytes[] = $byte | $tag->toInt(); } else { $bytes[] = $byte | 0x1f;
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L120
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $bytes = []; $byte = $this->_class << 6 | $this->_pc << 5; $tag = $this->_tag->getValue(); - if ($tag->isLessThan(0x1f)) { + if ($tag->isLessThan(32)) { $bytes[] = $byte | $tag->toInt(); } else { $bytes[] = $byte | 0x1f;
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L127
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $bytes[] = $byte | 0x1f; $octets = []; for (; $tag->isGreaterThan(0); $tag = $tag->shiftedRight(7)) { - $octets[] = 0x80 | $tag->and(0x7f)->toInt(); + $octets[] = 129 | $tag->and(0x7f)->toInt(); } // last octet has bit 8 set to zero $octets[0] &= 0x7f;
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L130
Escaped Mutant for Mutator "Assignment": --- Original +++ New @@ @@ $octets[] = 0x80 | $tag->and(0x7f)->toInt(); } // last octet has bit 8 set to zero - $octets[0] &= 0x7f; + $octets[0] = 0x7f; foreach (array_reverse($octets) as $octet) { $bytes[] = $octet; }
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L224
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withClass(int $class): self { - $obj = clone $this; + $obj = $this; $obj->_class = 0b11 & $class; return $obj; }
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L225
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ public function withClass(int $class): self { $obj = clone $this; - $obj->_class = 0b11 & $class; + $obj->_class = 2 & $class; return $obj; } /**
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L225
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ public function withClass(int $class): self { $obj = clone $this; - $obj->_class = 0b11 & $class; + $obj->_class = 4 & $class; return $obj; } /**
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L236
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withTag(int $tag): self { - $obj = clone $this; + $obj = $this; $obj->_tag = BigInt::create($tag); return $obj; }