Replace voodoo key usage code with something that actually works.

The code that was there wasn't merely wrong, it was bad at being
wrong.

Signed-off-by: Peter Jones <pjones@redhat.com>