From c5d842790fe5d908176afd2262350e04fd97194f Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 21 Jul 2007 19:10:03 +0000 Subject: [PATCH] Fixed signature format (alg name). --- lib/silcssh/silcssh_pkcs.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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) { -- 2.24.0