|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--iaik.pkcs.pkcs7.IssuerAndSerialNumber
This class implements the PKCS#7 IssuerAndSerialNumber type.
The PKCS#7
Cryptographic Message Standard specifies the IssuerAndSerialNumber
type for identifying a certificate (and thereby an entity and a
public key) by the distinguished name of the certificate issuer and an
issuer-specific certificate serial number:
IssuerAndSerialNumber ::= SEQUENCE {
issuer Name,
serialNumber CertificateSerialNumber }
The IssuerAndSerialNumber type is used for specifying the
signer´s certificate in the PKCS#7 SignerInfo structure,
or the recipient's certificate in the PKCS#7 RecipientInfo
structure.
SignerInfo,
RecipientInfo| Constructor Summary | |
IssuerAndSerialNumber(ASN1Object obj)
Creates a new IssuerAndSerialNumber from an ASN1Object.
|
|
IssuerAndSerialNumber(Name issuer,
BigInteger serialNumber)
Creates a new IssuerAndSerialNumber from an issuer
distinguished name and an issuer-specific serial number.
|
|
IssuerAndSerialNumber(X509Certificate cert)
Creates a new IssuerAndSerialNumber from a certificate.
|
|
| Method Summary | |
boolean |
equals(Object obj)
Compares this IssuerAndSerialNumber to the specified object. |
Name |
getIssuer()
Returns the issuer distinguished name. |
BigInteger |
getSerialNumber()
Returns the issuer-specific serial number. |
int |
hashCode()
Returns a hashcode for this IssuerAndSerialNumber. |
boolean |
isIssuerOf(X509Certificate certificate)
Checks if the issuer of this IssuerAndSerialNumber has issued
the given certificate. |
ASN1Object |
toASN1Object()
Returns this IssuerAndSerialNumber as ASN1Object.
|
String |
toString()
Returns a string giving some information about this IssuerAndSerialNumber object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public IssuerAndSerialNumber(Name issuer,
BigInteger serialNumber)
IssuerAndSerialNumber from an issuer
distinguished name and an issuer-specific serial number.
Issuer distinguished name and issuer-specific serial number may be obtained from a certificate, or may be supplied immediatly, e.g.:
Name issuerDN = new Name();
issuerDN.addRDN(ObjectID.country, "AT");
issuerDN.addRDN(ObjectID.organization ,"TU Graz");
issuerDN.addRDN(ObjectID.organizationalUnit ,"IAIK");
issuerDN.addRDN(ObjectID.commonName ,"IAIK Test CA");
IssuerAndSerialNumber issuer_and_serialNr =
new IssuerAndSerialNumber(issuerDN, BigInteger.valueOf(0x12345));
issuer - the issuer distinguished nameserialNumber - the issuer-specific serial numberpublic IssuerAndSerialNumber(X509Certificate cert)
IssuerAndSerialNumber from a certificate.
Issuer distinguished name and issuer-specific serial number are derived from the given certificate.
cert - the X509Certificate
public IssuerAndSerialNumber(ASN1Object obj)
throws CodingException
IssuerAndSerialNumber from an ASN1Object.
The ASN1Object supplied to this constructor represents an
already exisiting IssuerAndSerialNumber object that may
have been created by calling toASN1Object.
obj - the IssuerAndSerialNumber as ASN1ObjectCodingException - if the ASN1Object could not be parsed| Method Detail |
public ASN1Object toASN1Object()
IssuerAndSerialNumber as ASN1Object.
The ASN1Object returned by this method may be used as parameter value
when creating an IssuerAndSerialNumber object using the
IssuerAndSerialNumber(ASN1Object obj)
constructor.
IssuerAndSerialNumber as ASN1Objectpublic Name getIssuer()
public BigInteger getSerialNumber()
public boolean equals(Object obj)
IssuerAndSerialNumber to the specified object.equals in class Objectobj - the object to compare this IssuerAndSerialNumber
against.true, if the given object is equal to this
IssuerAndSerialNumber,
false otherwisepublic int hashCode()
hashCode in class Objectpublic boolean isIssuerOf(X509Certificate certificate)
IssuerAndSerialNumber has issued
the given certificate.certificate - the certificate to be checked of being issued by the
issuer of this IssuerAndSerialNumbertrue if the issuer of this
IssuerAndSerialNumber has issued
the given certificate, false
otherwisepublic String toString()
IssuerAndSerialNumber object.toString in class Object
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK