summaryrefslogtreecommitdiff
path: root/cipher-3des1.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher-3des1.c')
-rw-r--r--cipher-3des1.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cipher-3des1.c b/cipher-3des1.c
index f9a352397..f815e8ae5 100644
--- a/cipher-3des1.c
+++ b/cipher-3des1.c
@@ -23,12 +23,16 @@
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"
30#include "log.h" 30#include "log.h"
31 31
32#if OPENSSL_VERSION_NUMBER < 0x00906000L
33#define SSH_OLD_EVP
34#endif
35
32/* 36/*
33 * This is used by SSH1: 37 * This is used by SSH1:
34 * 38 *
@@ -122,6 +126,9 @@ ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx)
122 struct ssh1_3des_ctx *c; 126 struct ssh1_3des_ctx *c;
123 127
124 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);
125 memset(c, 0, sizeof(*c)); 132 memset(c, 0, sizeof(*c));
126 xfree(c); 133 xfree(c);
127 EVP_CIPHER_CTX_set_app_data(ctx, NULL); 134 EVP_CIPHER_CTX_set_app_data(ctx, NULL);