|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--iaik.x509.ocsp.ResponderID
This class implements the OCSP type ResponderID.
Within a BasicOCSPResponse the
ResponderID identifies the responder either by its name or by a SHA-1
hash calculated from the responderīs public key (see RFC 2560):
ResponderID ::= CHOICE {
byName [1] Name,
byKey [2] KeyHash }
After having created a new ResponderID, add it to BasicOCSPResponse by calling
the setResponderID method, e.g.:
// the key of the responder: PublicKey responderKey = ...; ResponderID responderID = new ResponderID(responderKey); ... BasicOCSPResponse basicOCSPresponse = ...; ... basicOCSPResponse.setResponderID(responderID);As you can see from the example above, you immediately may supply the responderīs key to the corresponding
constructor of this call to let it do the hash calcualtion for a
keyHash responder id.
BasicOCSPResponse| Constructor Summary | |
ResponderID(ASN1Object obj)
Creates ResponderID from an ASN1Object. |
|
ResponderID(byte[] keyHash)
Creates a responder ID from a hash of itīs public key. |
|
ResponderID(Name name)
Creates a responder ID from its name. |
|
ResponderID(PublicKey responderKey)
Creates a responder ID from itīs public key. |
|
| Method Summary | |
boolean |
byName()
Checks whether this ResponderID represents the byName choice. |
boolean |
equals(Object obj)
Compares this ResponderID with the given ResponderID. |
byte[] |
getKeyHash()
Returns the hash of the responderīs public key. |
Name |
getName()
Returns the Name of the responder. |
int |
hashCode()
Returns a hash code value for this object. |
boolean |
isResponderIdFor(X509Certificate responderCert)
Checks if this is a responder id for the given certificate. |
ASN1Object |
toASN1Object()
Returns this ResponderID as an ASN1Object. |
String |
toString()
Gives a String representation of this ResponderID. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ResponderID(Name name)
name - the name of the responderpublic ResponderID(byte[] keyHash)
keyHash - the hash of the responderīs public key
public ResponderID(PublicKey responderKey)
throws NoSuchAlgorithmException
keyHash - responderKey the public key of the reponder from
which a SHA-1 hash has to be calculated for
giving the value of this "byKey" responder IDNoSuchAlgorithmException - if SHA-1 is not supported by the
installed providers
public ResponderID(ASN1Object obj)
throws CodingException
the - ResponderID as ASN1ObjectCodingException - if the ASN1Object has the wrong format| Method Detail |
public boolean isResponderIdFor(X509Certificate responderCert)
throws NoSuchAlgorithmException
responderCert - the cert of the respondertrue if this responderID identifies the responderNoSuchAlgorithmException - if SHA-1 is not supported by
the installed providerspublic Name getName()
public byte[] getKeyHash()
public boolean byName()
true if this ID identifies the responder by Name
false if this ID identifies the responder by Keypublic ASN1Object toASN1Object()
public boolean equals(Object obj)
equals in class Objectobj - the other ResponderIDtrue, if the two ResponderID are equal, false otherwisepublic int hashCode()
hashCode in class Objectpublic String toString()
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