From a7296412f802e94898180847274056f029825179 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Mon, 19 Feb 2007 14:44:03 +0000 Subject: [PATCH] Fixed private key exporting. --- lib/silccrypt/aes.c | 4 ++-- lib/silccrypt/silcpk.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/silccrypt/aes.c b/lib/silccrypt/aes.c index 88877978..020cc552 100644 --- a/lib/silccrypt/aes.c +++ b/lib/silccrypt/aes.c @@ -149,13 +149,13 @@ SILC_CIPHER_API_CONTEXT_LEN(aes_ctr) } /* Encrypts with the cipher in CTR mode. Source and destination buffers - maybe one and same. Assumes MSB first ordered counter. */ + may be one and same. Assumes MSB first ordered counter. */ SILC_CIPHER_API_ENCRYPT(aes_ctr) { AesContext *aes = context; SilcUInt32 ctr[4]; - int i = 16; + int i; SILC_GET32_MSB(ctr[0], iv); SILC_GET32_MSB(ctr[1], iv + 4); diff --git a/lib/silccrypt/silcpk.c b/lib/silccrypt/silcpk.c index 9075c8aa..a485327f 100644 --- a/lib/silccrypt/silcpk.c +++ b/lib/silccrypt/silcpk.c @@ -1530,7 +1530,6 @@ unsigned char *silc_pkcs_silc_export_private_key(void *private_key, silc_buffer_free(buf); silc_free(prv); silc_free(key); - silc_buffer_purge(&alg_key); silc_asn1_free(asn1); return ret; -- 2.24.0