Fix and improve pgp-keys handling.