iaik.asn1
Class ObjectID

java.lang.Object
  |
  +--iaik.asn1.ASN1Object
        |
        +--iaik.asn1.ObjectID
All Implemented Interfaces:
Cloneable

public class ObjectID
extends ASN1Object
implements Cloneable

This class implements the ASN.1 native type "OBJECT IDENTIFIER". OBJECT IDENTIFIER is a simple non-string ASN.1 type identified by the UNIVERSAL TAG number 6. An ASN.1 OBJECT IDENTIFIER object represents an object identifier. It consists of a sequence of integer components and is used for identifying some abstract information object (for instance an algorithm, an attribute type, or even a registration authority that defines other object identifiers).

This class uses Strings as representation of object identifiers. For example: "1.2.3.4".

This class is responsible for generating ObjectIDs for several X.500, PKCS#7, PKCS#9, PKCS#12 and PKIX objects that may be used by specifying the corresponding objectID´s name: ObjectID.<name>,

for instance:

 ObjectID policyQualifierId = ObjectID.id_pkix_cps;
 
Beside this, new ObjectIDs may be created by using one of the several constructors, either by only specifying the OID-String of the new ObjectID, or by additionally specifying the name (and the shortName). When name (and shortName) are specified, they are automatically registered for the new ObjectID, e.g:
 String oidStr = "1.3.6.1.4.1.2706.123.1.2.1";
 String name = "myObjectID";
 String shortName = "mO";
 ObjectID myOID = new ObjectID(oidStr, name, shortName);
 
Otherwise, if only the OID string for the new ObjectID is supplied, no name respectively shortName registration can be performed.

When creating a new ObjectID by means of one of the several constructors, an already existing ObjectID with the same oid string will be replaced. For that reason it may be useful to call the hasRegisteredName method for querying if a name already has been registered for some particular oid before creating a new one - and overwriting the old one, e.g.:

 String oidStr = "1.3.6.1.4.1.2706.123.1.2.1";
 String name = "myObjectID";
 String shortName = "mO";
 ObjectID oid = null;
 if (!ObjectID.hasRegisteredName(oidStr)) {
   oid = new ObjectID(oidStr, name, shortName);
 }
 
The hasRegisteredName method only will return true if a name already has been regsitered; in that way, it will return false, if only an OID string - and no name/shortName - has been specified when creating the ObjectID in mind.

Version:
File Revision 48
See Also:
ASN1Object, ASN

Field Summary
static ObjectID anyPolicy
          Creates an ObjectID for the x.509 anyPolicy certificate policy which may be used within a CertificatePolicies extension to not limiting the set of policies for certification paths which include the corresponding CA certificate.
static ObjectID caIssuers
          Creates an ObjectID for the x.509 AccessDescription access method caIssuers, as defined by RFC 3280.
static ObjectID caRepository
          Creates an ObjectID for the x.509 AccessDescription access method caRepository which may be used within a SubjectInfoAccess extension.
static ObjectID certTypes
          Creates an ObjectID for the PKCS#9 object certTypes.
static ObjectID challengePassword
          Creates an ObjectID for the PKCS#9 object challengePassword.
static ObjectID cms_authData
          Creates an ObjectID for the CMS object CMS AuthenticatedData.
static ObjectID cms_contentInfo
          Creates an ObjectID for the CMS object CMS ContentInfo.
static ObjectID cms_data
          Creates an ObjectID for the CMS object CMS Data.
static ObjectID cms_digestedData
          Creates an ObjectID for the CMS object CMS DigestedData.
static ObjectID cms_encryptedData
          Creates an ObjectID for the CMS object CMS EncryptedData.
static ObjectID cms_envelopedData
          Creates an ObjectID for the CMS object CMS EnvelopedData.
static ObjectID cms_signedData
          Creates an ObjectID for the CMS object CMS SignedData.
static ObjectID commonName
          Creates an ObjectID for the X.500 attribute type commonName (shortName CN).
static ObjectID contentHint
          Creates an ObjectID (1.2.840.113549.1.9.16.2.4) for the PKCS#9 ContentHint attribute as used for S/MIMEv3 ESS.
static ObjectID contentIdentifier
          Creates an ObjectID (1.2.840.113549.1.9.16.2.7) for the PKCS#9 ContentIdentifier attribute as used for S/MIMEv3 ESS.
static ObjectID contentReference
          Creates an ObjectID (1.2.840.113549.1.9.16.2.10) for the PKCS#9 ContentReference attribute as used for S/MIMEv3 ESS.
static ObjectID contentType
          Creates an ObjectID for the PKCS#9 object contentType.
static ObjectID countersignature
          Creates an ObjectID for the PKCS#9 object countersignature.
static ObjectID country
          Creates an ObjectID for the X.500 attribute type countryName (shortName C).
static ObjectID countryOfCitizenship
          Creates an ObjectID for the Qualified Certificate personal data attribute type CountryOfCitizenship.
