diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | cipher.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -33,6 +33,12 @@ | |||
33 | [key.c] | 33 | [key.c] |
34 | make key_to_blob() return a NULL blob on failure; part of | 34 | make key_to_blob() return a NULL blob on failure; part of |
35 | bz#2175 from Loganaden Velvindron @ AfriNIC | 35 | bz#2175 from Loganaden Velvindron @ AfriNIC |
36 | - djm@cvs.openbsd.org 2013/12/02 03:13:14 | ||
37 | [cipher.c] | ||
38 | correct bzero of chacha20+poly1305 key context. bz#2177 from | ||
39 | Loganaden Velvindron @ AfriNIC | ||
40 | |||
41 | Also make it a memset for consistency with the rest of cipher.c | ||
36 | 42 | ||
37 | 20131121 | 43 | 20131121 |
38 | - (djm) OpenBSD CVS Sync | 44 | - (djm) OpenBSD CVS Sync |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cipher.c,v 1.91 2013/11/21 00:45:44 djm Exp $ */ | 1 | /* $OpenBSD: cipher.c,v 1.92 2013/12/02 03:13:14 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -414,7 +414,7 @@ void | |||
414 | cipher_cleanup(CipherContext *cc) | 414 | cipher_cleanup(CipherContext *cc) |
415 | { | 415 | { |
416 | if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) | 416 | if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) |
417 | bzero(&cc->cp_ctx, sizeof(&cc->cp_ctx)); | 417 | memset(&cc->cp_ctx, 0, sizeof(cc->cp_ctx)); |
418 | else if (EVP_CIPHER_CTX_cleanup(&cc->evp) == 0) | 418 | else if (EVP_CIPHER_CTX_cleanup(&cc->evp) == 0) |
419 | error("cipher_cleanup: EVP_CIPHER_CTX_cleanup failed"); | 419 | error("cipher_cleanup: EVP_CIPHER_CTX_cleanup failed"); |
420 | } | 420 | } |