From 5e5526c98cc281231e020220a3a9c3eaa31df68f Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sun, 16 Sep 2001 10:39:55 +0000 Subject: [PATCH] updates. --- CHANGES | 7 +++++++ TODO | 2 ++ apps/silcd/packet_send.c | 3 --- apps/silcd/protocol.c | 6 ++++++ lib/silccrypt/silchmac.c | 4 ++++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 34ac4caf..0173db91 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,13 @@ Sun Sep 16 12:32:58 EEST 2001 Pekka Riikonen is something sensible in the silc_packet_decrypt_rest_special in lib/silccrypt/silcpacket.c. + * Free and NULL the allocated pointer in silc_hmac_alloc if + the HMAC allocation fails. The affected file is + lib/silccrypt/silchmac.c. + + * Print the selected security properties to the log files in + the server. Affected file silcd/protocol.c. + Sat Sep 15 13:29:17 EEST 2001 Pekka Riikonen * Check that the public key exists in the GETKEY command before diff --git a/TODO b/TODO index 5e818544..aca1fcc9 100644 --- a/TODO +++ b/TODO @@ -53,6 +53,8 @@ TODO/bugs In SILC Server o Add perhaps /var/run/silcd.pid for PID information for the server. + o Update idle times only for private/channel messaegs. + o Add a timeout to handling incmoing JOIN commands. It should be enforced that JOIN command is executed only once in a second or two seconds. Now it is possible to accept n incoming JOIN commands diff --git a/apps/silcd/packet_send.c b/apps/silcd/packet_send.c index 31e9bea1..550ec9c3 100644 --- a/apps/silcd/packet_send.c +++ b/apps/silcd/packet_send.c @@ -743,9 +743,6 @@ void silc_server_packet_relay_to_channel(SilcServer server, memcpy(tmp, data, data_len); /* Decrypt the channel message (we don't check the MAC) */ - /* XXX this could be optimized and removed all together by - taking a copy of the original data before encrypting it - and thus would not required decrypting. */ if (channel->channel_key && !silc_channel_message_payload_decrypt(tmp, data_len, channel->channel_key, diff --git a/apps/silcd/protocol.c b/apps/silcd/protocol.c index 53b31d97..4d306195 100644 --- a/apps/silcd/protocol.c +++ b/apps/silcd/protocol.c @@ -280,6 +280,12 @@ int silc_server_protocol_ke_set_keys(SilcSKE ske, sock->user_data = (void *)conn_data; + SILC_LOG_INFO(("%s (%s) security properties: %s %s %s", + sock->hostname, sock->ip, + idata->send_key->cipher->name, + idata->hmac_send->hmac->name, + idata->hash->hash->name)); + return TRUE; } diff --git a/lib/silccrypt/silchmac.c b/lib/silccrypt/silchmac.c index 454c175f..00fd15ec 100644 --- a/lib/silccrypt/silchmac.c +++ b/lib/silccrypt/silchmac.c @@ -123,6 +123,8 @@ bool silc_hmac_alloc(char *name, SilcHash hash, SilcHmac *new_hmac) if (!silc_hash_alloc(hname, &hash)) { silc_free(tmp); + silc_free(*new_hmac); + *new_hmac = NULL; return FALSE; } @@ -142,6 +144,8 @@ bool silc_hmac_alloc(char *name, SilcHash hash, SilcHmac *new_hmac) } } + silc_free(*new_hmac); + *new_hmac = NULL; return FALSE; } -- 2.24.0