1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-06 20:31:08 +01:00

Replace JcaPGPObjectFactory with custom PGPObjectFactory.

Workaround for https://github.com/bcgit/bc-java/issues/1428
This commit is contained in:
Paul Schaub 2023-06-15 15:20:08 +02:00
parent 56cb9ba3c6
commit 82cea93e7b
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 11 additions and 9 deletions

View file

@ -15,7 +15,6 @@ import org.bouncycastle.openpgp.PGPPrivateKey;
import org.bouncycastle.openpgp.PGPPublicKey;
import org.bouncycastle.openpgp.PGPSecretKey;
import org.bouncycastle.openpgp.PGPSessionKey;
import org.bouncycastle.openpgp.jcajce.JcaPGPObjectFactory;
import org.bouncycastle.openpgp.operator.KeyFingerPrintCalculator;
import org.bouncycastle.openpgp.operator.PBEDataDecryptorFactory;
import org.bouncycastle.openpgp.operator.PBEKeyEncryptionMethodGenerator;
@ -139,11 +138,11 @@ public class JceImplementationFactory extends ImplementationFactory {
@Override
public PGPObjectFactory getPGPObjectFactory(InputStream inputStream) {
return new JcaPGPObjectFactory(inputStream);
return new PGPObjectFactory(inputStream, ImplementationFactory.getInstance().getKeyFingerprintCalculator());
}
@Override
public PGPObjectFactory getPGPObjectFactory(byte[] bytes) {
return new JcaPGPObjectFactory(bytes);
return new PGPObjectFactory(bytes, ImplementationFactory.getInstance().getKeyFingerprintCalculator());
}
}