Re: Fw: SILC client connection issue
"Hansa" <[email protected]> Tue, 31 Mar 2009 16:48:26 +0530
| Newsgroups | gmane.network.silc.devel |
|---|---|
| Message-ID | <008101c9b1f2$6a46da00$ab01a8c0@hansa> |
This is a multi-part message in MIME format. --===============0666149845== Content-Type: multipart/alternative; boundary="----=_NextPart_000_007E_01C9B220.831C7E30" This is a multi-part message in MIME format. ------=_NextPart_000_007E_01C9B220.831C7E30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Ivo, Nice to hear from you. I tried a lot with your suggestion, but it is still not solving the = problem i have. Thanks Hansa ----- Original Message -----=20 From: Ivo Clarysse=20 To: Hansa=20 Cc: silc-devel-cR8azDVoa3JZ/hxrHI3Fm9i2O/[email protected]=20 Sent: Tuesday, March 31, 2009 3:13 PM Subject: Re: Fw: SILC client connection issue I had similar problems with silc-toolkit 1.1.9. I would suggest to look at the version of the private key you = imported. silcpk.c:silc_pkcs_silc_export_private_key(..) will always save a private key in with version = SILC_PRIVATE_KEY_VERSION_1, but silcpk.c:silc_pkcs_silc_export_public_key(...) will include an identifier with the actual version. So, when you create a version 2 key pair, and save those keys using = the above mentioned silcpk.c functions, you end up with a private key in = version 1, and a public key in version 2. Signing with a version 1 key will generate a signature without OID. When verifying the signature (using the version 2 public key), a = signature with OID is expected. Since this is not present, the = signature is treated as invalid. I worked around this by manually importing the private key, and = explicitly setting it as a version 2 key: [...] pkcs =3D silc_pkcs_find_algorithm("rsa", "pkcs1"); // WITH OID silc_privkey =3D silc_calloc(1, sizeof(*silc_privkey)); silc_privkey->pkcs =3D pkcs; if (!pkcs->import_private_key(key_data, key_data_len, &silc_privkey->private_key)) { fprintf(stderr, "Failed to import key\n"); exit(1); } *pvt =3D silc_calloc(1, sizeof(**pvt)); (**pvt).private_key =3D silc_privkey; (**pvt).pkcs =3D silc_pkcs_find_pkcs(SILC_PKCS_SILC); [...] Best regards, Ivo. 2009/3/31 Hansa <[email protected]> Hi, I am developing SILC client in WindowsXP. I have compiled SILC = toolkit 0.9.8 and it was working fine. But I want to upgrade so i used latest one (1.1.8 and 1.1.9) and I = am not able to connect with SILC Server. I am just trying mybot test application for this testing. It gives = me following error. Error during key exchange with x.x.x.x: Incorrect signature Can you pls give me quick help on this as I am running in tight = condition. Thanks & Regards Hansa ------=_NextPart_000_007E_01C9B220.831C7E30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2900.2853" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hi Ivo,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Nice to hear from you.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>I tried a lot with your suggestion, but = it is still=20 not solving the problem i have.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Hansa</FONT></DIV> <BLOCKQUOTE=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A [email protected] = href=3D"mailto:[email protected]">Ivo=20 Clarysse</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = [email protected]=20 href=3D"mailto:[email protected]">Hansa</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>Cc:</B> <A = title=3Dsilc-devel-cR8azDVoa3JZ/hxrHI3Fm9i2O/[email protected]=20 = href=3D"mailto:silc-devel-cR8azDVoa3JZ/hxrHI3Fm9i2O/[email protected]">silc-devel-cR8azDVoa3JZ/hxrHI3Fm9i2O/[email protected]= </A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, March 31, 2009 = 3:13=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Fw: SILC client = connection=20 issue</DIV> <DIV><BR></DIV>I had similar problems with silc-toolkit = 1.1.9.<BR><BR>I would=20 suggest to look at the version of the private key you=20 = imported.<BR><BR>silcpk.c:silc_pkcs_silc_export_private_key(..)<BR><BR>wi= ll=20 always save a private key in with version SILC_PRIVATE_KEY_VERSION_1,=20 but<BR><BR>silcpk.c:silc_pkcs_silc_export_public_key(...)<BR><BR>will = include=20 an identifier with the actual version.<BR><BR>So, when you create a = version 2=20 key pair, and save those keys using the above mentioned silcpk.c = functions,=20 you end up with a private key in version 1, and a public key in = version=20 2.<BR><BR>Signing with a version 1 key will generate a signature = without=20 OID.<BR><BR>When verifying the signature (using the version 2 public = key), a=20 signature with OID is expected. Since this is not present, the = signature=20 is treated as invalid.<BR><BR>I worked around this by manually = importing the=20 private key, and explicitly setting it as a version 2=20 key:<BR><BR> = [...]<BR> =20 pkcs =3D silc_pkcs_find_algorithm("rsa", "pkcs1"); // WITH=20 OID<BR><BR> silc_privkey =3D = silc_calloc(1,=20 sizeof(*silc_privkey));<BR> =20 silc_privkey->pkcs =3D=20 pkcs;<BR><BR> if=20 (!pkcs->import_private_key(key_data,=20 = key_data_len,<BR> &n= bsp; &nb= sp; =20 &silc_privkey->private_key))=20 = {<BR> &n= bsp; =20 fprintf(stderr, "Failed to import=20 = key\n");<BR> &= nbsp; =20 exit(1);<BR> =20 }<BR><BR> *pvt =3D = silc_calloc(1,=20 sizeof(**pvt));<BR><BR> =20 (**pvt).private_key =3D=20 silc_privkey;<BR> = (**pvt).pkcs =3D=20 silc_pkcs_find_pkcs(SILC_PKCS_SILC);<BR> =20 [...]<BR><BR><BR>Best regards,<BR><BR>Ivo.<BR><BR> <DIV class=3Dgmail_quote>2009/3/31 Hansa <SPAN dir=3Dltr><<A=20 = href=3D"mailto:[email protected]">[email protected]</A>></SPAN><BR= > <BLOCKQUOTE class=3Dgmail_quote=20 style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: = rgb(204,204,204) 1px solid"> <DIV bgcolor=3D"#ffffff"> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I am developing SILC client in = WindowsXP. I=20 have compiled SILC toolkit 0.9.8 and it was working = fine.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>But I want to upgrade so i used = latest one=20 (1.1.8 and 1.1.9) and I am not able to connect with SILC=20 Server.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I am just trying mybot test = application for=20 this testing. It gives me following error.</FONT></DIV> <DIV><FONT face=3DArial color=3D#ff0000 size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#ff0000 size=3D2>Error during key = exchange with=20 x.x.x.x: Incorrect signature</FONT></DIV> <DIV><FONT face=3DArial color=3D#ff0000 size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Can you pls give me quick help on = this as I am=20 running in tight condition.</FONT></DIV> <DIV><FONT face=3DArial color=3D#ff0000 size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Thanks & Regards</FONT></DIV> <DIV><FONT face=3DArial=20 = size=3D2>Hansa</FONT></DIV></DIV><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQU= OTE></BODY></HTML> ------=_NextPart_000_007E_01C9B220.831C7E30-- --===============0666149845== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________________________________ Info: https://lists.silcnet.org/mailman/listinfo/silc-announce Archive: https://lists.silcnet.org/pipermail/silc-announce FAQ: http://silcnet.org/support/faq/ --===============0666149845==--