Commit 3715eea
authored
Fix/xmlsecuritykey type hardening (#286)
* Harden XMLSecEnc against PHP 8 null fatals
Guard encrypt/decrypt and EncryptedKey construction against null DOM
nodes and failed crypto returns; tighten PHPDoc and changelog.
* Harden XMLSecurityKey types and null/false handling.
Tighten cryptParams/key typing, fail closed on unreadable key files and
oversized convertRSA input, and validate RSA/symmetric crypto results so
static analysis and failure paths stay consistent.
* Normalize decrypt exceptions and harden empty RSA ASN.1 input.
Catch phpseclib throws on symmetric/RSA decrypt so failures always surface
as Failure decrypting Data, and reject empty convertRSA inputs; add coverage
for both.
* Make decrypt-failure-uniform.phpt resilient to CI OpenSSL noise.
Silence display errors and allow optional STDERR between assertions so
PHPUnit PHPT runs do not fail when OpenSSL writes padding diagnostics.
* Migrate phpunit.xml to the PHPUnit 9.6 configuration schema.1 parent b11d713 commit 3715eea
5 files changed
Lines changed: 352 additions & 87 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | | - | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
0 commit comments