"public key ring doesn't start with public key tag: " +
"tag 0x" + Integer.toHexString(initialTag));
}
PublicKeyPacket pubPk = (PublicKeyPacket)pIn.readPacket();
TrustPacket trustPk = readOptionalTrustPacket(pIn);
// direct signatures and revocations
List keySigs = readSignaturesAndTrust(pIn);
List ids = new ArrayList();
List idTrusts = new ArrayList();
List idSigs = new ArrayList();
readUserIDs(pIn, ids, idTrusts, idSigs);
keys.add(new PGPPublicKey(pubPk, trustPk, keySigs, ids, idTrusts, idSigs));
// Read subkeys
while (pIn.nextPacketTag() == PacketTags.PUBLIC_SUBKEY)
{
PublicKeyPacket pk = (PublicKeyPacket)pIn.readPacket();
TrustPacket kTrust = readOptionalTrustPacket(pIn);
// PGP 8 actually leaves out the signature.
List sigList = readSignaturesAndTrust(pIn);
keys.add(new PGPPublicKey(pk, kTrust, sigList));