]> the.earth.li Git - onak.git/commit
Fix deletion of keys with PostgreSQL backend
authorJonathan McDowell <noodles@earth.li>
Sun, 3 Jul 2022 10:16:14 +0000 (11:16 +0100)
committerJonathan McDowell <noodles@earth.li>
Sun, 3 Jul 2022 10:16:14 +0000 (11:16 +0100)
commit67f26da9c26e544b723ac73ac67383519c873e30
treed647aed65d7677434f4a41b58a5de378c3f150e5
parent30a4eee133c15503dad435c8ce41953d94492c28
Fix deletion of keys with PostgreSQL backend

In pg_delete_key() we deleted the key from onak_keys as the first
action, which would fail because the other tables had a reference to
that object via a foreign key relation. The correct approach is to
delete the key itself last, after the signature and UID tables have had
their entries deleted.
keydb/keydb_pg.c