iaik.x509.ocsp.extensions
Class ServiceLocator

java.lang.Object
  |
  +--iaik.x509.V3Extension
        |
        +--iaik.x509.ocsp.extensions.ServiceLocator

public class ServiceLocator
extends V3Extension

This class implements the OCSP ServiceLocator (CRL References) extension.

As with all OCSP extensions, support of the ServiceLocator extension is optional for client and servers. The critical flag should not be set.

Each OCSP extension is associated with a specific ocsp extension object identifier, derived from RFC 2560:

 id-pkix  OBJECT IDENTIFIER  ::=
        { iso(1) identified-organization(3) dod(6) internet(1)
          security(5) mechanisms(5) pkix(7) }

 id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }       
        -- arc for access descriptors

 id-ad-ocsp      OBJECT IDENTIFIER ::= { id-ad 1 }
 
 id-pkix-ocsp    OBJECT IDENTIFIER ::= { id-ad-ocsp }
 
The object identifier for the ServiceLocator extension is defined as:
 id-pkix-ocsp-service-locator  OBJECT IDENTIFIER ::= { id-pkix-ocsp 7 }
 
which corresponds to the OID string "1.3.6.1.5.5.7.48.1.7".

The Online Certificate Status Protocol (RFC 2560) specifies the ServiceLocator extension for allowing a server to support forwarding of received request to the OCSP server which is known to be authoritative for the identified certificate. For this purpose the ServiceLocator extension my be included as one of the singleRequestExtensions in requests.

ASN.1 definition:

 ServiceLocator ::= SEQUENCE {
     issuer    Name,
     locator   AuthorityInfoAccessSyntax OPTIONAL }
 
Values for these fields are obtained from the corresponding fields in the subject certificate.

For adding a ServiceLocator extension object to a Request, use the addExtension method, e.g.:

 Name issuer = cert.getIssuerDN();
 AuthorityInfoAccess locator = (AuthorityInfoAccess)cert.getExtension(AuthorityInfoAccess.oid);
 ServiceLocator serviceLocator = new ServiceLocator(issuer);
 serviceLocator.setLocator(locator);
 request.addExtension(serviceLocator);
 

Version:
File Revision 8
See Also:
Request, V3Extension, X509Extensions

Field Summary
static ObjectID oid
          The object identifier of this ServiceLocator extension.
 
Fields inherited from class iaik.x509.V3Extension
critical
 
Constructor Summary
ServiceLocator()
          Default constructor.
ServiceLocator(Name issuer)
          Creates a ServiceLocator extension from the given issuer name.
 
Method Summary
 Name getIssuer()
          Gets the issuer name of this ServiceLocator extension.
 AuthorityInfoAccess getLocator()
          Gets the locator.
 ObjectID getObjectID()
          Returns the object ID of this ServiceLocator extension
 int hashCode()
          Returns a hashcode for this identity.
 void init(ASN1Object obj)
          Inits this ServiceLocator implementation with an ASN1object representing the value of this extension.
 void setIssuer(Name issuer)
          Sets the issuer name of this ServiceLocator extension.
 void setLocator(AuthorityInfoAccess locator)
          Stets the locator.
 ASN1Object toASN1Object()
          Returns an ASN1Object representing the value of this ServiceLocator extension.
 String toString()
          Returns a string that represents the contents of this ServiceLocator extension.
 
Methods inherited from class iaik.x509.V3Extension
getName, isCritical, setCritical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

oid

public static final ObjectID oid
The object identifier of this ServiceLocator extension. The corresponding OID string is "1.3.6.1.5.5.7.48.1.7".
Constructor Detail

ServiceLocator

public ServiceLocator()
Default constructor. Used for dynamic object creation.

ServiceLocator

public ServiceLocator(Name issuer)
Creates a ServiceLocator extension from the given issuer name.
Parameters:
name - the name of the issuer
Method Detail

setIssuer

public void setIssuer(Name issuer)
Sets the issuer name of this ServiceLocator extension.
Parameters:
name - the name of the issuer

getIssuer

public Name getIssuer()
Gets the issuer name of this ServiceLocator extension.
Returns:
the name of the issuer

setLocator

public void setLocator(AuthorityInfoAccess locator)
Stets the locator.
Parameters:
locator - the locator AuthorityInfoAccess specifying the authorized responder of the certificate in mind

getLocator

public AuthorityInfoAccess getLocator()
Gets the locator.
Returns:
the locator AuthorityInfoAccess specifying the authorized responder of the certificate in mind

getObjectID

public ObjectID getObjectID()
Returns the object ID of this ServiceLocator extension
Overrides:
getObjectID in class V3Extension
Returns:
the object ID

init

public void init(ASN1Object obj)
          throws X509ExtensionException
Inits this ServiceLocator implementation with an ASN1object representing the value of this extension.

The given ASN1Object is the one created by toASN1Object().

This method is used by the X509Extensions class when parsing the ASN.1 representation of a OCSP object for properly initializing an included ServiceLocator extension. This method initializes the extension only with its value, but not with its critical specification. For that reason, this method shall not be explicitly called by an application.

The ASN1Object supplied to this method will reflect the ASN.1 representation of the ServiceLocator extension value:

 ServiceLocator ::= SEQUENCE {
     issuer    Name,
     locator   AuthorityInfoAccessSyntax OPTIONAL }
 
Overrides:
init in class V3Extension
Parameters:
obj - the ServiceLocator as ASN1Object (SEQUENCE)
Throws:
X509ExtensionException - if the extension cannot be initialized from its ASN1 representation

toASN1Object

public ASN1Object toASN1Object()
                        throws X509ExtensionException
Returns an ASN1Object representing the value of this ServiceLocator extension.

The ASN1Object returned by this method will reflect the ASN.1 representation of the ServiceLocator extension value:

 ServiceLocator ::= SEQUENCE {
     issuer    Name,
     locator   AuthorityInfoAccessSyntax OPTIONAL }
 
Overrides:
toASN1Object in class V3Extension
Returns:
the value of this ServiceLocator as ASN1Object (SEQUENCE)

hashCode

public int hashCode()
Returns a hashcode for this identity.
Overrides:
hashCode in class V3Extension
Returns:
a hash code for this identity

toString

public String toString()
Returns a string that represents the contents of this ServiceLocator extension.
Overrides:
toString in class Object
Returns:
the string representation

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).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK