Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2002 - 2002 Pekka Riikonen
+ Copyright (C) 2000 - 2002 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
silc_ske_payload_ke_free(ske->ke1_payload);
if (ske->ke2_payload)
silc_ske_payload_ke_free(ske->ke2_payload);
+ silc_free(ske->remote_version);
/* Free rest */
if (ske->prop) {
/* Compute signature data if we are doing mutual authentication */
if (private_key && ske->start_payload->flags & SILC_SKE_SP_FLAG_MUTUAL) {
- unsigned char hash[32], sign[1024];
+ unsigned char hash[32], sign[2048];
SilcUInt32 hash_len, sign_len;
SILC_LOG_DEBUG(("We are doing mutual authentication"));
SilcSKEStatus status = SILC_SKE_STATUS_OK;
SilcBuffer payload_buf;
SilcMPInt *KEY;
- unsigned char hash[32], sign[1024], *pk;
+ unsigned char hash[32], sign[2048], *pk;
SilcUInt32 hash_len, sign_len, pk_len;
SILC_LOG_DEBUG(("Start"));
}
}
+ ske->remote_version = silc_memdup(rp->version, rp->version_len);
+
/* Flags are returned unchanged. */
payload->flags = rp->flags;
/* Make the hash */
silc_hash_make(ske->prop->hash, buf->data, buf->len, return_hash);
- *return_hash_len = ske->prop->hash->hash->hash_len;
+ *return_hash_len = silc_hash_len(ske->prop->hash);
if (initiator == FALSE) {
SILC_LOG_HEXDUMP(("HASH"), return_hash, *return_hash_len);
char **software_version_string,
char **vendor_version)
{
- return silc_parse_version_string(ske->start_payload->version,
+ return silc_parse_version_string(ske->remote_version,
protocol_version,
protocol_version_string,
software_version,