projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Protocol version 1.2 integrations
[silc.git]
/
lib
/
silcclient
/
command_reply.c
diff --git
a/lib/silcclient/command_reply.c
b/lib/silcclient/command_reply.c
index e1c03f38870fb3c4032c763fb2e32308f81295b2..67d8f666790a46fb943df753ca549dd93547fe04 100644
(file)
--- a/
lib/silcclient/command_reply.c
+++ b/
lib/silcclient/command_reply.c
@@
-1770,10
+1770,8
@@
SILC_CLIENT_CMD_REPLY_FUNC(getkey)
SilcClientEntry client_entry;
SilcServerID *server_id = NULL;
SilcServerEntry server_entry;
SilcClientEntry client_entry;
SilcServerID *server_id = NULL;
SilcServerEntry server_entry;
- SilcSKEPKType type;
- unsigned char *tmp, *pk;
+ unsigned char *tmp;
SilcUInt32 len;
SilcUInt32 len;
- SilcUInt16 pk_len;
SilcIdType id_type;
SilcPublicKey public_key = NULL;
SilcIdType id_type;
SilcPublicKey public_key = NULL;
@@
-1800,15
+1798,9
@@
SILC_CLIENT_CMD_REPLY_FUNC(getkey)
/* Get the public key payload */
tmp = silc_argument_get_arg_type(cmd->args, 3, &len);
if (tmp) {
/* Get the public key payload */
tmp = silc_argument_get_arg_type(cmd->args, 3, &len);
if (tmp) {
- /* Decode the public key */
- SILC_GET16_MSB(pk_len, tmp);
- SILC_GET16_MSB(type, tmp + 2);
- pk = tmp + 4;
-
- if (type == SILC_SKE_PK_TYPE_SILC)
- if (!silc_pkcs_public_key_decode(pk, pk_len, &public_key))
- public_key = NULL;
- }
+ if (!silc_pkcs_public_key_payload_decode(tmp, len, &public_key))
+ public_key = NULL;
+ }
id_type = silc_id_payload_get_type(idp);
if (id_type == SILC_ID_CLIENT) {
id_type = silc_id_payload_get_type(idp);
if (id_type == SILC_ID_CLIENT) {