#1114 [MAN] Generting Symmetric key fails with key-generate when --usages verify is passed
Closed Opened by mrniranjan.

$ pki -d /opt/rhqa_pki/certs_db -c Secret123 -h dhcp207-176.lab.eng.pnq.redhat.com -p 30044 -n "KRA3_agentV" key-generate temp37867 --key-algorithm AES --key-size 128 --usages verify

IllegalArgumentException: Invalid usage "verify" specified.

The above error occurs irrespective of the Algorithm used.


verify is an option in the man page. It is not explicit as to how to use the option. If it is not being used as intended, a better user experience would be to tell them why it is illegal. But at least, the man page needs to explain the usage properly.

Per CS/DS meeting of 08/25/2014: 10.2.3

Per Dogtag 10.2.X meeting of 01/14/2015: Milestone 10.2 Backlog

As this ticket relates to a man page, no specific Bugzilla Bug is required.

Per PKI Bug Council of 06/23/2016: 10.3.4

edewata asked to re-assign this to vakwetu and mark it major

This looks to be pretty straightforward. I have not verified this by checking code, but the most likely explanation (based on trial and error) is that "verify" is a usage that is valid for asymmetric keys only. So this is just a doc change.

Which means that the usage:

--usages Comma separated list of usages.
Valid values: wrap, unwrap, sign,
verify, encrypt, decrypt.
Additional usages for RSA and DSA type
keys: derive, sign_recover,
verify_recover.

should be:

--usages Comma separated list of usages.
Valid values: wrap, unwrap, sign,
encrypt, decrypt.
Additional usages for RSA and DSA type
keys: derive, sign_recover,
verify_recover, verify

Metadata Update from @mrniranjan:
- Issue assigned to jmagne
- Issue set to the milestone: 10.3.4

Metadata Update from @mharmsen:
- Custom field feature adjusted to ''
- Custom field proposedmilestone adjusted to ''
- Custom field proposedpriority adjusted to ''
- Custom field reviewer adjusted to ''
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1238684 (was: 0)
- Custom field version adjusted to ''
- Issue close_status updated to: None (was: Fixed)

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1677

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata