X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilc%2Fclient_ops.c;h=66e88bda2498da934e003d0170e550f237b769c4;hb=ab7251f985a453b36972bb1286f3439847b844aa;hp=f7c3964c19513376349a307ad2eb35ebb8cb8006;hpb=9d79cbd71baf62a6a4465240ce17d6b19077f488;p=silc.git diff --git a/apps/silc/client_ops.c b/apps/silc/client_ops.c index f7c3964c..66e88bda 100644 --- a/apps/silc/client_ops.c +++ b/apps/silc/client_ops.c @@ -893,6 +893,28 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn, } break; + case SILC_COMMAND_GETKEY: + { + SilcIdType id_type; + void *entry; + SilcPublicKey public_key; + unsigned char *pk; + uint32 pk_len; + + id_type = va_arg(vp, SilcIdType); + entry = va_arg(vp, void *); + public_key = va_arg(vp, SilcPublicKey); + + pk = silc_pkcs_public_key_encode(public_key, &pk_len); + + if (id_type == SILC_ID_CLIENT) { + silc_verify_public_key(client, conn, SILC_SOCKET_TYPE_CLIENT, + pk, pk_len, SILC_SKE_PK_TYPE_SILC); + } + + silc_free(pk); + } + default: break; }