diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-03-11 03:24:32 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-03-11 03:24:32 +0100 |
commit | a9268421d79b30c9af5be12d2d902abcd363a60b (patch) | |
tree | 03aaa5be25cea44020ab8f6ee36d8212206e0c6a /src/exchangedb/exchangedb_denomkeys.c | |
parent | 82ce84fe67e14ff547bdca068c39511d8c0125fb (diff) | |
download | exchange-a9268421d79b30c9af5be12d2d902abcd363a60b.tar.xz |
implementing private key deletion (#5536)
Diffstat (limited to 'src/exchangedb/exchangedb_denomkeys.c')
-rw-r--r-- | src/exchangedb/exchangedb_denomkeys.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/exchangedb/exchangedb_denomkeys.c b/src/exchangedb/exchangedb_denomkeys.c index 418a1074b..32955dcc1 100644 --- a/src/exchangedb/exchangedb_denomkeys.c +++ b/src/exchangedb/exchangedb_denomkeys.c @@ -158,8 +158,14 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename, if (0 == GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh (dki->issue.properties.expire_withdraw)).rel_value_us) { - /* FIXME: #5536: we should delete this file, the - private key is no longer needed (and return SYSERR!) */ + if (0 != UNLINK (filename)) + { + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, + "unlink", + filename); + return GNUNET_OK; /* yes, we had an error, but the file content + was fine and is being returned */ + } } return GNUNET_OK; } |