static ObjectID countryOfResidence
          Creates an ObjectID for the Qualified Certificate personal data attribute type CountryOfResidence.
static ObjectID crlTypes
          Creates an ObjectID for the PKCS#9 object crlTypes.
static ObjectID dateOfBirth
          Creates an ObjectID for the Qualified Certificate personal data attribute type DateOfBirth.
static ObjectID description
          Creates an ObjectID for the X.500 attribute type description ("2.5.4.13").
static ObjectID dnQualifier
          Creates an ObjectID for the x.500 attribute type dnQualifier (distinguished name qualifier).
static ObjectID domainComponent
          Creates an ObjectID for the x.500 attribute type domainComponent (shortName DC), as defined by RFC 2247.
static ObjectID emailAddress
          Creates an ObjectID for the PKCS#9 object emailAddress (shortName EMAIL).
static ObjectID encrypKeyPref
          Creates an ObjectID for the S/MIMEv3 object encryptionKeyPreference.
static ObjectID equivalentLabels
          Creates an ObjectID (1.2.840.113549.1.9.16.2.9) for the PKCS#9 EquivalentLabels attribute as used for S/MIMEv3 ESS.
static ObjectID extendedCertificateAttributes
          Creates an ObjectID for the PKCS#9 object extendedCertificateAttributes.
static ObjectID extensionRequest
          Creates an ObjectID for the PKCS#9 object extensionRequest.
static ObjectID friendlyName
          Creates an ObjectID for the PKCS#9 object friendlyName.
static ObjectID gender
          Creates an ObjectID for the Qualified Certificate personal data attribute type Gender.
static ObjectID generationQualifier
          Creates an ObjectID for the x.500 attribute type generationQualifier.
static ObjectID givenName
          Creates an ObjectID for the x.500 attribute type givenName, added by Telia.
static ObjectID iaikKeyStoreV3
           
static ObjectID id_pkix_cps
          Creates an ObjectID for the PKIX object id-pkix-cps indicating a CPS Pointer qualifier for defining a (URI) pointer to a Certification Practice Statement (CPS) describing a particular CA policy.
static ObjectID id_pkix_unotice
          Creates an ObjectID for the PKIX object id-pkix-unotice indicating a User Notice qualifier for describing a particular CA policy.
static ObjectID initials
          Creates an ObjectID for the x.500 attribute type initials.
static ObjectID locality
          Creates an ObjectID for the X.500 attribute type localityName (shortName L).
static ObjectID localKeyID
          Creates an ObjectID for the PKCS#9 object localKeyID.
static ObjectID messageDigest
          Creates an ObjectID for the PKCS#9 object messageDigest.
static ObjectID mlExpandHistory
          Creates an ObjectID (1.2.840.113549.1.9.16.2.3) for the PKCS#9 mlExpandHistory attribute as used for S/MIMEv3 ESS.
static ObjectID msgSigDigest
          Creates an ObjectID (1.2.840.113549.1.9.16.2.5) for the PKCS#9 MsgSigDigest attribute as used for S/MIMEv3 ESS.
static ObjectID netscape
          The Netscape base object identifier.
static ObjectID netscapeCertSequence
          The Netscape cert seequence object identifier.
static ObjectID ocsp
          Creates an ObjectID for the x.509 AccessDescription access method ocsp, as defined by RFC 3280.
static ObjectID organization
          Creates an ObjectID for the X.500 attribute type organizationName (shortName O).
static ObjectID organizationalUnit
          Creates an ObjectID for the X.500 attribute type organizationalUnitName (shortName OU).
static ObjectID pkcs12_certBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 certBag.
static ObjectID pkcs12_CertBagIds
          Creates an ObjectID for the PKCS#12 object PKCS#12 CertBagIds When using it, type ObjectID.pkcs12_CertBagIds
static ObjectID pkcs12_crlBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 crlBag.
static ObjectID pkcs12_keyBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 keyBag.
static ObjectID pkcs12_pkcs8ShroudedKeyBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 pkcs8ShroudedKeyBag.
static ObjectID pkcs12_safeContentsBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 safeContentsBag.
static ObjectID pkcs12_SDSICertBagId
          Creates an ObjectID for the PKCS#12 object PKCS#12 SDSICertBagId.
static ObjectID pkcs12_secretBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 secretBag.
static ObjectID pkcs12_Version1
          Creates an ObjectID for the PKCS#12 object PKCS#12 Version1.
static ObjectID pkcs12_Version1_BagIds
          Creates an ObjectID for the PKCS#12 object PKCS#12 Version1 BagIds.
static ObjectID pkcs12_x509CertCRLBagId
          Creates an ObjectID for the PKCS#12 object PKCS#12 x509CertCRLBagId.
static ObjectID pkcs7
          Creates an ObjectID for the PKCS#7 object PKCS#7.
static ObjectID pkcs7_data
          Creates an ObjectID for the PKCS#7 object PKCS#7 data.
