Skip to content

Commit 0503e2a

Browse files
committed
Merge branch '1782-pgpsignature-salt' into 'main'
Use the proper method to update a signature with salt See merge request root/bc-java!26
2 parents a7930a2 + 345c720 commit 0503e2a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pg/src/main/java/org/bouncycastle/openpgp/PGPSignature.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,18 @@ private void checkSaltSize()
349349
}
350350

351351
private void updateWithSalt()
352+
throws PGPException
352353
{
353354
if (getVersion() == SignaturePacket.VERSION_6)
354355
{
355-
update(sigPck.getSalt());
356+
try
357+
{
358+
sigOut.write(sigPck.getSalt());
359+
}
360+
catch (IOException e)
361+
{
362+
throw new PGPException("Could not update with salt.", e);
363+
}
356364
}
357365
}
358366

0 commit comments

Comments
 (0)