From: Pekka Riikonen Date: Sat, 21 Jul 2007 19:10:03 +0000 (+0000) Subject: Fixed signature format (alg name). X-Git-Tag: 1.2.beta1~153 X-Git-Url: http://git.silcnet.org/gitweb/?p=crypto.git;a=commitdiff_plain;h=c5d842790fe5d908176afd2262350e04fd97194f Fixed signature format (alg name). --- diff --git a/lib/silcssh/silcssh_pkcs.c b/lib/silcssh/silcssh_pkcs.c index 9417ad75..900f108b 100644 --- a/lib/silcssh/silcssh_pkcs.c +++ b/lib/silcssh/silcssh_pkcs.c @@ -860,12 +860,17 @@ static void silc_pkcs_ssh_sign_cb(SilcBool success, { SilcSshSign sign = context; SilcBufferStruct sig; + const char *name; + + if (!strcmp(sign->privkey->pkcs->name, "rsa")) + name = "ssh-rsa"; + else + name = "ssh-dss"; memset(&sig, 0, sizeof(sig)); if (silc_buffer_format(&sig, - SILC_STR_UI_INT(7), - SILC_STR_UI32_STRING("ssh-"), - SILC_STR_UI32_STRING(sign->privkey->pkcs->name), + SILC_STR_UI_INT(strlen(name)), + SILC_STR_UI32_STRING(name), SILC_STR_UI_INT(signature_len), SILC_STR_DATA(signature, signature_len), SILC_STR_END) < 0) {