Skip navigation links

Oracle Security Developer Tools PKI SDK OCSP Java API Reference
11g (11.1.1)

E10673-02


oracle.security.crypto.ocsp
Class SingleRequest

java.lang.Object
  extended by oracle.security.crypto.ocsp.SingleRequest

All Implemented Interfaces:
oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class SingleRequest
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object

Represents a single request for an OCSP Request.


Constructor Summary
SingleRequest(java.security.cert.X509Certificate cert, java.security.cert.X509Certificate caCert)
          Creates a new SingleRequest with the given certificate and the CA certificate.
SingleRequest(java.security.cert.X509Certificate cert, java.security.cert.X509Certificate caCert, oracle.security.crypto.core.AlgorithmIdentifier hashAlgID)
          Creates a new SingleRequest with the given certificate and the CA certificate.

 

Method Summary
 void addSingleReqExtension(oracle.security.crypto.cert.X509Extension ext)
          Adds an extension to this request.
 CertID getCertID()
          Gets the cert ID of this single request.
 oracle.security.crypto.cert.X509Extension getSingleReqExtension(oracle.security.crypto.asn1.ASN1ObjectID type)
          Gets the extension if it exists of this request for the given type.
 oracle.security.crypto.cert.X509ExtensionSet getSingleReqExtensions()
          Gets the extensions of this request.
 void input(java.io.InputStream is)
           
 int length()
           
 void output(java.io.OutputStream os)
           
 void setSingleReqExtensions(oracle.security.crypto.cert.X509ExtensionSet extensionSet)
          Sets the extensions of this request with the given extension set.
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

SingleRequest

public SingleRequest(java.security.cert.X509Certificate cert,
                     java.security.cert.X509Certificate caCert)
              throws java.security.NoSuchAlgorithmException,
                     java.security.cert.CertificateEncodingException
Creates a new SingleRequest with the given certificate and the CA certificate. By default the Algorithm used for hashing the GeneralName and the public key of the CA's certificate will be SHA1.

Note the changes in the method signature

Previously public SingleRequest (X509, X509)

Now public SingleRequest (X509Certificate, X509Certificate)

Note the change in the exceptions declared to be thrown.

Exceptions no longer thrown -AlgorithmIdentifierException

Exceptions introduced - NoSuchAlgorithmException, CertificateEncodingException

Parameters:
cert - The certificate to request information on.
caCert - The CA's certificate that issued cert.
Throws:
java.security.NoSuchAlgorithmException
java.security.cert.CertificateEncodingException

SingleRequest

public SingleRequest(java.security.cert.X509Certificate cert,
                     java.security.cert.X509Certificate caCert,
                     oracle.security.crypto.core.AlgorithmIdentifier hashAlgID)
              throws java.security.NoSuchAlgorithmException,
                     java.security.cert.CertificateEncodingException
Creates a new SingleRequest with the given certificate and the CA certificate.

Note the changes in the method signature

Previously public SingleRequest (X509, X509,AlgorithmIdentifier )

Now public SingleRequest (X509Certificate, X509Certificate,AlgorithmIdentifier )

Note the change in the exceptions declared to be thrown.

Exceptions no longer thrown -AlgorithmIdentifierException , IOException

Exceptions introduced - NoSuchAlgorithmException, CertificateEncodingException

Parameters:
cert - The certificate to request information on.
caCert - The CA's certificate that issued cert.
hashAlgID - The algorithm used for hashing the GeneralName and the public key of the CA's certificate.
Throws:
java.security.NoSuchAlgorithmException
java.security.cert.CertificateEncodingException

Method Detail

getCertID

public CertID getCertID()
Gets the cert ID of this single request.
Returns:
A CertID object representing the request.

addSingleReqExtension

public void addSingleReqExtension(oracle.security.crypto.cert.X509Extension ext)
Adds an extension to this request.
Parameters:
ext - The X509Extension to add.

setSingleReqExtensions

public void setSingleReqExtensions(oracle.security.crypto.cert.X509ExtensionSet extensionSet)
Sets the extensions of this request with the given extension set.
Parameters:
extensionSet - The extensions to set.

getSingleReqExtension

public oracle.security.crypto.cert.X509Extension getSingleReqExtension(oracle.security.crypto.asn1.ASN1ObjectID type)
Gets the extension if it exists of this request for the given type.
Parameters:
type - The ASN1ObjectID representing the type of the X509Extension.
Returns:
A X509Extension object, or null if the extension is missing.

getSingleReqExtensions

public oracle.security.crypto.cert.X509ExtensionSet getSingleReqExtensions()
Gets the extensions of this request.
Returns:
A X509ExtensionSet object containing the extensions of this request, or null if there is no extension.

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Specified by:
input in interface oracle.security.crypto.util.Streamable
Throws:
java.io.IOException

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Specified by:
output in interface oracle.security.crypto.util.Streamable
Throws:
java.io.IOException

length

public int length()
Specified by:
length in interface oracle.security.crypto.util.Streamable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle Security Developer Tools PKI SDK OCSP Java API Reference
11g (11.1.1)

E10673-02


Copyright © 2005, 2009, Oracle. All rights reserved.