mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-22 20:32:05 +01:00
SOP encrypt: match signature type when using --as= option
This commit is contained in:
parent
30a62daec9
commit
4782868bc1
1 changed files with 5 additions and 1 deletions
|
@ -60,7 +60,11 @@ public class EncryptImpl implements Encrypt {
|
|||
signingOptions = SigningOptions.get();
|
||||
}
|
||||
try {
|
||||
signingOptions.addInlineSignatures(SecretKeyRingProtector.unprotectedKeys(), keys, DocumentSignatureType.BINARY_DOCUMENT);
|
||||
signingOptions.addInlineSignatures(
|
||||
SecretKeyRingProtector.unprotectedKeys(),
|
||||
keys,
|
||||
(encryptAs == EncryptAs.Binary ? DocumentSignatureType.BINARY_DOCUMENT : DocumentSignatureType.CANONICAL_TEXT_DOCUMENT)
|
||||
);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new SOPGPException.KeyCannotSign();
|
||||
} catch (WrongPassphraseException e) {
|
||||
|
|
Loading…
Reference in a new issue