
org.bouncycastle.cms.PKIXRecipientId Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcpkix-fips Show documentation
Show all versions of bcpkix-fips Show documentation
The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and certificate generation. The APIs are designed primarily to be used in conjunction with the BC FIPS provider. The APIs may also be used with other providers although if being used in a FIPS context it is the responsibility of the user to ensure that any other providers used are FIPS certified.
package org.bouncycastle.cms;
import java.math.BigInteger;
import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.cert.selector.X509CertificateHolderSelector;
public class PKIXRecipientId
extends RecipientId
{
protected final X509CertificateHolderSelector baseSelector;
protected PKIXRecipientId(int type, X509CertificateHolderSelector baseSelector)
{
super(type);
this.baseSelector = baseSelector;
}
protected PKIXRecipientId(int type, X500Name issuer, BigInteger serialNumber, byte[] subjectKeyId)
{
this(type, new X509CertificateHolderSelector(issuer, serialNumber, subjectKeyId));
}
public X500Name getIssuer()
{
return baseSelector.getIssuer();
}
public BigInteger getSerialNumber()
{
return baseSelector.getSerialNumber();
}
public byte[] getSubjectKeyIdentifier()
{
return baseSelector.getSubjectKeyIdentifier();
}
public Object clone()
{
return new PKIXRecipientId(getType(), baseSelector);
}
public int hashCode()
{
return baseSelector.hashCode();
}
public boolean equals(
Object o)
{
if (!(o instanceof PKIXRecipientId))
{
return false;
}
PKIXRecipientId id = (PKIXRecipientId)o;
return this.baseSelector.equals(id.baseSelector);
}
public boolean match(Object obj)
{
return baseSelector.match(obj);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy