Commit 6d654c4
committed
fix(security): use ERR_get_error (oldest) for RSA empty-recovery match
The previous fixup used ERR_peek_last_error which returns the NEWEST
error in OpenSSL's FIFO queue. For verify_recover failures the queue
typically holds an outer wrapper error on top of the inner
padding-check error, so the narrow constants from the original code
(0x1C880004, low-byte 0x04) never matched and every recovery
went through throwOpaqueDecryptFailure.
Switch to ERR_get_error to read the OLDEST queued error — same
behavior as the original code that worked, restoring the empty
plaintext round-trip.1 parent 94a77e6 commit 6d654c4
1 file changed
Lines changed: 5 additions & 1 deletion
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
0 commit comments