X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilc%2Fclient_ops.c;h=bfd3a2057e3e7c5e0b8c297c83d98d1852fa1a69;hb=7442402559fc951743360779cede89e0efcb63bf;hp=985be666d654b7a2dd5b90225b7f254cb4d00aa8;hpb=01ffee11d0a5ad7c35c34908035a1713ecfca506;p=silc.git diff --git a/apps/silc/client_ops.c b/apps/silc/client_ops.c index 985be666..bfd3a205 100644 --- a/apps/silc/client_ops.c +++ b/apps/silc/client_ops.c @@ -1195,7 +1195,40 @@ int silc_get_auth_method(SilcClient client, SilcClientConnection conn, void silc_failure(SilcClient client, SilcClientConnection conn, SilcProtocol protocol, void *failure) { + if (protocol->protocol->type == SILC_PROTOCOL_CLIENT_KEY_EXCHANGE) { + SilcSKEStatus status = (SilcSKEStatus)failure; + + if (status == SILC_SKE_STATUS_BAD_VERSION) + silc_say(client, conn, + "You are running incompatible client version (it may be " + "too old or too new)"); + if (status == SILC_SKE_STATUS_UNSUPPORTED_PUBLIC_KEY) + silc_say(client, conn, "Server does not support your public key type"); + if (status == SILC_SKE_STATUS_UNKNOWN_GROUP) + silc_say(client, conn, + "Server does not support one of your proposed KE group"); + if (status == SILC_SKE_STATUS_UNKNOWN_CIPHER) + silc_say(client, conn, + "Server does not support one of your proposed cipher"); + if (status == SILC_SKE_STATUS_UNKNOWN_PKCS) + silc_say(client, conn, + "Server does not support one of your proposed PKCS"); + if (status == SILC_SKE_STATUS_UNKNOWN_HASH_FUNCTION) + silc_say(client, conn, + "Server does not support one of your proposed hash function"); + if (status == SILC_SKE_STATUS_UNKNOWN_HMAC) + silc_say(client, conn, + "Server does not support one of your proposed HMAC"); + if (status == SILC_SKE_STATUS_INCORRECT_SIGNATURE) + silc_say(client, conn, "Incorrect signature"); + } + if (protocol->protocol->type == SILC_PROTOCOL_CLIENT_CONNECTION_AUTH) { + uint32 err = (uint32)failure; + + if (err == SILC_AUTH_FAILED) + silc_say(client, conn, "Authentication failed"); + } } /* Asks whether the user would like to perform the key agreement protocol.