|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--demo.x509.ocsp.OCSP
Tests the OCSP implementation.
This class demonstrates the usage of the IAIK ocsp implementation by simulating the following actions in the given order:
The keys and certificates required for this demo are obtained from the
IAIK-JCE demo keystore "jce.keystore" which may be generated by running
the SetupKeyStore
program.
Constructor Summary | |
OCSP()
Setup the demo certificate chains. |
Method Summary | |
OCSPRequest |
createOCSPRequest(PrivateKey requestorKey,
X509Certificate[] requestorCerts,
boolean includeExtensions)
Creates an OCSPRequest. |
OCSPRequest |
createOCSPRequest(PrivateKey requestorKey,
X509Certificate[] requestorCerts,
X509Certificate[] targetCerts,
boolean includeExtensions)
Creates an OCSPRequest. |
byte[] |
createOCSPResponse(InputStream is,
PublicKey requestorKey,
boolean includeExtensions)
Creates an ocsp response answering the given ocsp request. |
static void |
main(String[] argv)
Starts the test. |
void |
parseOCSPResponse(OCSPResponse ocspResponse)
Parses an ocsp response received and looks for the single responses included. |
void |
start()
Performs three tests: Unsigned request without extensions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OCSP() throws IOException
IOException
- if an file read error occursMethod Detail |
public void start()
public OCSPRequest createOCSPRequest(PrivateKey requestorKey, X509Certificate[] requestorCerts, boolean includeExtensions) throws OCSPException
requestorKey
- the private key of the requestor, or null
if the request shall not be signedrequestorCerts
- if the request shall be signed (requestorKey != null)
and signer certs shall be includedincludeExtensions
- if extensions shall be includedOCSPException
- if an error occurs when creating the requestpublic OCSPRequest createOCSPRequest(PrivateKey requestorKey, X509Certificate[] requestorCerts, X509Certificate[] targetCerts, boolean includeExtensions) throws OCSPException
requestorKey
- the private key of the requestor, or null
if the request shall not be signedrequestorCerts
- if the request shall be signed (requestorKey != null)
and signer certs shall be includedtargetCerts
- the certs for which status information shall be includedincludeExtensions
- if extensions shall be includedOCSPException
- if an error occurs when creating the requestpublic byte[] createOCSPResponse(InputStream is, PublicKey requestorKey, boolean includeExtensions)
is
- the encoded OCSP request supplied from an input streamrequestorKey
- the signing key of the requestor (may be supplied
for allowing to verify a signed request with no certificates included)includeExtensions
- if extensions shall be includedpublic void parseOCSPResponse(OCSPResponse ocspResponse) throws OCSPException
ocspResponse
- the OCSP responseOCSPException
- if an error occurs when creating the responsepublic static void main(String[] argv) throws Exception
Exception
- if an error occurs when reading required keys
and certificates from files
|
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 |