| 6 | import org.bouncycastle.cert.selector.X509CertificateHolderSelector; |
| 7 | |
| 8 | public class PKIXRecipientId |
| 9 | extends RecipientId |
| 10 | { |
| 11 | protected final X509CertificateHolderSelector baseSelector; |
| 12 | |
| 13 | protected PKIXRecipientId(int type, X509CertificateHolderSelector baseSelector) |
| 14 | { |
| 15 | super(type); |
| 16 | |
| 17 | this.baseSelector = baseSelector; |
| 18 | } |
| 19 | |
| 20 | protected PKIXRecipientId(int type, X500Name issuer, BigInteger serialNumber, byte[] subjectKeyId) |
| 21 | { |
| 22 | this(type, new X509CertificateHolderSelector(issuer, serialNumber, subjectKeyId)); |
| 23 | } |
| 24 | |
| 25 | public X500Name getIssuer() |
| 26 | { |
| 27 | return baseSelector.getIssuer(); |
| 28 | } |
| 29 | |
| 30 | public BigInteger getSerialNumber() |
| 31 | { |
| 32 | return baseSelector.getSerialNumber(); |
| 33 | } |
| 34 | |
| 35 | public byte[] getSubjectKeyIdentifier() |
| 36 | { |
| 37 | return baseSelector.getSubjectKeyIdentifier(); |
| 38 | } |
| 39 | |
| 40 | public Object clone() |
| 41 | { |
| 42 | return new PKIXRecipientId(getType(), baseSelector); |
| 43 | } |
| 44 | |
| 45 | public int hashCode() |
| 46 | { |
| 47 | return baseSelector.hashCode(); |
| 48 | } |
| 49 | |
| 50 | public boolean equals( |
| 51 | Object o) |
| 52 | { |
| 53 | if (!(o instanceof PKIXRecipientId)) |
| 54 | { |
| 55 | return false; |
| 56 | } |
| 57 | |
| 58 | PKIXRecipientId id = (PKIXRecipientId)o; |
| 59 | |
| 60 | return this.baseSelector.equals(id.baseSelector); |
| 61 | } |
| 62 | |
| 63 | public boolean match(Object obj) |
| 64 | { |
| 65 | return baseSelector.match(obj); |
nothing calls this directly
no outgoing calls
no test coverage detected