Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Use RSA_ENCRYPT_OR_SIGN for generated keys #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void dataSigning_succeeds() throws Exception {
SignedSignatureAttributes parsedSig = SignedSignatureAttributes.parse(new DataInputStream(new ByteArrayInputStream(serializedSig)));

Assert.assertTrue(parsedSig.attributes.attributes.hashAlgorithm == HashAlgorithm.SHA512);
Assert.assertTrue(parsedSig.attributes.attributes.pkAlgorithm == PublicKeyAlgorithm.RSA_SIGN_ONLY);
Assert.assertTrue(parsedSig.attributes.attributes.pkAlgorithm == PublicKeyAlgorithm.RSA_ENCRYPT_OR_SIGN);
Assert.assertTrue(parsedSig.attributes.attributes.type == SignatureType.BINARY);
Assert.assertFalse(parsedSig.attributes.attributes.unhashedSubpackets.issuer.header.type.critical);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public PublicKeyData pgpPublicKeyData() {
public PublicKeyPacketAttributes pgpPublicKeyPacketAttributes() {
return new PublicKeyPacketAttributes(
created,
PublicKeyAlgorithm.RSA_SIGN_ONLY
PublicKeyAlgorithm.RSA_ENCRYPT_OR_SIGN
);
}

Expand Down