Commit 00fff0f
committed
Zeroize PKCS#8 DER staging area in PEM write helper
F-2148
pem_write_mem_pkcs8privatekey stages the PKCS#8 DER encoded private key
at the tail of the PEM buffer, then writes the shorter PEM output at
the head of the same buffer. The DER tail is not overwritten, leaking
the plaintext private key to heap memory after the callers free. Zero
the DER staging area before returning.1 parent 87e5c62 commit 00fff0f
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7208 | 7208 | | |
7209 | 7209 | | |
7210 | 7210 | | |
| 7211 | + | |
| 7212 | + | |
| 7213 | + | |
| 7214 | + | |
| 7215 | + | |
| 7216 | + | |
7211 | 7217 | | |
7212 | 7218 | | |
7213 | 7219 | | |
| |||
0 commit comments