Commit 3a11adc
committed
Zero out wallet master key upon lock
When an encrypted wallet is locked (for instance via the
RPC `walletlock`), the docs indicate that the key is
removed from memory. However, the vector (with a secure
allocator) is merely cleared. This allows the key to persist
indefinitely in memory. Instead, manually fill the bytes with
zeroes before clearing.1 parent b92d609 commit 3a11adc
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
3407 | 3408 | | |
3408 | 3409 | | |
3409 | 3410 | | |
3410 | | - | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
3411 | 3415 | | |
3412 | 3416 | | |
3413 | 3417 | | |
| |||
0 commit comments