From: Pekka Riikonen Date: Mon, 19 Feb 2007 14:44:03 +0000 (+0000) Subject: Fixed private key exporting. X-Git-Tag: silc.client.1.1.beta2~7 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=a7296412f802e94898180847274056f029825179 Fixed private key exporting. --- 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;