public class OldCertId extends AttributeTypeAndValue implements ASN1Type
id-regCtrl-oldCertID OBJECT IDENTIFIER ::= { id-regCtrl 5 }
--with syntax:
OldCertId ::= CertId
CertId ::= SEQUENCE {
issuer GeneralName,
serialNumber INTEGER
}
AttributeTypeAndValue ::= SEQUENCE {
type OBJECT IDENTIFIER,
value ANY DEFINED BY type
}
If present, the OldCertID regCtrl specifies the certificate to be updated by the current certification request.
| Modifier and Type | Field and Description |
|---|---|
static ObjectID |
oid
The object identifier for a OldCertId regCtrl.
|
m_type, m_value| Constructor and Description |
|---|
OldCertId(ASN1Object obj)
Creates a new
OldCertId regCtrl object from an
ASN1Object. |
OldCertId(GeneralName issuer,
java.math.BigInteger serialNumber)
Creates a new
OldCertId regCtrl object with the specified
components. |
OldCertId(X509Certificate oldCert)
Creates a new
OldCertId regCtrl object from the given
certificate. |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes an OldCertId regCtrl structure from an
ASN1Object. |
GeneralName |
getIssuer()
Returns the issuer of the old certificate.
|
java.math.BigInteger |
getSerialNumber()
Returns the serial number of the old certificate.
|
ASN1Object |
toASN1Object()
Encodes this
OldCertId regCtrl object as an
ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
OldCertId regCtrl object. |
getType, getValuepublic static final ObjectID oid
public OldCertId(GeneralName issuer, java.math.BigInteger serialNumber)
OldCertId regCtrl object with the specified
components.issuer - the issuer of the old certificateserialNumber - the serial number of the old certificatepublic OldCertId(X509Certificate oldCert)
OldCertId regCtrl object from the given
certificate. It extracts both the issuer and serial number from the
certificate, and then creates the OldCertId with these values.oldCert - the certificate to create the OldCertId frompublic OldCertId(ASN1Object obj) throws CodingException
OldCertId regCtrl object from an
ASN1Object. The ASN1Object must be a complete
ASN.1 AttributeTypeAndValue structure, not simply an ASN.1 OldCertId
structure.obj - the ASN.1 representation of an OldCertId regCtrl structureCodingException - thrown if an errors occurs while decoding the ANS1Objectpublic GeneralName getIssuer()
public java.math.BigInteger getSerialNumber()
public void decode(ASN1Object obj) throws CodingException
ASN1Object.
The ASN1Object must be a complete ASN.1 AttributeTypeAndValue
structure, not simply an ASN.1 OldCertId structure.decode in interface ASN1Typedecode in class AttributeTypeAndValueobj - an ASN.1 representation of an OldCertId regCtrl structureCodingException - thrown if an errors occurs while decoding the ANS1Objectpublic ASN1Object toASN1Object()
OldCertId regCtrl object as an
ASN1Object. The encoding produces a complete ASN.1
AttributeTypeAndValue structure, not simply an ASN.1 OldCertId structure.
To retrieve only the OldCertId structure use getValue().toASN1Object in interface ASN1TypetoASN1Object in class AttributeTypeAndValuepublic java.lang.String toString()
OldCertId regCtrl object.toString in class AttributeTypeAndValue