Fixed private key exporting.
authorPekka Riikonen <priikone@silcnet.org>
Mon, 19 Feb 2007 14:44:03 +0000 (14:44 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 19 Feb 2007 14:44:03 +0000 (14:44 +0000)
lib/silccrypt/aes.c
lib/silccrypt/silcpk.c

index 88877978407582fd38ea1357c69ec10ad1025391..020cc552d2484627afec92abe07d87e832c182c1 100644 (file)
@@ -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);
index 9075c8aa7a66fc47466d4115db982e5ce307e0a9..a485327f41f14c2b235b52d7eff9f5a65041eaec 100644 (file)
@@ -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;