SILC SKR API changes.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 22 Apr 2007 18:17:43 +0000 (18:17 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 22 Apr 2007 18:17:43 +0000 (18:17 +0000)
lib/silcske/silcconnauth.c
lib/silcske/silcconnauth.h
lib/silcske/silcske.c
lib/silcske/silcske.h

index ecd515f084363d3f097dcfa442e60fba27a19132..e7b41c55e6b6b36f042db9d3b221b44ba45b8b0e 100644 (file)
@@ -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 */
   }
index 5f48fcb4e51f9013cec2286446a1aa368c93b06d..e9db0b63a61a482cfe527047127af5caeebea7f1 100644 (file)
@@ -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
index cf97428eeed0d291334d2db4c2c778d619035939..a8cda555b4dae2bf5bd05de76758ee7ab3bec9d6 100644 (file)
@@ -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 */
index 50ae1d9edb440931c396393d3d5ba01c1e71cdaa..e468cd0eab45ded473d232c70ab55b2ce4f2f513 100644 (file)
@@ -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, &params, NULL);
+ *    silc_ske_initiator(ske, stream, &params, 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