Also add test that we properly set flags on a subkey. When there are two signatures, always the one which expires later should be taken (or the one that extends key lifetime infinitely). Then, subkey should take flags of selected signature, never combination of many signatures.
There might be a case that there is an RSA key that has one signature with Flags=Sign, and another one with Flags=Encrypt. Both valid. If the one with Flags=Encrypt extends key lifetime further and is selected, key will not be used to verify messages.
TODO:
[x] unit test if subkey generation and signing with cross signature works
Also add test that we properly set flags on a subkey. When there are two signatures, always the one which expires later should be taken (or the one that extends key lifetime infinitely). Then, subkey should take flags of selected signature, never combination of many signatures.
There might be a case that there is an RSA key that has one signature with
Flags=Sign
, and another one withFlags=Encrypt
. Both valid. If the one withFlags=Encrypt
extends key lifetime further and is selected, key will not be used to verify messages.TODO: