diff options
author | jaseg <git@jaseg.net> | 2018-11-16 16:16:30 +0900 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2018-11-16 16:16:30 +0900 |
commit | e613f1b9a2e8006527aec57adebd28f01a6b2390 (patch) | |
tree | fc38fc04221d81dcc13ea36cb82c5eb06e3a5726 /src/noise.c | |
parent | 080e5e413144feb34e7cfb033eef8921eb5df115 (diff) | |
download | secure-hid-e613f1b9a2e8006527aec57adebd28f01a6b2390.tar.gz secure-hid-e613f1b9a2e8006527aec57adebd28f01a6b2390.tar.bz2 secure-hid-e613f1b9a2e8006527aec57adebd28f01a6b2390.zip |
Key scrubber works but is untested on race conditions due to unexpected reset
Diffstat (limited to 'src/noise.c')
-rw-r--r-- | src/noise.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/noise.c b/src/noise.c index 1ac336b..53e4383 100644 --- a/src/noise.c +++ b/src/noise.c @@ -36,6 +36,7 @@ void noise_state_init(struct NoiseState *st, uint8_t *remote_key_reference, uint int reset_protocol_handshake(struct NoiseState *st) { uninit_handshake(st, HANDSHAKE_UNINITIALIZED); + disarm_key_scrubber(); noise_cipherstate_free(st->tx_cipher); noise_cipherstate_free(st->rx_cipher); st->tx_cipher = NULL; @@ -98,6 +99,7 @@ void uninit_handshake(struct NoiseState *st, enum handshake_state new_state) { noise_handshakestate_free(st->handshake); st->handshake_state = new_state; st->handshake = NULL; + arm_key_scrubber(); } int try_continue_noise_handshake(struct NoiseState *st, uint8_t *buf, size_t len) { |