Return value of crypto_pk_get_digest for v3 legacy keys is ignored

This buglet is best described by the patch to fix it.