From: Pekka Riikonen Date: Thu, 3 May 2001 17:41:18 +0000 (+0000) Subject: updates. X-Git-Tag: SILC.0.2.2~4 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=33f84b077bc997ec84fd8ed79d14510228613f88;p=silc.git updates. --- diff --git a/CHANGES b/CHANGES index 9cf38b37..9985c831 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Thu May 3 21:23:50 EEST 2001 Pekka Riikonen + + * Check minor version as well in the SKE. Affected files are + silcd/protocol.c and lib/silcclient/protocol.c. + Wed May 2 20:50:49 EEST 2001 Pekka Riikonen * Register default ciphers and stuff when using -C option with diff --git a/lib/silccrypt/silcpkcs.c b/lib/silccrypt/silcpkcs.c index 146b3082..43ee60f3 100644 --- a/lib/silccrypt/silcpkcs.c +++ b/lib/silccrypt/silcpkcs.c @@ -445,27 +445,32 @@ SilcPublicKeyIdentifier silc_pkcs_decode_identifier(char *identifier) cp = identifier; while (cp) { len = strcspn(cp, ","); + if (len - 1 >= 0 && cp[len - 1] == '\\') { + cp += len + 1; + continue; + } + item = silc_calloc(len + 1, sizeof(char)); memcpy(item, cp, len); if (strstr(item, "UN=")) - ident->username = strdup(item + 3); + ident->username = strdup(item + strcspn(cp, "=") + 1); else if (strstr(item, "HN=")) - ident->host = strdup(item + 3); + ident->host = strdup(item + strcspn(cp, "=") + 1); else if (strstr(item, "RN=")) - ident->realname = strdup(item + 3); + ident->realname = strdup(item + strcspn(cp, "=") + 1); else if (strstr(item, "E=")) - ident->email = strdup(item + 2); + ident->email = strdup(item + strcspn(cp, "=") + 1); else if (strstr(item, "O=")) - ident->org = strdup(item + 2); + ident->org = strdup(item + strcspn(cp, "=") + 1); else if (strstr(item, "C=")) - ident->country = strdup(item + 2); + ident->country = strdup(item + strcspn(cp, "=") + 1); cp += len; if (strlen(cp) == 0) cp = NULL; else - cp += 2; + cp += 1; if (item) silc_free(item);