From: Pekka Riikonen Date: Sun, 22 Apr 2007 18:17:43 +0000 (+0000) Subject: SILC SKR API changes. X-Git-Tag: silc.toolkit.1.1.beta1~46 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=22f8d37a64e22f8fbeb58d4f5a61321ef067d7a4 SILC SKR API changes. --- diff --git a/lib/silcske/silcconnauth.c b/lib/silcske/silcconnauth.c index ecd515f0..e7b41c55 100644 --- a/lib/silcske/silcconnauth.c +++ b/lib/silcske/silcconnauth.c @@ -590,7 +590,8 @@ SILC_FSM_STATE(silc_connauth_st_responder_authenticate) /** Find public key */ silc_fsm_next(fsm, silc_connauth_st_responder_authenticate_pk); - SILC_FSM_CALL(silc_skr_find(repository, find, silc_connauth_skr_callback, + SILC_FSM_CALL(silc_skr_find(repository, silc_fsm_get_schedule(fsm), + find, silc_connauth_skr_callback, connauth)); /* NOT REACHED */ } diff --git a/lib/silcske/silcconnauth.h b/lib/silcske/silcconnauth.h index 5f48fcb4..e9db0b63 100644 --- a/lib/silcske/silcconnauth.h +++ b/lib/silcske/silcconnauth.h @@ -85,7 +85,9 @@ typedef enum { * method is passphrase it must be returned to `passphrase' pointer. * If it is digital signatures the key repository pointer must be * returned into `repository' pointer, which the library will use to - * find the correct public key to verify the digital signature. + * find the correct public key to verify the digital signature. If + * neither `passphrase' or `repository' is set but TRUE is returned, + * authentication is not required. * * If this connection is not configured at all this returns FALSE which * will result into authentication failure. Otherwise TRUE must be diff --git a/lib/silcske/silcske.c b/lib/silcske/silcske.c index cf97428e..a8cda555 100644 --- a/lib/silcske/silcske.c +++ b/lib/silcske/silcske.c @@ -1558,8 +1558,8 @@ SILC_FSM_STATE(silc_ske_st_initiator_phase3) silc_skr_find_set_usage(find, SILC_SKR_USAGE_KEY_AGREEMENT); /* Find key from repository */ - SILC_FSM_CALL(silc_skr_find(ske->repository, find, - silc_ske_skr_callback, ske)); + SILC_FSM_CALL(silc_skr_find(ske->repository, silc_fsm_get_schedule(fsm), + find, silc_ske_skr_callback, ske)); } else { /* Verify from application */ SILC_FSM_CALL(ske->callbacks->verify_key(ske, ske->prop->public_key, @@ -2070,7 +2070,8 @@ SILC_FSM_STATE(silc_ske_st_responder_phase2) silc_skr_find_set_usage(find, SILC_SKR_USAGE_KEY_AGREEMENT); /* Find key from repository */ - SILC_FSM_CALL(silc_skr_find(ske->repository, find, + SILC_FSM_CALL(silc_skr_find(ske->repository, + silc_fsm_get_schedule(fsm), find, silc_ske_skr_callback, ske)); } else { /* Verify from application */ diff --git a/lib/silcske/silcske.h b/lib/silcske/silcske.h index 50ae1d9e..e468cd0e 100644 --- a/lib/silcske/silcske.h +++ b/lib/silcske/silcske.h @@ -359,7 +359,7 @@ typedef void (*SilcSKECompletionCb)(SilcSKE ske, * params.flags = SILC_SKE_SP_FLAG_PFS | SILC_SKE_SP_FLAG_MUTUAL; * ske = silc_ske_alloc(rng, scheduler, NULL, pk, prv, app); * silc_ske_set_callbacks(ske, verify_public_key, completion, app); - * silc_ske_initiator_start(ske, stream, ¶ms, NULL); + * silc_ske_initiator(ske, stream, ¶ms, NULL); * ***/ SilcSKE silc_ske_alloc(SilcRng rng, SilcSchedule schedule, @@ -505,7 +505,10 @@ SilcAsyncOperation silc_ske_responder(SilcSKE ske, * Starts SILC Key Exchange key regeneration (rekey) protocol. The `rekey' * is the rekey material received earlier in SilcSKECompletionCb. That * same callback is called after the rekey protocol is over to deliver new - * key material and new rekey material. + * key material and new rekey material. When the rekey is completed the + * SKE library will automatically update the new keys into `stream'. The + * completion callback is called after the new keys has been taken into + * use. * * This function returns SilcAsyncOperation operation context which can * be used to control the protocol from the application. Application may @@ -532,6 +535,9 @@ SilcAsyncOperation silc_ske_rekey_initiator(SilcSKE ske, * The `rekey' is the rekey material received earlier in * SilcSKECompletionCb. That same callback is called after the rekey * protocol is over to deliver new key material and new rekey material. + * When the rekey is completed the SKE library will automatically update + * the new keys into `stream'. The completion callback is called after + * the new keys has been taken into use. * * This function returns SilcAsyncOperation operation context which can * be used to control the protocol from the application. Application may