Fix bug #3040, "Handle revoked GPG private keys". Patch by Palmer Dabbelt.