|
4 | 4 | import org.bouncycastle.bcpg.BCPGInputStream;
|
5 | 5 | import org.bouncycastle.bcpg.BCPGOutputStream;
|
6 | 6 | import org.bouncycastle.bcpg.FingerprintUtil;
|
| 7 | +import org.bouncycastle.bcpg.KeyIdentifier; |
7 | 8 | import org.bouncycastle.bcpg.PacketFormat;
|
8 | 9 | import org.bouncycastle.bcpg.PublicKeyAlgorithmTags;
|
9 |
| -import org.bouncycastle.bcpg.SignaturePacket; |
10 | 10 | import org.bouncycastle.bcpg.SignatureSubpacket;
|
11 | 11 | import org.bouncycastle.bcpg.SignatureSubpacketTags;
|
12 | 12 | import org.bouncycastle.bcpg.sig.Features;
|
13 | 13 | import org.bouncycastle.bcpg.sig.KeyFlags;
|
14 |
| -import org.bouncycastle.bcpg.sig.NotationData; |
15 | 14 | import org.bouncycastle.bcpg.sig.PreferredAEADCiphersuites;
|
16 | 15 | import org.bouncycastle.bcpg.sig.PreferredAlgorithms;
|
17 | 16 | import org.bouncycastle.openpgp.*;
|
18 | 17 | import org.bouncycastle.openpgp.api.exception.IncorrectPGPSignatureException;
|
19 |
| -import org.bouncycastle.openpgp.api.exception.MalformedPGPSignatureException; |
20 | 18 | import org.bouncycastle.openpgp.api.exception.MissingIssuerCertException;
|
21 | 19 | import org.bouncycastle.openpgp.api.util.UTCUtil;
|
22 | 20 | import org.bouncycastle.openpgp.operator.PGPContentVerifierBuilderProvider;
|
23 |
| -import org.bouncycastle.util.Iterable; |
24 |
| -import org.bouncycastle.util.encoders.Hex; |
25 | 21 |
|
26 | 22 | import java.io.ByteArrayInputStream;
|
27 | 23 | import java.io.ByteArrayOutputStream;
|
@@ -96,7 +92,7 @@ public OpenPGPCertificate(PGPKeyRing keyRing, OpenPGPImplementation implementati
|
96 | 92 | {
|
97 | 93 | PGPPublicKey rawSubkey = rawKeys.next();
|
98 | 94 | OpenPGPSubkey subkey = new OpenPGPSubkey(rawSubkey, this);
|
99 |
| - subkeys.put(new KeyIdentifier(rawSubkey), subkey); |
| 95 | + subkeys.put(rawSubkey.getKeyIdentifier(), subkey); |
100 | 96 | processSubkey(subkey);
|
101 | 97 | }
|
102 | 98 | }
|
@@ -215,7 +211,7 @@ public List<OpenPGPComponentKey> getKeys()
|
215 | 211 | */
|
216 | 212 | public OpenPGPComponentKey getKey(KeyIdentifier identifier)
|
217 | 213 | {
|
218 |
| - if (identifier.matches(getPrimaryKey().getPGPPublicKey())) |
| 214 | + if (identifier.matches(getPrimaryKey().getPGPPublicKey().getKeyIdentifier())) |
219 | 215 | {
|
220 | 216 | return primaryKey;
|
221 | 217 | }
|
@@ -1028,7 +1024,7 @@ public PGPPublicKey getPGPPublicKey()
|
1028 | 1024 | */
|
1029 | 1025 | public KeyIdentifier getKeyIdentifier()
|
1030 | 1026 | {
|
1031 |
| - return new KeyIdentifier(rawPubkey); |
| 1027 | + return rawPubkey.getKeyIdentifier(); |
1032 | 1028 | }
|
1033 | 1029 |
|
1034 | 1030 | /**
|
|
0 commit comments