Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2001 - 2008 Pekka Riikonen
+ Copyright (C) 2001 - 2014 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
sizeof(sender->fingerprint));
if (strcmp(fingerprint, fingerprint2)) {
/* since the public key differs from the senders public key, the
- verification _failed_ */
+ verification won't be done */
silc_pkcs_public_key_free(pk);
silc_free(fingerprint);
- ret = SILC_MSG_SIGNED_UNKNOWN;
+ silc_free(fingerprint2);
+ return SILC_MSG_SIGNED_UNKNOWN;
}
silc_free(fingerprint2);
}
tmp = cp;
}
- chanrec->topic = *tmp == '\0' ? NULL : g_strdup(tmp);
+ chanrec->topic = (tmp && *tmp == '\0' ? NULL : g_strdup(tmp));
signal_emit("channel topic changed", 1, chanrec);
silc_free(dm);
if (idle && nickname) {
memset(buf, 0, sizeof(buf));
- snprintf(buf, sizeof(buf) - 1, "%lu %s",
+ snprintf(buf, sizeof(buf) - 1, "%u %s",
idle > 60 ? (idle / 60) : idle,
idle > 60 ? "minutes" : "seconds");
SilcBool success = (reason == KeyboardCompletionSuccess);
if (success && (line[0] == 'Y' || line[0] == 'y')) {
- /* Call the completion */
- if (verify->completion)
- verify->completion(TRUE, verify->context);
-
/* Save the key for future checking */
silc_pkcs_save_public_key(verify->filename, verify->public_key,
SILC_PKCS_FILE_BASE64);
+
+ /* Call the completion */
+ if (verify->completion)
+ verify->completion(TRUE, verify->context);
} else {
/* Call the completion */
if (verify->completion)
"server" : "client");
int i;
- server = (SILC_SERVER_REC*)conn->context;
- SILC_VERIFY(server);
- if (!server) {
- if (completion)
- completion(FALSE, context);
- return;
+ if (conn_type != SILC_CONN_CLIENT) {
+ server = (SILC_SERVER_REC*)conn->context;
+ SILC_VERIFY(server);
+ if (!server) {
+ if (completion)
+ completion(FALSE, context);
+ return;
+ }
}
if (silc_pkcs_get_type(public_key) != SILC_PKCS_SILC) {