From: Pekka Riikonen Date: Thu, 15 Nov 2007 14:50:45 +0000 (+0000) Subject: Fixed public key authentication as responder. X-Git-Tag: 1.2.beta1~82 X-Git-Url: http://git.silcnet.org/gitweb/?p=crypto.git;a=commitdiff_plain;h=61dab58b01b4c1f7d31e975e1bac1114b5f4bba6 Fixed public key authentication as responder. --- diff --git a/CHANGES.TOOLKIT b/CHANGES.TOOLKIT index ffbc1f07..ac7dcfa0 100644 --- a/CHANGES.TOOLKIT +++ b/CHANGES.TOOLKIT @@ -1,3 +1,8 @@ +Thu Nov 15 16:45:48 EET 2007 Pekka Riikonen + + * Fixed public key authentication as responder. Affected file + is lib/silcske/silcconnauth.c. + Tue Nov 13 18:24:56 EET 2007 Pekka Riikonen * Added missing channel unreferencing in CMODE, CUMODE, diff --git a/lib/silcske/silcconnauth.c b/lib/silcske/silcconnauth.c index 34af6824..ea3528fa 100644 --- a/lib/silcske/silcconnauth.c +++ b/lib/silcske/silcconnauth.c @@ -172,6 +172,7 @@ static void silc_connauth_verify_signature_cb(SilcBool success, return; } + SILC_LOG_DEBUG(("Signature is Ok")); SILC_FSM_CALL_CONTINUE(connauth->fsm); } @@ -646,14 +647,15 @@ SILC_FSM_STATE(silc_connauth_st_responder_authenticate) /* Allocate search constraints for finding the key */ find = silc_skr_find_alloc(); - if (!find || !connauth->auth_data) { + if (!find || !connauth->auth_data || !connauth->ske->prop->public_key) { /** Out of memory */ silc_fsm_next(fsm, silc_connauth_st_responder_failure); return SILC_FSM_CONTINUE; } - silc_skr_find_set_pkcs_type(find, connauth->ske->pk_type); - silc_skr_find_set_public_key(find, connauth->ske->public_key); + silc_skr_find_set_pkcs_type( + find, silc_pkcs_get_type(connauth->ske->prop->public_key)); + silc_skr_find_set_public_key(find, connauth->ske->prop->public_key); silc_skr_find_set_usage(find, (SILC_SKR_USAGE_AUTH | SILC_SKR_USAGE_KEY_AGREEMENT));