Commit cdeb1f5
Avoid PHP warnings about undefined array keys when sanitizing malformed PEMs (#556)
* Avoid PHP warnings about undefined indexes when sanitizing malformed PEMs
* Add test for loading invalid PEM key
A new test function was added in ECKeysTest.php to handle cases of loading invalid PEM keys. An InvalidArgumentException is expected to be thrown with a specific error message when an invalid private PEM key is loaded.
---------
Co-authored-by: Florent Morselli <florent.morselli@spomky-labs.com>1 parent 8342de7 commit cdeb1f5
File tree
2 files changed
+30
-1
lines changed- src/Library/KeyManagement/KeyConverter
- tests/Component/KeyManagement/Keys
2 files changed
+30
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
369 | 373 | | |
370 | 374 | | |
371 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
211 | 236 | | |
212 | 237 | | |
213 | 238 | | |
| |||
0 commit comments