|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--iaik.x509.ocsp.OCSPException | +--iaik.x509.ocsp.UnknownResponseException
Exception that is thrown when an OCSP server sends an unknown (= unsupported) response.
The X.509
Online Certificate Status Protocol (RFC 2560) allows OCSP responses to be of
various type. RFC 2560 itself only specifies one basic response type
(BasicOCSPResponse
) that has to be
supported by any conforming implementation.
Other response types may be identified by their object identifier to be included
into the optional responseBytes field of an OCSPResponse message:
OCSPResponse ::= SEQUENCE { responseStatus OCSPResponseStatus, responseBytes [0] EXPLICIT ResponseBytes OPTIONAL } ResponseBytes ::= SEQUENCE { responseType OBJECT IDENTIFIER, response OCTET STRING }When parsing the response sent by a server, class
ResponseBytes
tries to find an implementation
for the response identified by the responseType OID. If no implementation for
the particular response type is registered
, an UnknownResponseException is thrown allowing an application
to query for the response type oid
and an ASN.1 epresentation
of the unknown response, e.g.
(reading in a DER encoded OCSPResponse
from an input stream):
try { // the input stream supplying a DER encoded OCSP response: InputStream is = ...; OCSPResponse ocspResponse = new OCSPResponse(is); ... } catch (UnknownResponseException ex) { System.out.println("This response is successful but contains an unknown response type:"); UnknownResponseException unknown = (UnknownResponseException)ex; System.out.println("Unknown type: " + unknown.getResponseType()); System.out.println("ASN.1 structure:"); System.out.println(unknown.getUnknownResponse().toString()); }
OCSPResponse
,
ResponseBytes
,
Response
,
BasicOCSPResponse
, Serialized FormConstructor Summary | |
UnknownResponseException(ObjectID responseType,
ASN1 unknownResponse)
Constructs an UnknownResponseException with no specified detail message. |
|
UnknownResponseException(String msg,
ObjectID responseType,
ASN1 unknownResponse)
Constructs an UnknownResponseException with the specified detail message. |
Method Summary | |
ObjectID |
getResponseType()
Returns the reponse type of the unknown response. |
ASN1 |
getUnknownResponse()
Returns an ASN.1 representation of the unknown response. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UnknownResponseException(ObjectID responseType, ASN1 unknownResponse)
responseType
- the type oid of the unknown responseunknownResponse
- the unknown response as ASN.1 objectpublic UnknownResponseException(String msg, ObjectID responseType, ASN1 unknownResponse)
responseType
- the type oid of the unknown responseunknownResponse
- the unknown response as ASN.1 objectMethod Detail |
public ObjectID getResponseType()
public ASN1 getUnknownResponse()
|
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 |