com.rsa.certj.crmf

Class OldCertID

java.lang.Object
  |
  +--com.rsa.certj.crmf.Control
        |
        +--com.rsa.certj.crmf.OldCertID
All Implemented Interfaces:
Cloneable, Serializable

public class OldCertID
extends Control
implements Cloneable, Serializable

This class holds, encodes, and decodes the Old Cert ID control. If presented, the OldCertID control specifies the certificate to be updated by the current certification request.

The syntax of its value is :

 CertId ::= SEQUENCE {
   issuer GeneralName,
   serialNumber INTEGER
 }
 

Copyright © RSA Security Inc., 2000-2001. All rights reserved.

See Also

Serialized Form

Fields inherited from class com.rsa.certj.crmf.Control
AUTHENTICATOR, NON_STANDARD, OLD_CERT_ID, PKI_ARCHIVE_OPTIONS, PKI_PUBLICATION_INFO, PROTOCOL_ENCR_KEY, REG_TOKEN
 

Constructor Summary

OldCertID()

Constructs an empty OldCertID object.

 

Method Summary

 Object

clone()

Gets a deeper clone than the default.

 void

decodeValue(byte[] valueBER, int offset)

Decodes the BER encoding and sets issuer and serial number values in this object.

 boolean

equals(Object obj)

Returns true if this object and obj contain the same OldCertID object; returns false otherwise.

 GeneralName

getCertIssuerName()

Gets the old certificate issuer name.

 byte[]

getSerialNumber()

Gets the serial number of the old certificate.

 void

setCertIssuerName(GeneralName name)

Sets the old certificate Issuer Name

 void

setSerialNumber(byte[] serialNumber, int offset, int len)

Sets the serial number of the old certificate to be serialNumber, a value of length len beginning at offset.

 
Methods inherited from class com.rsa.certj.crmf.Control
compareOID, derEncodeControlLen, getControlType, getControlTypeString, getDEREncoding, getDERLen, getInstance, getInstance, getNextBEROffset, getOID, isControlType, setEnvironment
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OldCertID

public OldCertID()
Constructs an empty OldCertID object.
Method Detail

decodeValue

public void decodeValue(byte[] valueBER,
                        int offset)
                 throws CRMFException
Decodes the BER encoding and sets issuer and serial number values in this object.

Parameters

         valueBER  

The BER encoding of the control's value.

         offset  

The offset into valueBER where the encoding begins.

Throws

CRMFException - If the encoding is invalid for this control.

setCertIssuerName

public void setCertIssuerName(GeneralName name)
                       throws CRMFException
Sets the old certificate Issuer Name

Parameters

         name  

The issuer name

Throws

CRMFException - If the passed in value is invalid

setSerialNumber

public void setSerialNumber(byte[] serialNumber,
                            int offset,
                            int len)
                     throws CRMFException
Sets the serial number of the old certificate to be serialNumber, a value of length len beginning at offset.

Parameters

         serialNumber  

A byte array that contains the serial number

         offset  

The offset into serialNumber where the value begins

         len  

The number of bytes of serialNumber that make up the serial number

Throws

CRMFException - If passed in value is null

getSerialNumber

public byte[] getSerialNumber()
Gets the serial number of the old certificate. Return the result in a new byte array. If there is no serial number in this control object, returns null

Returns

A new byte array that contains the serial number

getCertIssuerName

public GeneralName getCertIssuerName()
Gets the old certificate issuer name. If there is no issuer name in this control object, returns null.

Returns

A new GeneralName object that contains the name

clone

public Object clone()
             throws CloneNotSupportedException
Gets a deeper clone than the default.

Overrides

clone in class Control

Returns

A copy of this object in its current state

Throws

CloneNotSupportedException - If the cloning operation is not successful.

equals

public boolean equals(Object obj)
Returns true if this object and obj contain the same OldCertID object; returns false otherwise.

Overrides

equals in class Control

Parameters

         obj  

The instance of OldCertID object.

Returns

A boolean that indicates whether these objects are equal.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000