Home GnuPG

Use hasX instead of canX to check key capabilities

Description

Use hasX instead of canX to check key capabilities

In these cases we also want expired encryption keys to match. Therefore,
we need to use the new hasX capability queries. For example, canEncrypt()
returns false for an expired key with encryption subkey (if the primary
subkey does not support encryption).