static ObjectID pkcs7_digestedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 digestedData.
static ObjectID pkcs7_encryptedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 encryptedData.
static ObjectID pkcs7_envelopedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 envelopedData.
static ObjectID pkcs7_signedAndEnvelopedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 signedAndEnvelopedData.
static ObjectID pkcs7_signedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 signedData.
static ObjectID placeOfBirth
          Creates an ObjectID for the Qualified Certificate personal data attribute type PlaceOfBirth.
static ObjectID postalAddress
          Creates an ObjectID for the X.500 attribute type postalAddress.
static ObjectID postalCode
          Creates an ObjectID for the X.500 attribute type postalCode.
static ObjectID pseudonym
          Creates an ObjectID for the x.500 attribute type Pseudonym.
static ObjectID receipt
          Creates an ObjectID (1.2.840.113549.1.9.16.1.1) for the PKCS#9 Receipt attribute as used for S/MIMEv3 ESS.
static ObjectID receiptRequest
          Creates an ObjectID (1.2.840.113549.1.9.16.2.1) for the PKCS#9 ReceiptRequest attribute as used for S/MIMEv3 ESS.
static ObjectID sdsiCertificate
          Creates an ObjectID for the PKCS#9 object sdsiCertificate.
static ObjectID securityLabel
          Creates an ObjectID (1.2.840.113549.1.9.16.2.2) for the PKCS#9 SecurityLabel attribute as used for S/MIMEv3 ESS.
static ObjectID serialNumber
          Creates an ObjectID for the X.500 attribute type serialNumber (shortName CN).
static ObjectID signingCertificate
          Creates an ObjectID (1.2.840.113549.1.9.16.2.12) for the PKCS#9 SigningCertificate attribute as used for S/MIMEv3 ESS.
static ObjectID signingDescription
          Creates an ObjectID for the PKCS#9 object signingDescription.
static ObjectID signingTime
          Creates an ObjectID for the PKCS#9 object signingTime.
static ObjectID smimeCapabilities
          Creates an ObjectID for the PKCS#9 object smimeCapabilities as uses by S/MIME (the same as #symmetricCapabilities).
static ObjectID stateOrProvince
          Creates an ObjectID for the X.500 attribute type stateOrProvinceName (shortName ST).
static ObjectID streetAddress
          Creates an ObjectID for the X.500 attribute type streetAddress (shortName STREET).
static ObjectID surName
          Creates an ObjectID for the x.500 attribute type surname (shortName SN), added by Telia.
static ObjectID symmetricCapabilities
          Creates an ObjectID for the PKCS#9 object symmetricCapabilities as uses by S/MIME.
static ObjectID telephoneNumber
          Creates an ObjectID for the X.500 attribute type telephoneNumber.
static ObjectID telexNumber
          Creates an ObjectID for the X.500 attribute type telexNumber.
static ObjectID timeStamping
          Creates an ObjectID for the x.509 AccessDescription access method timeStamping which may be used within a SubjectInfoAccess extension.
static ObjectID timeStampToken
           
static ObjectID title
          Creates an ObjectID for the X.500 attribute type title (shortName T).
static ObjectID tstInfo
          Creates an ObjectID for the Time Stamp Protocol token TSTInfo.
static ObjectID uniqueIdentifier
          Creates an ObjectID for the x.500 attribute type uniqueIdentifier, added by Telia.
static ObjectID unstructuredAddress
          Creates the PKCS#9 ObjectID unstructeredAddress.
static ObjectID unstructuredName
          Creates an ObjectID for the PKCS#9 object unstructeredName.
static ObjectID userid
          Creates an ObjectID for the COSINE/Internet attribute type userid (shortName UID), as defined by RFC 1274.
static ObjectID x509Certificate
          Creates an ObjectID for the PKCS#9 object x509Certificate.
static ObjectID x509Crl
          Creates an ObjectID for the PKCS#9 object x509Crl.
 
Fields inherited from class iaik.asn1.ASN1Object
asnType, constructed, encode_listener, indefinite_length, isStringType, stream_mode
 
Constructor Summary
protected ObjectID()
          The default constructor.
  ObjectID(String oid)
          Constructs an ObjectID from a String.
  ObjectID(String oid, String name)
          Constructs an ObjectID from a String representation and a String name.
  ObjectID(String oid, String name, String shortName)
          Constructs an ObjectID from a String representation, a String name, and a String shortName.
 
Method Summary
protected  void decode(int length, InputStream is)
          Decodes the next available data from the InputStream.
protected  void encode(OutputStream os)
          DER encodes this OBjectID ASN1Object and writes the result to given OutputStream.
 boolean equals(Object obj)
          Compares this ObjectID to the specified object.
 String getID()
          Returns the objectID as string.
 String getName()
          Returns the name registered for this ObjectID or the object identifier if there is no name registered.
 String getNameAndID()
          Returns the name (if registered) and OID string for this ObjectID.
