From: Pekka Riikonen Date: Sat, 21 Jul 2001 17:10:54 +0000 (+0000) Subject: updates X-Git-Tag: robodoc-323~51 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=a820923a77f9151a35b2ec61e954f3258e5c2816 updates --- diff --git a/lib/silcske/groups.c b/lib/silcske/groups.c index 20cba0c0..17a34c91 100644 --- a/lib/silcske/groups.c +++ b/lib/silcske/groups.c @@ -2,9 +2,9 @@ groups.c - Author: Pekka Riikonen + Author: Pekka Riikonen - Copyright (C) 2000 Pekka Riikonen + Copyright (C) 2000 - 2001 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/silcske/groups.h b/lib/silcske/groups.h index 29941dbf..1e36c5de 100644 --- a/lib/silcske/groups.h +++ b/lib/silcske/groups.h @@ -2,9 +2,9 @@ groups.h - Author: Pekka Riikonen + Author: Pekka Riikonen - Copyright (C) 2000 Pekka Riikonen + Copyright (C) 2000 - 2001 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/silcske/groups_internal.h b/lib/silcske/groups_internal.h index 2651885d..ab2787b4 100644 --- a/lib/silcske/groups_internal.h +++ b/lib/silcske/groups_internal.h @@ -2,9 +2,9 @@ groups_internal.h - Author: Pekka Riikonen + Author: Pekka Riikonen - Copyright (C) 2000 Pekka Riikonen + Copyright (C) 2000 - 2001 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/silcske/payload.c b/lib/silcske/payload.c index ef420bde..d9e89389 100644 --- a/lib/silcske/payload.c +++ b/lib/silcske/payload.c @@ -2,7 +2,7 @@ payload.c - Author: Pekka Riikonen + Author: Pekka Riikonen Copyright (C) 2000 - 2001 Pekka Riikonen diff --git a/lib/silcske/payload.h b/lib/silcske/payload.h index dd31fc10..ba900042 100644 --- a/lib/silcske/payload.h +++ b/lib/silcske/payload.h @@ -2,7 +2,7 @@ payload.h - Author: Pekka Riikonen + Author: Pekka Riikonen Copyright (C) 2000 - 2001 Pekka Riikonen diff --git a/lib/silcske/silcske.c b/lib/silcske/silcske.c index 2838a685..6cf7c952 100644 --- a/lib/silcske/silcske.c +++ b/lib/silcske/silcske.c @@ -2,7 +2,7 @@ silcske.c - Author: Pekka Riikonen + Author: Pekka Riikonen Copyright (C) 2000 - 2001 Pekka Riikonen @@ -23,7 +23,7 @@ #include "silcske.h" #include "groups_internal.h" -/* Structure to hold all SKE callbacks-> */ +/* Structure to hold all SKE callbacks. */ struct SilcSKECallbacksStruct { SilcSKESendPacketCb send_packet; SilcSKECb payload_receive; @@ -216,6 +216,7 @@ SilcSKEStatus silc_ske_initiator_phase_1(SilcSKE ske, status = silc_ske_payload_start_decode(ske, start_payload, &payload); if (status != SILC_SKE_STATUS_OK) { ske->status = status; + silc_ske_payload_start_free(ske->start_payload); return status; } @@ -418,18 +419,17 @@ static void silc_ske_initiator_finish_final(SilcSKE ske, if (ske->status == SILC_SKE_STATUS_FREED) { silc_ske_free(ske); return; - } else { - ske->users--; } - payload = ske->ke2_payload; - /* If the caller returns PENDING status SKE library will assume that the caller will re-call this callback when it is not anymore in PENDING status. */ if (status == SILC_SKE_STATUS_PENDING) return; + ske->users--; + payload = ske->ke2_payload; + /* If the status is an error then the public key that was verified by the caller is not authentic. */ if (status != SILC_SKE_STATUS_OK) { @@ -762,18 +762,17 @@ static void silc_ske_responder_phase2_final(SilcSKE ske, if (ske->status == SILC_SKE_STATUS_FREED) { silc_ske_free(ske); return; - } else { - ske->users--; } - recv_payload = ske->ke1_payload; - /* If the caller returns PENDING status SKE library will assume that the caller will re-call this callback when it is not anymore in PENDING status. */ if (status == SILC_SKE_STATUS_PENDING) return; + ske->users--; + recv_payload = ske->ke1_payload; + /* If the status is an error then the public key that was verified by the caller is not authentic. */ if (status != SILC_SKE_STATUS_OK) { diff --git a/lib/silcske/silcske.h b/lib/silcske/silcske.h index 4f08aebb..55a0e0bf 100644 --- a/lib/silcske/silcske.h +++ b/lib/silcske/silcske.h @@ -2,7 +2,7 @@ silcske.h - Author: Pekka Riikonen + Author: Pekka Riikonen Copyright (C) 2000 - 2001 Pekka Riikonen diff --git a/lib/silcske/silcske_status.h b/lib/silcske/silcske_status.h index 0863ad18..3dc0ad61 100644 --- a/lib/silcske/silcske_status.h +++ b/lib/silcske/silcske_status.h @@ -2,9 +2,9 @@ silcske_status.h - Author: Pekka Riikonen + Author: Pekka Riikonen - Copyright (C) 2000 Pekka Riikonen + Copyright (C) 2000 - 2001 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by