projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updates.
[silc.git]
/
lib
/
silccore
/
silcpacket.c
diff --git
a/lib/silccore/silcpacket.c
b/lib/silccore/silcpacket.c
index 9c5ed4759534ca76f5923128a826b81e34beab8c..5b9d33e30f3d3de88fc78cac4d09f9641ee3b39b 100644
(file)
--- a/
lib/silccore/silcpacket.c
+++ b/
lib/silccore/silcpacket.c
@@
-106,11
+106,6
@@
void silc_packet_encrypt(SilcCipher cipher, SilcHmac hmac,
{
unsigned char mac[32];
{
unsigned char mac[32];
- if (cipher) {
- SILC_LOG_DEBUG(("Encrypting packet, cipher %s, len %d (%d)",
- cipher->cipher->name, len, len - 2));
- }
-
/* Compute HMAC. This assumes that HMAC is created from the entire
data area thus this uses the length found in buffer, not the length
sent as argument. */
/* Compute HMAC. This assumes that HMAC is created from the entire
data area thus this uses the length found in buffer, not the length
sent as argument. */
@@
-122,9
+117,12
@@
void silc_packet_encrypt(SilcCipher cipher, SilcHmac hmac,
/* Encrypt the data area of the packet. 2 bytes of the packet
are not encrypted. */
/* Encrypt the data area of the packet. 2 bytes of the packet
are not encrypted. */
- if (cipher)
+ if (cipher) {
+ SILC_LOG_DEBUG(("Encrypting packet, cipher %s, len %d (%d)",
+ cipher->cipher->name, len, len - 2));
cipher->cipher->encrypt(cipher->context, buffer->data + 2,
buffer->data + 2, len - 2, cipher->iv);
cipher->cipher->encrypt(cipher->context, buffer->data + 2,
buffer->data + 2, len - 2, cipher->iv);
+ }
/* Pull the HMAC into the visible data area in the buffer */
if (hmac)
/* Pull the HMAC into the visible data area in the buffer */
if (hmac)