Update BouncyCastle to 1.77

This commit is contained in:
Vincent Breitmoser
2024-01-11 13:29:08 +01:00
parent e69ff0a2ad
commit 034eab9df1
6 changed files with 36 additions and 9 deletions

View File

@@ -72,7 +72,10 @@ public class CanonicalizedPublicKey extends UncachedPublicKey {
}
JcePublicKeyKeyEncryptionMethodGenerator getPubKeyEncryptionGenerator(boolean hiddenRecipients) {
return new JcePublicKeyKeyEncryptionMethodGenerator(mPublicKey, hiddenRecipients);
JcePublicKeyKeyEncryptionMethodGenerator generator =
new JcePublicKeyKeyEncryptionMethodGenerator(mPublicKey);
generator.setSessionKeyObfuscation(hiddenRecipients);
return generator;
}
public boolean canSign() {

View File

@@ -59,8 +59,8 @@ public class WrappedUserAttribute implements Serializable {
}
public static WrappedUserAttribute fromSubpacket (int type, byte[] data) {
UserAttributeSubpacket subpacket = new UserAttributeSubpacket(type, data);
PGPUserAttributeSubpacketVector vector = new PGPUserAttributeSubpacketVector(
UserAttributeSubpacket subpacket = UserAttributeSubpacket.create(type, data);
PGPUserAttributeSubpacketVector vector = PGPUserAttributeSubpacketVector.fromSubpackets(
new UserAttributeSubpacket[] { subpacket });
return new WrappedUserAttribute(vector);
@@ -86,7 +86,7 @@ public class WrappedUserAttribute implements Serializable {
UserAttributeSubpacket[] result = new UserAttributeSubpacket[list.size()];
list.toArray(result);
return new WrappedUserAttribute(
new PGPUserAttributeSubpacketVector(result));
PGPUserAttributeSubpacketVector.fromSubpackets(result));
}
/** Writes this object to an ObjectOutputStream. */
@@ -107,7 +107,7 @@ public class WrappedUserAttribute implements Serializable {
if ( ! UserAttributePacket.class.isInstance(p)) {
throw new IOException("Could not decode UserAttributePacket!");
}
mVector = new PGPUserAttributeSubpacketVector(((UserAttributePacket) p).getSubpackets());
mVector = PGPUserAttributeSubpacketVector.fromSubpackets(((UserAttributePacket) p).getSubpackets());
}