Changeset View
Changeset View
Standalone View
Standalone View
b/sm/keydb.c
Context not available. | |||||
return gpg_error (GPG_ERR_ENOMEM);; | return gpg_error (GPG_ERR_ENOMEM);; | ||||
} | } | ||||
if (ephemeral) | keydb_set_ephemeral (kh, 1); | ||||
keydb_set_ephemeral (kh, 1); | |||||
rc = lock_all (kh); | rc = lock_all (kh); | ||||
if (rc) | if (rc) | ||||
Context not available. | |||||
{ | { | ||||
if (existed) | if (existed) | ||||
*existed = 1; | *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 */ | return 0; /* okay */ | ||||
} | } | ||||
log_error (_("problem looking for existing certificate: %s\n"), | log_error (_("problem looking for existing certificate: %s\n"), | ||||
Context not available. | |||||
return rc; | return rc; | ||||
} | } | ||||
if (!ephemeral) | |||||
keydb_set_ephemeral (kh, 0); | |||||
rc = keydb_locate_writable (kh, 0); | rc = keydb_locate_writable (kh, 0); | ||||
if (rc) | if (rc) | ||||
{ | { | ||||
Context not available. |