[gnome-keyring/wip/nielsdg/add-portal-label] secret-portal: Set a label for an application key
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/wip/nielsdg/add-portal-label] secret-portal: Set a label for an application key
- Date: Mon, 1 Jun 2020 12:31:34 +0000 (UTC)
commit 77e90f88c19dd15e033065a7ab9e5c7e4ab1ca41
Author: Niels De Graef <nielsdegraef gmail com>
Date: Mon Jun 1 14:13:15 2020 +0200
secret-portal: Set a label for an application key
This way, clients like Seahorse (Passwords & Keys) can show something
meaningful to the user.
daemon/dbus/gkd-secret-portal.c | 5 +++++
pkcs11/wrap-layer/mock-secret-store.c | 2 ++
2 files changed, 7 insertions(+)
---
diff --git a/daemon/dbus/gkd-secret-portal.c b/daemon/dbus/gkd-secret-portal.c
index 4663b7b9..66a56644 100644
--- a/daemon/dbus/gkd-secret-portal.c
+++ b/daemon/dbus/gkd-secret-portal.c
@@ -325,6 +325,7 @@ create_secret_value (GkdSecretPortal *self,
GckObject *item;
GckSession *session;
guint8 *value;
+ char *label;
value = g_new0 (guint8, PORTAL_DEFAULT_KEY_SIZE);
*n_value = PORTAL_DEFAULT_KEY_SIZE;
@@ -342,6 +343,10 @@ create_secret_value (GkdSecretPortal *self,
return NULL;
}
+ label = g_strdup_printf (_("Application key for %s"), app_id);
+ gck_builder_add_string (&builder, CKA_LABEL, label);
+ g_free (label);
+
gck_builder_add_string (&builder, CKA_G_COLLECTION, self->collection);
gck_builder_add_ulong (&builder, CKA_CLASS, CKO_SECRET_KEY);
gck_builder_add_boolean (&builder, CKA_TOKEN, TRUE);
diff --git a/pkcs11/wrap-layer/mock-secret-store.c b/pkcs11/wrap-layer/mock-secret-store.c
index 3ec0f65d..ef982fba 100644
--- a/pkcs11/wrap-layer/mock-secret-store.c
+++ b/pkcs11/wrap-layer/mock-secret-store.c
@@ -28,6 +28,8 @@
#include "wrap-layer/gkm-wrap-layer.h"
+#include <glib/gi18n.h>
+
static guint secret_identifier = 8800;
EGG_SECURE_DEFINE_GLIB_GLOBALS ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]