silc_pubkey = silc_pkcs_get_context(SILC_PKCS_SILC, public_key);
if (success) {
- if (getkey->id_type == SILC_ID_CLIENT)
- printformat_module("fe-common/silc", NULL, NULL,
- MSGLEVEL_CRAP, SILCTXT_PUBKEY_VERIFIED_CLIENT,
- name,
- silc_pubkey->identifier.realname ?
- silc_pubkey->identifier.realname : "",
- silc_pubkey->identifier.email ?
- silc_pubkey->identifier.email : "");
- else
+ /* Client's verification notice was showed in verify_internal() */
+ if (getkey->id_type != SILC_ID_CLIENT)
printformat_module("fe-common/silc", NULL, NULL,
MSGLEVEL_CRAP, SILCTXT_PUBKEY_VERIFIED,
entity, name);
SilcPublicKey local_pubkey;
SilcSILCPublicKey silc_pubkey;
SilcUInt16 port;
- SILC_SERVER_REC *server;
+ SILC_SERVER_REC *server = NULL;
const char *hostname, *ip;
unsigned char *pk;
SilcUInt32 pk_len;
"server" : "client");
int i;
+ server = (SILC_SERVER_REC*)conn->context;
if (conn_type != SILC_CONN_CLIENT) {
- server = (SILC_SERVER_REC*)conn->context;
SILC_VERIFY(server);
if (!server) {
if (completion)
}
}
+ /* If we have pending public key prompt already up */
+ if (server && server->prompt_op) {
+ silc_async_abort(server->prompt_op, NULL, NULL);
+ server->prompt_op = NULL;
+ }
+
if (silc_pkcs_get_type(public_key) != SILC_PKCS_SILC) {
printformat_module("fe-common/silc", NULL, NULL,
MSGLEVEL_CRAP, SILCTXT_PUBKEY_UNSUPPORTED,
fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
+ if (!name && conn->context_type == SILC_ID_CLIENT)
+ name = conn->client_entry->nickname;
+
verify = silc_calloc(1, sizeof(*verify));
verify->client = client;
verify->conn = conn;
return;
}
+ if (conn_type == SILC_CONN_CLIENT)
+ printformat_module("fe-common/silc", NULL, NULL,
+ MSGLEVEL_CRAP, SILCTXT_PUBKEY_VERIFIED_CLIENT,
+ (name
+ ? name
+ : (silc_pubkey->identifier.realname
+ ? silc_pubkey->identifier.realname
+ : (silc_pubkey->identifier.email
+ ? silc_pubkey->identifier.email
+ : ""))),
+ silc_pubkey->identifier.realname ?
+ silc_pubkey->identifier.realname : "",
+ silc_pubkey->identifier.email ?
+ silc_pubkey->identifier.email : "");
+
/* Local copy matched */
if (completion)
completion(TRUE, context);
/* Check whether we find the password for this server in our
configuration. If it's set, always send it server. */
- setup = server_setup_find_port(hostname, port);
+ setup = server_setup_find(hostname, port, "silcnet");
if (setup && setup->password) {
completion(SILC_AUTH_PASSWORD, setup->password, strlen(setup->password),
context);