|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.cms.SignerIdentifier
public class SignerIdentifier
The CMS type SignerIdentifier.
A SignerIdentifier is used for identifying the signer certificate of a CMS SignerInfo.
It is defined as ASN.1 CHOICE of IssuerAndSerialNumber
or SubjectKeyIdentifier
(see RFC 5652):
SignerIdentifier ::= CHOICE { issuerAndSerialNumber IssuerAndSerialNumber, subjectKeyIdentifier [0] SubjectKeyIdentifier }
Field Summary |
---|
Fields inherited from interface iaik.cms.KeyIdentifier |
---|
ISSUER_AND_SERIALNUMBER, KEK_IDENTIFIER, ORIGINATOR_PUBLIC_KEY, RECIPIENT_KEY_IDENTIFIER, SUBJECT_KEY_IDENTIFIER |
Constructor Summary | |
---|---|
SignerIdentifier(ASN1Object obj)
Creates a SignerIdentifier from an ASN1Object. |
|
SignerIdentifier(CertificateIdentifier certificateIdentifier)
Creates a SignerIdentifier from the given IssuerAndSerialNumber or SubjectKeyID. |
|
SignerIdentifier(java.io.InputStream is)
Creates a SignerIdentifier and parses a DER encoded SignerIdentifier from the given input stream. |
Method Summary | |
---|---|
void |
clearEncoded()
Clears the encoded SignerIdentifier. |
void |
decode(ASN1Object obj)
Decodes the SignerRecipientIdentifier from the given ASN1Object. |
void |
decode(java.io.InputStream is)
Decodes the SignerIdentifier from the given input stream. |
void |
decode(java.io.InputStream is,
boolean keepEncoding)
Decodes the SignerIdentifier from the given input stream. |
boolean |
equals(java.lang.Object obj)
Compares this SignerRecipientIdentifier to the specified object. |
CertificateIdentifier |
getCertificateIdentifier()
Gets the CertificateIdentifier this SignerIdentifier represents. |
byte[] |
getEncoded()
Returns the DER encoded SignerIdentifier. |
int |
getKeyIdType()
Returns the key identifier type this class represents. |
java.lang.String |
getKeyIdTypeName()
Returns the key (certificate) identifier type this class represents as string. |
int |
hashCode()
Returns a hashcode for this SignerRecipientIdentifier . |
boolean |
identifiesCert(X509Certificate cert)
Checks if the given certificate is identified by this CertificateIdentifier. |
ASN1Object |
toASN1Object()
Returns this SignerIdentifier as ASN1Object. |
java.lang.String |
toString()
Returns a String representation of this SignerRecipientKeyIdentifier. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SignerIdentifier(CertificateIdentifier certificateIdentifier)
certificateIdentifier
- the IssuerAndSerialNumber or SubjectKeyID to
be used for identifying the certificate
if
- the supplied certificateIdentifier is not an IssuerAndSerialNumber
or SubjecKeyIdentifierpublic SignerIdentifier(ASN1Object obj) throws CodingException
obj
- the SignerIdentifier as ASN1Object
CodingException
- if the ASN1Object cannot be decoded or
is invalid structuredpublic SignerIdentifier(java.io.InputStream is) throws java.io.IOException, CodingException
is
- the input stream from which to parse the encoded SignerIdentifier
CodingException
- if the SignerIdentifier cannot be parsed
java.io.IOException
- if an error occurs when reading from the streamMethod Detail |
---|
public CertificateIdentifier getCertificateIdentifier()
IssuerAndSerialNumber
or SubjectKeyIdentifier
object, depending
on the certificate identifier type this SignerIdentifier
representspublic void decode(java.io.InputStream is) throws CodingException, java.io.IOException
is
- the input stream from which to parse the encoded SignerIdentifier
CodingException
- if the SignerIdentifier cannot be parsed
java.io.IOException
- if an error occurs when reading from the streampublic void decode(java.io.InputStream is, boolean keepEncoding) throws CodingException, java.io.IOException
is
- the input stream from which to parse the encoded SignerIdentifierkeepEncoding
- whether to keep the encoding
CodingException
- if the SignerIdentifier cannot be parsed
java.io.IOException
- if an error occurs when reading from the streampublic ASN1Object toASN1Object()
toASN1Object
in interface ASN1Type
public byte[] getEncoded()
public void clearEncoded()
toASN1Object()
or
getEncoded()
will build the internal ASN.1 structure
anew.
public boolean identifiesCert(X509Certificate cert)
identifiesCert
in interface CertificateIdentifier
cert
- the certificate to be checked of being identified
by this CertificateIdentifier
true
if the given certificate is identified by this
CertificateIdentifier, false
otherwisepublic void decode(ASN1Object obj) throws CodingException
decode
in interface ASN1Type
obj
- the SignerRecipientIdentifier as ASN1Object
CodingException
- if the ASN1Object cannot be decoded or
is invalid structuredpublic boolean equals(java.lang.Object obj)
SignerRecipientIdentifier
to the specified object.
equals
in interface KeyIdentifier
equals
in class java.lang.Object
obj
- the object to compare this SignerRecipientIdentifier
against.
true
, if the given object is equal to this
SignerRecipientIdentifier
,
false
otherwisepublic int hashCode()
SignerRecipientIdentifier
.
hashCode
in interface KeyIdentifier
hashCode
in class java.lang.Object
SignerRecipientIdentifier
public int getKeyIdType()
getKeyIdType
in interface KeyIdentifier
public java.lang.String getKeyIdTypeName()
getKeyIdTypeName
in interface KeyIdentifier
public java.lang.String toString()
toString
in interface KeyIdentifier
toString
in class java.lang.Object
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |