summaryrefslogtreecommitdiff
path: root/cipher-3des1.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-12-31 11:36:00 +1100
committerDarren Tucker <dtucker@zip.com.au>2003-12-31 11:36:00 +1100
commita32e19c637cec7b6c4ce779c6b6586c3880de6b2 (patch)
treed529e6025d3cc21f22f693206eab3ffed8dc2e2b /cipher-3des1.c
parent06930c70ad47744dd96955a6a1b75df7c5eebc3b (diff)
- markus@cvs.openbsd.org 2003/12/22 20:29:55
[cipher-3des1.c] EVP_CIPHER_CTX_cleanup() for the des contexts; pruiksma@freesurf.fr
Diffstat (limited to 'cipher-3des1.c')
-rw-r--r--cipher-3des1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cipher-3des1.c b/cipher-3des1.c
index 6f9f5dd6b..f815e8ae5 100644
--- a/cipher-3des1.c
+++ b/cipher-3des1.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: cipher-3des1.c,v 1.1 2003/05/15 03:08:29 markus Exp $"); 26RCSID("$OpenBSD: cipher-3des1.c,v 1.2 2003/12/22 20:29:55 markus Exp $");
27 27
28#include <openssl/evp.h> 28#include <openssl/evp.h>
29#include "xmalloc.h" 29#include "xmalloc.h"
@@ -126,6 +126,9 @@ ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx)
126 struct ssh1_3des_ctx *c; 126 struct ssh1_3des_ctx *c;
127 127
128 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) != NULL) { 128 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) != NULL) {
129 EVP_CIPHER_CTX_cleanup(&c->k1);
130 EVP_CIPHER_CTX_cleanup(&c->k2);
131 EVP_CIPHER_CTX_cleanup(&c->k3);
129 memset(c, 0, sizeof(*c)); 132 memset(c, 0, sizeof(*c));
130 xfree(c); 133 xfree(c);
131 EVP_CIPHER_CTX_set_app_data(ctx, NULL); 134 EVP_CIPHER_CTX_set_app_data(ctx, NULL);