Commit c0fc5b3
committed
Zeroize sensitive memory in TLS KDF
Implement the Drop trait for TLSKDFOperation to securely zero out the client
random, server random, and session hash using zeromem. Additionally,
explicitly zeroize the derived key material (dkm) buffer immediately after
use. This prevents cryptographic secrets from lingering in memory, reducing
the risk of data leakage.
Signed-off-by: Simo Sorce <simo@redhat.com>1 parent 04cc9f4 commit c0fc5b3
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
200 | 208 | | |
201 | 209 | | |
202 | 210 | | |
| |||
744 | 752 | | |
745 | 753 | | |
746 | 754 | | |
747 | | - | |
| 755 | + | |
748 | 756 | | |
749 | 757 | | |
750 | 758 | | |
| |||
822 | 830 | | |
823 | 831 | | |
824 | 832 | | |
| 833 | + | |
825 | 834 | | |
826 | 835 | | |
827 | 836 | | |
| |||
0 commit comments