[gnome-keyring] Fix support for rsa1 keys
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-keyring] Fix support for rsa1 keys
- Date: Fri, 9 Oct 2009 00:18:20 +0000 (UTC)
commit e27b1c9b274fb58dc9724f0d176211312a035053
Author: Vincent Untz <vuntz gnome org>
Date: Thu Oct 8 16:25:11 2009 +0200
Fix support for rsa1 keys
Read the comment, instead of ignoring it and using the bytes as if they
were constraints.
https://bugzilla.gnome.org/show_bug.cgi?id=597813
Signed-off-by: Stef Walter <stef memberwebs com>
pkcs11/ssh-agent/gck-ssh-agent-ops.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/pkcs11/ssh-agent/gck-ssh-agent-ops.c b/pkcs11/ssh-agent/gck-ssh-agent-ops.c
index d3507f4..6b5b494 100644
--- a/pkcs11/ssh-agent/gck-ssh-agent-ops.c
+++ b/pkcs11/ssh-agent/gck-ssh-agent-ops.c
@@ -685,6 +685,7 @@ op_v1_add_identity (GckSshAgentCall *call)
{
GP11Attributes *pub, *priv;
GP11Session *session;
+ gchar *comment = NULL;
gboolean ret;
gsize offset = 5;
guint32 unused;
@@ -702,6 +703,15 @@ op_v1_add_identity (GckSshAgentCall *call)
return FALSE;
}
+ /* Get the comment */
+ if (!egg_buffer_get_string (call->req, offset, &offset, &comment, (EggBufferAllocator)g_realloc)) {
+ gp11_attributes_unref (pub);
+ gp11_attributes_unref (priv);
+ return FALSE;
+ }
+
+ g_free (comment);
+
gp11_attributes_add_string (priv, CKA_LABEL, V1_LABEL);
gp11_attributes_add_string (pub, CKA_LABEL, V1_LABEL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]