X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fprotocol.c;h=e0d82738aa9c66c1e9b7f4d149ce7ddb3e9476ac;hb=b380893d96cb8d673cdd57a2383195903078ce7d;hp=8770fc0ff0abcdd05aa1a82b2ec737ae4887f0b6;hpb=c2b07fdc09d15d9eb661cbc8ae1bc4acd9cb4bcd;p=silc.git diff --git a/apps/silcd/protocol.c b/apps/silcd/protocol.c index 8770fc0f..e0d82738 100644 --- a/apps/silcd/protocol.c +++ b/apps/silcd/protocol.c @@ -219,6 +219,7 @@ int silc_server_protocol_ke_set_keys(SilcServer server, { SilcUnknownEntry conn_data; SilcIDListData idata; + const char *cname = silc_cipher_get_name(cipher); SILC_LOG_DEBUG(("Setting new keys into use")); @@ -226,14 +227,14 @@ int silc_server_protocol_ke_set_keys(SilcServer server, idata = (SilcIDListData)conn_data; /* Allocate cipher to be used in the communication */ - if (!silc_cipher_alloc(cipher->cipher->name, &idata->send_key)) { + if (!silc_cipher_alloc((char *)cname, &idata->send_key)) { silc_free(conn_data); - SILC_LOG_ERROR(("Cannot allocate algorithm: %s", cipher->cipher->name)); + SILC_LOG_ERROR(("Cannot allocate algorithm: %s", cname)); return FALSE; } - if (!silc_cipher_alloc(cipher->cipher->name, &idata->receive_key)) { + if (!silc_cipher_alloc((char *)cname, &idata->receive_key)) { silc_free(conn_data); - SILC_LOG_ERROR(("Cannot allocate algorithm: %s", cipher->cipher->name)); + SILC_LOG_ERROR(("Cannot allocate algorithm: %s", cname)); return FALSE; } @@ -314,7 +315,7 @@ int silc_server_protocol_ke_set_keys(SilcServer server, SILC_LOG_INFO(("%s (%s) security properties: %s %s %s %s", sock->hostname, sock->ip, - idata->send_key->cipher->name, + silc_cipher_get_name(idata->send_key), (char *)silc_hmac_get_name(idata->hmac_send), silc_hash_get_name(idata->hash), ske->prop->flags & SILC_SKE_SP_FLAG_PFS ? "PFS" : ""));