diff --git a/pg/src/test/java/org/bouncycastle/bcpg/test/EncryptedMessagePacketTest.java b/pg/src/test/java/org/bouncycastle/bcpg/test/EncryptedMessagePacketTest.java index c34a1d48ad..6732858865 100644 --- a/pg/src/test/java/org/bouncycastle/bcpg/test/EncryptedMessagePacketTest.java +++ b/pg/src/test/java/org/bouncycastle/bcpg/test/EncryptedMessagePacketTest.java @@ -121,7 +121,7 @@ private void testPKESK6SEIPD2FromTestVector() objFac = new BcPGPObjectFactory(pIn); PGPEncryptedDataList encList = (PGPEncryptedDataList) objFac.nextObject(); PGPPublicKeyEncryptedData encData = (PGPPublicKeyEncryptedData) encList.get(0); - PGPSecretKey decKey = secretKeys.getSecretKey(encData.getKeyIdentifier()); + PGPSecretKey decKey = secretKeys.getSecretKey(encData.getKeyID()); // TODO: getKeyIdentifier() PGPPrivateKey privKey = decKey.extractPrivateKey(null); PublicKeyDataDecryptorFactory decryptor = new BcPublicKeyDataDecryptorFactory(privKey); InputStream in = encData.getDataStream(decryptor); @@ -148,7 +148,7 @@ private void testX25519AEADOCBTestVector_bc() objFac = new BcPGPObjectFactory(pIn); PGPEncryptedDataList encList = (PGPEncryptedDataList) objFac.nextObject(); PGPPublicKeyEncryptedData encData = (PGPPublicKeyEncryptedData) encList.get(0); - PGPSecretKey decKey = secretKeys.getSecretKey(encData.getKeyIdentifier()); + PGPSecretKey decKey = secretKeys.getSecretKey(encData.getKeyID()); // TODO: getKeyIdentifier() PGPPrivateKey privKey = decKey.extractPrivateKey(null); PublicKeyDataDecryptorFactory decryptor = new BcPublicKeyDataDecryptorFactory(privKey); InputStream in = encData.getDataStream(decryptor); @@ -175,7 +175,7 @@ private void testX25519AEADOCBTestVector_jce() objFac = new JcaPGPObjectFactory(pIn); PGPEncryptedDataList encList = (PGPEncryptedDataList) objFac.nextObject(); PGPPublicKeyEncryptedData encData = (PGPPublicKeyEncryptedData) encList.get(0); - PGPSecretKey decKey = secretKeys.getSecretKey(encData.getKeyIdentifier()); + PGPSecretKey decKey = secretKeys.getSecretKey(encData.getKeyID()); // TODO: getKeyIdentifier() PGPPrivateKey privKey = decKey.extractPrivateKey(null); PublicKeyDataDecryptorFactory decryptor = new JcePublicKeyDataDecryptorFactoryBuilder() .setProvider(new BouncyCastleProvider()) diff --git a/pg/src/test/java/org/bouncycastle/openpgp/test/PGPv6MessageDecryptionTest.java b/pg/src/test/java/org/bouncycastle/openpgp/test/PGPv6MessageDecryptionTest.java index 326a9e3f57..3ccea53ecd 100644 --- a/pg/src/test/java/org/bouncycastle/openpgp/test/PGPv6MessageDecryptionTest.java +++ b/pg/src/test/java/org/bouncycastle/openpgp/test/PGPv6MessageDecryptionTest.java @@ -83,7 +83,7 @@ private void decryptMessageEncryptedUsingPKESKv6() isEquals(PublicKeyEncSessionPacket.VERSION_6, encData.getVersion()); isEquals(PublicKeyAlgorithmTags.X25519, encData.getAlgorithm()); - PGPSecretKey decryptionKey = secretKeys.getSecretKey(encData.getKeyIdentifier()); + PGPSecretKey decryptionKey = secretKeys.getSecretKey(encData.getKeyID()); // TODO: getKeyIdentifier() isNotNull("Decryption key MUST be identifiable", decryptionKey); PGPPrivateKey privateKey = decryptionKey.extractPrivateKey(null); PublicKeyDataDecryptorFactory decryptor = new BcPublicKeyDataDecryptorFactory(privateKey);