Package org.mozilla.jss.asn1
Class OBJECT_IDENTIFIER
java.lang.Object
org.mozilla.jss.asn1.OBJECT_IDENTIFIER
- All Implemented Interfaces:
ASN1Value
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OBJECT_IDENTIFIERThe OID space for FIPS standardized algorithms.(package private) byte[]static final OBJECT_IDENTIFIERThe OID space for ECprivate byte[]static final Formstatic final OBJECT_IDENTIFIERThe OID space for FIPS-180-2 SHA256/SHA384/SHA512 standardized algorithms.static final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERCMC control attributesstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERstatic final OBJECT_IDENTIFIERprivate long[]static final OBJECT_IDENTIFIERThe OID space for RSA's PKCS (public key cryptography standards).static final OBJECT_IDENTIFIERThe OID space for RSA's PKCS #1.static final OBJECT_IDENTIFIERThe OID space for RSA's personal information exchange syntax standard.static final OBJECT_IDENTIFIERThe OID space for RSA's PKCS #2, which has since been folded into PKCS #1.static final OBJECT_IDENTIFIERThe OID space for RSA's password-based encryption standard.static final OBJECT_IDENTIFIERThe OID space for RSA's Selected Attribute Types standard, PKCS #9.static final OBJECT_IDENTIFIERThe OID space for PKIX.static final OBJECT_IDENTIFIERThe OID space for RSA's ciphers.static final OBJECT_IDENTIFIERThe OID space for RSA's message digest algorithms.static final OBJECT_IDENTIFIERThe OID space for RSA Data Security, Inc.static final Tag(package private) Tagprivate static final OBJECT_IDENTIFIER.Template -
Constructor Summary
ConstructorsConstructorDescriptionOBJECT_IDENTIFIER(long[] numbers) Creates an OBJECT_IDENTIFIER from an array of longs, which constitute the numbers that make up the OBJECT IDENTIFIER.OBJECT_IDENTIFIER(String dottedOID) Creates an OBJECT_IDENTIFIER from a String version. -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcheckLongArray(long[] numbers) Checks the given array of numbers to see if it is a valid OID.private byte[]Actually computes the encoding of this object identifier.voidencode(OutputStream ostream) Write this value's DER encoding to an output stream using its own base tag.voidencode(Tag implicitTag, OutputStream ostream) Write this value's DER encoding to an output stream using an implicit tag.booleanprivate byte[]Gets the encoding of the contents, or a cached copy.private byte[]getEncoding(Tag tag) Returns the encoding for the given tag.private ASN1HeaderCompute the ASN1 header for this tag.long[]getTag()Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static OBJECT_IDENTIFIER.TemplateinthashCode()subBranch(long num) Creates a new OBJECT_IDENTIFIER that is a sub-branch of this one.subBranch(long[] newNums) Creates a new OBJECT_IDENTIFIER that is a sub-branch of this one.toString()
-
Field Details
-
EC_PUBKEY_OID
The OID space for EC -
RSADSI
The OID space for RSA Data Security, Inc. -
PKCS
The OID space for RSA's PKCS (public key cryptography standards). -
PKCS1
The OID space for RSA's PKCS #1. -
PKCS2
The OID space for RSA's PKCS #2, which has since been folded into PKCS #1. -
RSA_DIGEST
The OID space for RSA's message digest algorithms. -
PKCS5
The OID space for RSA's password-based encryption standard. -
PKCS9
The OID space for RSA's Selected Attribute Types standard, PKCS #9. -
PKCS12
The OID space for RSA's personal information exchange syntax standard. -
RSA_CIPHER
The OID space for RSA's ciphers. -
ALGORITHM
The OID space for FIPS standardized algorithms. -
HASH_ALGORITHM
The OID space for FIPS-180-2 SHA256/SHA384/SHA512 standardized algorithms. -
PKIX
The OID space for PKIX. -
id_cmc
-
id_cmc_cMCStatusInfo
CMC control attributes -
id_cmc_identification
-
id_cmc_identityProof
-
id_cmc_dataReturn
-
id_cmc_transactionId
-
id_cmc_senderNonce
-
id_cmc_recipientNonce
-
id_cmc_addExtensions
-
id_cmc_encryptedPOP
-
id_cmc_decryptedPOP
-
id_cmc_lraPOPWitness
-
id_cmc_getCert
-
id_cmc_getCRL
-
id_cmc_revokeRequest
-
id_cmc_regInfo
-
id_cmc_responseInfo
-
id_cmc_QueryPending
-
id_cmc_idPOPLinkRandom
-
id_cmc_idPOPLinkWitness
-
id_cmc_idConfirmCertAcceptance
-
id_cmc_statusInfoV2
-
id_cmc_trustedAnchors
-
id_cmc_authData
-
id_cmc_batchRequests
-
id_cmc_batchResponses
-
id_cmc_publishCert
-
id_cmc_modCertTemplate
-
id_cmc_controlProcessed
-
id_cmc_popLinkWitnessV2
-
id_cmc_identityProofV2
-
id_cct
-
id_cct_PKIData
-
id_cct_PKIResponse
-
TAG
-
FORM
-
numbers
private long[] numbers -
encodedContents
private byte[] encodedContents -
cachedEncoding
byte[] cachedEncoding -
tagForCache
Tag tagForCache -
templateInstance
-
-
Constructor Details
-
OBJECT_IDENTIFIER
public OBJECT_IDENTIFIER(long[] numbers) Creates an OBJECT_IDENTIFIER from an array of longs, which constitute the numbers that make up the OBJECT IDENTIFIER.- Parameters:
numbers- Numbers.
-
OBJECT_IDENTIFIER
Creates an OBJECT_IDENTIFIER from a String version. The proper format for the OID string is dotted numbers, for example: "3.2.456.53.23.64". Because the toString() method here provides a different format, we also allow that format, for example: "{3 2 456 53 23 64}".- Parameters:
dottedOID- OID string.- Throws:
NumberFormatException- If the given string cannot be parsed into an OID.
-
-
Method Details
-
getTag
Description copied from interface:ASN1ValueReturns the base tag for this type, not counting any tags that may be imposed on it by its context. -
checkLongArray
private static void checkLongArray(long[] numbers) Checks the given array of numbers to see if it is a valid OID. This is not an exhaustive test, it just looks for obvious problems. It will throw an assertion if a problem is found. With DEBUG turned off, it just checks for null. -
getNumbers
public long[] getNumbers() -
hashCode
public int hashCode() -
subBranch
Creates a new OBJECT_IDENTIFIER that is a sub-branch of this one. For example, ifOBJECT_IDENTIFIER oidhas the value { 1 3 5 6 }, then callingoid.subBranch(4)would return a new OBJECT_IDENTIFIER with the value { 1 3 5 6 4 }.- Parameters:
num- Number.- Returns:
- New sub-branch.
-
subBranch
Creates a new OBJECT_IDENTIFIER that is a sub-branch of this one. For example, ifOBJECT_IDENTIFIER oidhas the value { 1 3 5 6 }, then callingoid.subBranch(new long[]{ 4, 3})would return a new OBJECT_IDENTIFIER with the value { 1 3 5 6 4 3}.- Parameters:
newNums- New numbers.- Returns:
- New sub-branch.
-
equals
-
toString
-
toDottedString
-
encode
Description copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using its own base tag.- Specified by:
encodein interfaceASN1Value- Parameters:
ostream- Output stream.- Throws:
IOException- If an error occurred.
-
getEncodedContents
private byte[] getEncodedContents()Gets the encoding of the contents, or a cached copy. Since the content encoding is the same regardless of the Tag, this only needs to be computed once. -
getEncoding
Returns the encoding for the given tag. If the encoding for this tag was previously computed (and no encoding for a different tag has since been computed), this method returns a cached copy. Otherwise, the encoding will be recomputed. -
getHeader
Compute the ASN1 header for this tag. -
computeEncodedContents
private byte[] computeEncodedContents()Actually computes the encoding of this object identifier. -
encode
Description copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using an implicit tag.- Specified by:
encodein interfaceASN1Value- Parameters:
implicitTag- Implicit tag.ostream- Output stream.- Throws:
IOException- If an error occurred.
-
getTemplate
-