static ObjectID getObjectID(String oid)
          Construct a new ObjectID with from String.
static String getRegisteredName(String oid)
          Looks if a name for the object identifier specified by the given OID string already is registered.
 String getShortName()
          Returns the short name registered for this ObjectID.
 Object getValue()
          Returns the value of this ObjectID as a String object.
 int hashCode()
          Returns a hash code for this object.
static boolean hasRegisteredName(String oid)
          Looks if a name for the object identifier specified by the given OID string already is registered.
 void setValue(Object object)
          Sets the value of this object to value (e.g.
 String toString()
          Returns a string that represents the contents of the ObjectID.
 
Methods inherited from class iaik.asn1.ASN1Object
addComponent, addEncodeListener, clone, countComponents, encodeObject, getAsnType, getComponentAt, indefiniteLength, isA, isConstructed, isStringType, setIndefiniteLength
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

commonName

public static ObjectID commonName
Creates an ObjectID for the X.500 attribute type commonName (shortName CN). When using it, type ObjectID.commonName

serialNumber

public static ObjectID serialNumber
Creates an ObjectID for the X.500 attribute type serialNumber (shortName CN). When using it, type ObjectID.serialNumber.

ASN.1 definition of type serialNumber:

 SerialNumber ::= PrintableString (SIZE(1..64))
 

country

public static ObjectID country
Creates an ObjectID for the X.500 attribute type countryName (shortName C). When using it, type ObjectID.country

locality

public static ObjectID locality
Creates an ObjectID for the X.500 attribute type localityName (shortName L). When using it, type ObjectID.locality

stateOrProvince

public static ObjectID stateOrProvince
Creates an ObjectID for the X.500 attribute type stateOrProvinceName (shortName ST). When using it, type ObjectID.stateOrProvince

streetAddress

public static ObjectID streetAddress
Creates an ObjectID for the X.500 attribute type streetAddress (shortName STREET). When using it, type ObjectID.streetAddress

organization

public static ObjectID organization
Creates an ObjectID for the X.500 attribute type organizationName (shortName O). When using it, type ObjectID.organization

organizationalUnit

public static ObjectID organizationalUnit
Creates an ObjectID for the X.500 attribute type organizationalUnitName (shortName OU). When using it, type ObjectID.organizationalUnit

title

public static ObjectID title
Creates an ObjectID for the X.500 attribute type title (shortName T). When using it, type ObjectID.title

description

public static ObjectID description
Creates an ObjectID for the X.500 attribute type description ("2.5.4.13"). When using it, type ObjectID.description

postalAddress

public static ObjectID postalAddress
Creates an ObjectID for the X.500 attribute type postalAddress. When using it, type ObjectID.postalAddress

ASN.1 definition of type postalAddress:

 PostalAddress ::= SEQUENCE OF DirectoryString
 

postalCode

public static ObjectID postalCode
Creates an ObjectID for the X.500 attribute type postalCode. When using it, type ObjectID.postalCode

telephoneNumber

public static ObjectID telephoneNumber
Creates an ObjectID for the X.500 attribute type telephoneNumber. When using it, type ObjectID.telephoneNumber

telexNumber

public static ObjectID telexNumber
Creates an ObjectID for the X.500 attribute type telexNumber. When using it, type ObjectID.telexNumber

surName

public static ObjectID surName
Creates an ObjectID for the x.500 attribute type surname (shortName SN), added by Telia. When using it, type ObjectID.surName

givenName

public static ObjectID givenName
Creates an ObjectID for the x.500 attribute type givenName, added by Telia. When using it, type ObjectID.givenName.

initials

public static ObjectID initials
Creates an ObjectID for the x.500 attribute type initials. When using it, type ObjectID.initials

generationQualifier

public static ObjectID generationQualifier
Creates an ObjectID for the x.500 attribute type generationQualifier. When using it, type ObjectID.generationQualifier.

uniqueIdentifier

public static ObjectID uniqueIdentifier
Creates an ObjectID for the x.500 attribute type uniqueIdentifier, added by Telia. When using it, type ObjectID.uniqueIdentifier.

dnQualifier

public static ObjectID dnQualifier
Creates an ObjectID for the x.500 attribute type dnQualifier (distinguished name qualifier). When using it, type ObjectID.dnQualifier.

pseudonym

public static ObjectID pseudonym
Creates an ObjectID for the x.500 attribute type Pseudonym. When using it, type ObjectID.pseudonym.

domainComponent

public static ObjectID domainComponent
Creates an ObjectID for the x.500 attribute type domainComponent (shortName DC), as defined by RFC 2247. When using it, type ObjectID.domainComponent.

ASN.1 definition of type DomainComponent:

 DomainComponent ::= IA5String
 

userid

public static ObjectID userid
Creates an ObjectID for the COSINE/Internet attribute type userid (shortName UID), as defined by RFC 1274. The Userid attribute type specifies a computer system login name.
When using this objectID, type ObjectID.userid.

dateOfBirth

public static ObjectID dateOfBirth
Creates an ObjectID for the Qualified Certificate personal data attribute type DateOfBirth.
When using this objectID, type ObjectID.dateOfBirth.

ASN.1 definition of type DateOfBirth:

 DateOfBirth ::= GeneralizedTime
 

placeOfBirth

public static ObjectID placeOfBirth
Creates an ObjectID for the Qualified Certificate personal data attribute type PlaceOfBirth.
When using this objectID, type ObjectID.placeOfBirth.

ASN.1 definition of type PlaceOfBirth:

 PlaceOfBirth ::= DirectoryString
 

gender

public static ObjectID gender
Creates an ObjectID for the Qualified Certificate personal data attribute type Gender.
When using this objectID, type ObjectID.gender.

ASN.1 definition of type Gender:

 Gender ::= PrintableString (SIZE(1))
 -- "M", "F", "m" or "f"
 

countryOfCitizenship

public static ObjectID countryOfCitizenship
Creates an ObjectID for the Qualified Certificate personal data attribute type CountryOfCitizenship.
When using this objectID, type ObjectID.countryOfCitizenship.

ASN.1 definition of type CountryOfCitizenship:

 CountryOfCitizenship ::= PrintableString (SIZE(2))
 -- ISO 3166 Country Code
 

countryOfResidence

public static ObjectID countryOfResidence
Creates an ObjectID for the Qualified Certificate personal data attribute type CountryOfResidence.
When using this objectID, type ObjectID.countryOfResidence.

ASN.1 definition of type CountryOfResidence:

 CountryOfResidence ::= PrintableString (SIZE(2))
 -- ISO 3166 Country Code
 

ocsp

public static ObjectID ocsp
Creates an ObjectID for the x.509 AccessDescription access method ocsp, as defined by RFC 3280. When using it, type ObjectID.caIssuers.

caIssuers

public static ObjectID caIssuers
Creates an ObjectID for the x.509 AccessDescription access method caIssuers, as defined by RFC 3280. When using it, type ObjectID.caIssuers.

caRepository

public static ObjectID caRepository
Creates an ObjectID for the x.509 AccessDescription access method caRepository which may be used within a SubjectInfoAccess extension. When using it, type ObjectID.caRepository.

timeStamping

public static ObjectID timeStamping
Creates an ObjectID for the x.509 AccessDescription access method timeStamping which may be used within a SubjectInfoAccess extension. When using it, type ObjectID.timeStamping.

timeStampToken

public static ObjectID timeStampToken

anyPolicy

public static ObjectID anyPolicy
Creates an ObjectID for the x.509 anyPolicy certificate policy which may be used within a CertificatePolicies extension to not limiting the set of policies for certification paths which include the corresponding CA certificate. When using it, type ObjectID.anyPolicy.

pkcs7

public static ObjectID pkcs7
Creates an ObjectID for the PKCS#7 object PKCS#7. When using it, type ObjectID.pkcs7

pkcs7_data

public static ObjectID pkcs7_data
Creates an ObjectID for the PKCS#7 object PKCS#7 data. When using it, type ObjectID.pkcs7_data

pkcs7_signedData

public static ObjectID pkcs7_signedData
Creates an ObjectID for the PKCS#7 object PKCS#7 signedData. When using it, type ObjectID.pkcs7_signedData

pkcs7_envelopedData

public static ObjectID pkcs7_envelopedData
Creates an ObjectID for the PKCS#7 object PKCS#7 envelopedData. When using it, type ObjectID.pkcs7_envelopedData

pkcs7_signedAndEnvelopedData

public static ObjectID pkcs7_signedAndEnvelopedData
Creates an ObjectID for the PKCS#7 object PKCS#7 signedAndEnvelopedData. When using it, type ObjectID.pkcs7_signedAndEnvelopedData

pkcs7_digestedData

public static ObjectID pkcs7_digestedData
Creates an ObjectID for the PKCS#7 object PKCS#7 digestedData. When using it, type ObjectID.pkcs7_digestedData

pkcs7_encryptedData

public static ObjectID pkcs7_encryptedData
Creates an ObjectID for the PKCS#7 object PKCS#7 encryptedData. When using it, type ObjectID.pkcs7_encryptedData

tstInfo

public static ObjectID tstInfo
Creates an ObjectID for the Time Stamp Protocol token TSTInfo. When using it, type ObjectID.tstInfo.

emailAddress

public static ObjectID emailAddress
Creates an ObjectID for the PKCS#9 object emailAddress (shortName EMAIL). When using it, type ObjectID.emailAddress

unstructuredName

public static ObjectID unstructuredName
Creates an ObjectID for the PKCS#9 object unstructeredName. When using it, type ObjectID.unstructeredName

contentType

public static ObjectID contentType
Creates an ObjectID for the PKCS#9 object contentType. When using it, type ObjectID.contentType

messageDigest

public static ObjectID messageDigest
Creates an ObjectID for the PKCS#9 object messageDigest. When using it, type ObjectID.messageDigest

signingTime

public static ObjectID signingTime
Creates an ObjectID for the PKCS#9 object signingTime. When using it, type ObjectID.signingTime

countersignature

public static ObjectID countersignature
Creates an ObjectID for the PKCS#9 object countersignature. When using it, type ObjectID.countersignature

challengePassword

public static ObjectID challengePassword
Creates an ObjectID for the PKCS#9 object challengePassword. When using it, type ObjectID.challengePassword

unstructuredAddress

public static ObjectID unstructuredAddress
Creates the PKCS#9 ObjectID unstructeredAddress. When using it, type ObjectID.unstructeredAddress

extendedCertificateAttributes

public static ObjectID extendedCertificateAttributes
Creates an ObjectID for the PKCS#9 object extendedCertificateAttributes. When using it, type ObjectID.extendedCertificateAttributes

signingDescription

public static ObjectID signingDescription
Creates an ObjectID for the PKCS#9 object signingDescription. When using it, type ObjectID.signingDescription

extensionRequest

public static ObjectID extensionRequest
Creates an ObjectID for the PKCS#9 object extensionRequest. When using it, type ObjectID.extensionRequest

symmetricCapabilities

public static ObjectID symmetricCapabilities
Creates an ObjectID for the PKCS#9 object symmetricCapabilities as uses by S/MIME. When using it, type ObjectID.symmetricCapabilities

friendlyName

public static ObjectID friendlyName
Creates an ObjectID for the PKCS#9 object friendlyName. When using it, type ObjectID.friendlyName

localKeyID

public static ObjectID localKeyID
Creates an ObjectID for the PKCS#9 object localKeyID. When using it, type ObjectID.localKeyID

certTypes

public static ObjectID certTypes
Creates an ObjectID for the PKCS#9 object certTypes. When using it, type ObjectID.certTypes

x509Certificate

public static ObjectID x509Certificate
Creates an ObjectID for the PKCS#9 object x509Certificate. When using it, type ObjectID.x509Certificate

sdsiCertificate

public static ObjectID sdsiCertificate
Creates an ObjectID for the PKCS#9 object sdsiCertificate. When using it, type ObjectID.sdsiCertificate

crlTypes

public static ObjectID crlTypes
Creates an ObjectID for the PKCS#9 object crlTypes. When using it, type ObjectID.crlTypes

x509Crl

public static ObjectID x509Crl
Creates an ObjectID for the PKCS#9 object x509Crl. When using it, type ObjectID.x509Crl

receipt

public static ObjectID receipt
Creates an ObjectID (1.2.840.113549.1.9.16.1.1) for the PKCS#9 Receipt attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.receipt.

receiptRequest

public static ObjectID receiptRequest
Creates an ObjectID (1.2.840.113549.1.9.16.2.1) for the PKCS#9 ReceiptRequest attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.receiptRequest.

securityLabel

public static ObjectID securityLabel
Creates an ObjectID (1.2.840.113549.1.9.16.2.2) for the PKCS#9 SecurityLabel attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.securityLabel.

mlExpandHistory

public static ObjectID mlExpandHistory
Creates an ObjectID (1.2.840.113549.1.9.16.2.3) for the PKCS#9 mlExpandHistory attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.mlExpandHistory.

contentHint

public static ObjectID contentHint
Creates an ObjectID (1.2.840.113549.1.9.16.2.4) for the PKCS#9 ContentHint attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.contentHint.

msgSigDigest

public static ObjectID msgSigDigest
Creates an ObjectID (1.2.840.113549.1.9.16.2.5) for the PKCS#9 MsgSigDigest attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.msgSigDigest.

contentIdentifier

public static ObjectID contentIdentifier
Creates an ObjectID (1.2.840.113549.1.9.16.2.7) for the PKCS#9 ContentIdentifier attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.contentIdentifier.

equivalentLabels

public static ObjectID equivalentLabels
Creates an ObjectID (1.2.840.113549.1.9.16.2.9) for the PKCS#9 EquivalentLabels attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.equivalentLabels.

contentReference

public static ObjectID contentReference
Creates an ObjectID (1.2.840.113549.1.9.16.2.10) for the PKCS#9 ContentReference attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.contentReference.

signingCertificate

public static ObjectID signingCertificate
Creates an ObjectID (1.2.840.113549.1.9.16.2.12) for the PKCS#9 SigningCertificate attribute as used for S/MIMEv3 ESS. When using it, type ObjectID.signingCertificate.

pkcs12_CertBagIds

public static ObjectID pkcs12_CertBagIds
Creates an ObjectID for the PKCS#12 object PKCS#12 CertBagIds When using it, type ObjectID.pkcs12_CertBagIds

pkcs12_x509CertCRLBagId

public static ObjectID pkcs12_x509CertCRLBagId
Creates an ObjectID for the PKCS#12 object PKCS#12 x509CertCRLBagId. When using it, type ObjectID.pkcs12_x509CertCRLBagId

pkcs12_SDSICertBagId

public static ObjectID pkcs12_SDSICertBagId
Creates an ObjectID for the PKCS#12 object PKCS#12 SDSICertBagId. When using it, type ObjectID.pkcs12_SDSICertBagId

pkcs12_Version1

public static ObjectID pkcs12_Version1
Creates an ObjectID for the PKCS#12 object PKCS#12 Version1. When using it, type ObjectID.pkcs12_Version1

pkcs12_Version1_BagIds

public static ObjectID pkcs12_Version1_BagIds
Creates an ObjectID for the PKCS#12 object PKCS#12 Version1 BagIds. When using it, type ObjectID.pkcs12_Version1_BagIds

pkcs12_keyBag

public static ObjectID pkcs12_keyBag
Creates an ObjectID for the PKCS#12 object PKCS#12 keyBag. When using it, type ObjectID.pkcs12_keyBag

pkcs12_pkcs8ShroudedKeyBag

public static ObjectID pkcs12_pkcs8ShroudedKeyBag
Creates an ObjectID for the PKCS#12 object PKCS#12 pkcs8ShroudedKeyBag. When using it, type ObjectID.pkcs12_pkcs8ShroudedKeyBag

pkcs12_certBag

public static ObjectID pkcs12_certBag
Creates an ObjectID for the PKCS#12 object PKCS#12 certBag. When using it, type ObjectID.pkcs12_certBag

pkcs12_crlBag

public static ObjectID pkcs12_crlBag
Creates an ObjectID for the PKCS#12 object PKCS#12 crlBag. When using it, type ObjectID.pkcs12_crlBag

pkcs12_secretBag

public static ObjectID pkcs12_secretBag
Creates an ObjectID for the PKCS#12 object PKCS#12 secretBag. When using it, type ObjectID.pkcs12_secretBag

pkcs12_safeContentsBag

public static ObjectID pkcs12_safeContentsBag
Creates an ObjectID for the PKCS#12 object PKCS#12 safeContentsBag. When using it, type ObjectID.pkcs12_safeContentsBag

id_pkix_cps

public static ObjectID id_pkix_cps
Creates an ObjectID for the PKIX object id-pkix-cps indicating a CPS Pointer qualifier for defining a (URI) pointer to a Certification Practice Statement (CPS) describing a particular CA policy.

When using it, type ObjectID.id_pkix_cps


id_pkix_unotice

public static ObjectID id_pkix_unotice
Creates an ObjectID for the PKIX object id-pkix-unotice indicating a User Notice qualifier for describing a particular CA policy.

When using it, type ObjectID.id_pkix_unotice


netscape

public static ObjectID netscape
The Netscape base object identifier. When using it, type ObjectID.netscape.

netscapeCertSequence

public static ObjectID netscapeCertSequence
The Netscape cert seequence object identifier. When using it, type ObjectID.netscapeCertSequence.

cms_data

public static ObjectID cms_data
Creates an ObjectID for the CMS object CMS Data. When using it, type ObjectID.cms_data

cms_signedData

public static ObjectID cms_signedData
Creates an ObjectID for the CMS object CMS SignedData. When using it, type ObjectID.cms_signedData

cms_envelopedData

public static ObjectID cms_envelopedData
Creates an ObjectID for the CMS object CMS EnvelopedData. When using it, type ObjectID.cms_envelopedData

cms_digestedData

public static ObjectID cms_digestedData
Creates an ObjectID for the CMS object CMS DigestedData. When using it, type ObjectID.cms_digestedData

cms_encryptedData

public static ObjectID cms_encryptedData
Creates an ObjectID for the CMS object CMS EncryptedData. When using it, type ObjectID.cms_encryptedData

cms_authData

public static ObjectID cms_authData
Creates an ObjectID for the CMS object CMS AuthenticatedData. When using it, type ObjectID.cms_authData

cms_contentInfo

public static ObjectID cms_contentInfo
Creates an ObjectID for the CMS object CMS ContentInfo. When using it, type ObjectID.cms_contentInfo

smimeCapabilities

public static ObjectID smimeCapabilities
Creates an ObjectID for the PKCS#9 object smimeCapabilities as uses by S/MIME (the same as #symmetricCapabilities). When using it, type ObjectID.smimeCapabilities

encrypKeyPref

public static ObjectID encrypKeyPref
Creates an ObjectID for the S/MIMEv3 object encryptionKeyPreference. When using it, type ObjectID.encrypKeyPref.

iaikKeyStoreV3

public static ObjectID iaikKeyStoreV3
Constructor Detail

ObjectID

protected ObjectID()
The default constructor.

ObjectID

public ObjectID(String oid)
Constructs an ObjectID from a String. If a name already has been registered for the given ObjectID, it will be cleared when calling this method. If a shortName has been registered, it will be cleared.
Parameters:
oid - the objectID as String, e.g. "1.2.3.4"

ObjectID

public ObjectID(String oid,
                String name)
Constructs an ObjectID from a String representation and a String name. If a name already has been registered for the given ObjectID, it will be replaced when calling this method. If a shortName has been registered, it will be cleared. Use the hasRegisteredName method for querying if a name for the particular oid already has been registered, e.g.:
 String oidStr = "1.3.6.1.4.1.2706.123.1.2.1";
 String name = "myObjectID";
 ObjectID oid = null;
 if (!ObjectID.hasRegisteredName(oidStr)) {
   oid = new ObjectID(oidStr, name);
 }
 
Parameters:
oid - the objectID as String, e.g. "1.2.3.4"
name - a name for the objectID

ObjectID

public ObjectID(String oid,
                String name,
                String shortName)
Constructs an ObjectID from a String representation, a String name, and a String shortName. If a name already has been registered for the given ObjectID, it will be replaced when calling this method. If a shortName has been registered, it also will be replaced. Use the hasRegisteredName method for querying if a name for the particular oid already has been registered, e.g.:
 String oidStr = "1.3.6.1.4.1.2706.123.1.2.1";
 String name = "myObjectID";
 String shortName = "mO";
 ObjectID oid = null;
 if (!ObjectID.hasRegisteredName(oidStr)) {
   oid = new ObjectID(oidStr, name, shortName);
 }
 
Parameters:
oid - the objectID as String, e.g. "1.2.3.4"
name - a name for the objectID, e.g. "commonName"
shortName - a short name for the objectID e.g. "CN"
Method Detail

hasRegisteredName

public static boolean hasRegisteredName(String oid)
Looks if a name for the object identifier specified by the given OID string already is registered.
Parameters:
oid - the OID-String specifying the object identifier to be looked for, e.g. "1.2.4.5"
Returns:
true if a name for the object identifier with this OID specification already is registered, false otherwise

getRegisteredName

public static String getRegisteredName(String oid)
Looks if a name for the object identifier specified by the given OID string already is registered.
Parameters:
oid - the OID-String specifying the object identifier to be looked for, e.g. "1.2.4.5"
Returns:
the name, if registered for the object identifier with this OID specification, false if no name is registered

getObjectID

public static ObjectID getObjectID(String oid)
Construct a new ObjectID with from String. This method is identical to the constructor except that it does not clear registered names and short names.

getValue

public Object getValue()
Returns the value of this ObjectID as a String object.
Overrides:
getValue in class ASN1Object
Returns:
the value of this ObjectID as a String object

setValue

public void setValue(Object object)
Sets the value of this object to value (e.g. "1.2.3.4"). The supplied value has to be a OID string like, for instance, "1.2.3.4".
Overrides:
setValue in class ASN1Object
Parameters:
object - the value (na OID string) to be set for this ObjectID

getID

public String getID()
Returns the objectID as string.
Returns:
the objectID as String ("1.2.3.4")

getName

public String getName()
Returns the name registered for this ObjectID or the object identifier if there is no name registered.
Returns:
the name of the ObjectID; if no name is registered, the OID string is returned

getShortName

public String getShortName()
Returns the short name registered for this ObjectID. If no shortName is registered, but a name is registered, the name is returned. If no shortName is registered, and no name is registered, the OID string is returned.
Returns:
the short name of the ObjectID; if no shortName is registered the name - if registered - or the OID string is returned

getNameAndID

public String getNameAndID()
Returns the name (if registered) and OID string for this ObjectID.

If a name is registered, this method returns "name (OID string)", e.g.: "commonName (2.5.4.3)". If no name is registered, the OID string is returned only: "2.5.4.3".

Returns:
name (if registered) and OID string for this ObjectID

hashCode

public int hashCode()
Returns a hash code for this object.
Overrides:
hashCode in class Object
Returns:
the hash code

equals

public boolean equals(Object obj)
Compares this ObjectID to the specified object.
Overrides:
equals in class Object
Parameters:
obj - - the object to compare this ObjectID against.
Returns:
true, if the object is equal to this ObjectID false otherwise

encode

protected void encode(OutputStream os)
               throws IOException
DER encodes this OBjectID ASN1Object and writes the result to given OutputStream.
Overrides:
encode in class ASN1Object
Parameters:
os - the output stream to which to write the encoded data
Throws:
IOException - if an error occurs while writing to the stream

decode

protected void decode(int length,
                      InputStream is)
               throws IOException
Decodes the next available data from the InputStream.
Overrides:
decode in class ASN1Object
Parameters:
length - the length of the ASN1Object which shall be decoded
is - the input stream from which the DER encoded data is read in
Throws:
IOException - if there is a problem with the InputStream

toString

public String toString()
Returns a string that represents the contents of the ObjectID.
Overrides:
toString in class ASN1Object
Returns:
the string representation
See Also:
ASN1Object.toString()

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