X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fclient_prvmsg.c;h=7c251d817a5b573417b101a6bc9654d436c7b8fe;hb=b380893d96cb8d673cdd57a2383195903078ce7d;hp=2d065abe6406e005ff4f58c70cb8cd0c665cdffc;hpb=c2b07fdc09d15d9eb661cbc8ae1bc4acd9cb4bcd;p=silc.git diff --git a/lib/silcclient/client_prvmsg.c b/lib/silcclient/client_prvmsg.c index 2d065abe..7c251d81 100644 --- a/lib/silcclient/client_prvmsg.c +++ b/lib/silcclient/client_prvmsg.c @@ -456,13 +456,15 @@ int silc_client_send_private_message_key(SilcClient client, SilcSocketConnection sock = conn->sock; SilcBuffer buffer; int cipher_len; + const char *cipher; if (!client_entry->send_key || !client_entry->key) return FALSE; SILC_LOG_DEBUG(("Sending private message key")); - cipher_len = strlen(client_entry->send_key->cipher->name); + cipher = silc_cipher_get_name(client_entry->send_key); + cipher_len = strlen(cipher); /* Create private message key payload */ buffer = silc_buffer_alloc(2 + client_entry->key_len); @@ -472,7 +474,7 @@ int silc_client_send_private_message_key(SilcClient client, SILC_STR_UI_XNSTRING(client_entry->key, client_entry->key_len), SILC_STR_UI_SHORT(cipher_len), - SILC_STR_UI_XNSTRING(client_entry->send_key->cipher->name, + SILC_STR_UI_XNSTRING(cipher, cipher_len), SILC_STR_END); @@ -548,7 +550,7 @@ silc_client_list_private_message_keys(SilcClient client, if (entry->send_key) { keys[count].client_entry = entry; - keys[count].cipher = entry->send_key->cipher->name; + keys[count].cipher = (char *)silc_cipher_get_name(entry->send_key); keys[count].key = entry->generated == FALSE ? entry->key : NULL; keys[count].key_len = entry->generated == FALSE ? entry->key_len : 0; count++;