Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F37955117
D287.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
D287.id.diff
View Options
Index: b/sm/keydb.c
===================================================================
--- b/sm/keydb.c
+++ b/sm/keydb.c
@@ -1110,8 +1110,7 @@
return gpg_error (GPG_ERR_ENOMEM);;
}
- if (ephemeral)
- keydb_set_ephemeral (kh, 1);
+ keydb_set_ephemeral (kh, 1);
rc = lock_all (kh);
if (rc)
@@ -1125,6 +1124,19 @@
{
if (existed)
*existed = 1;
+ if (!ephemeral)
+ {
+ /* Remove ephemeral flags from existing certificate to "store"
+ it permanently. */
+ rc = keydb_set_cert_flags (cert, 1, KEYBOX_FLAG_BLOB, 0,
+ KEYBOX_FLAG_BLOB_EPHEMERAL, 0);
+ if (rc)
+ {
+ log_error ("clearing ephemeral flag failed: %s\n",
+ gpg_strerror (rc));
+ return rc;
+ }
+ }
return 0; /* okay */
}
log_error (_("problem looking for existing certificate: %s\n"),
@@ -1132,6 +1144,9 @@
return rc;
}
+ if (!ephemeral)
+ keydb_set_ephemeral (kh, 0);
+
rc = keydb_locate_writable (kh, 0);
if (rc)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 18, 6:08 PM (2 h, 23 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
72/96/8af1cbde3ada12f2330d56820d43
Attached To
D287: 648_0001-sm-Fix-cert-storage-for-ephemeral-certs.patch
Event Timeline
Log In to Comment