Class OBJECT_IDENTIFIER

java.lang.Object
org.mozilla.jss.asn1.OBJECT_IDENTIFIER
All Implemented Interfaces:
ASN1Value

public class OBJECT_IDENTIFIER extends Object implements ASN1Value
  • Field Details

    • EC_PUBKEY_OID

      public static final OBJECT_IDENTIFIER EC_PUBKEY_OID
      The OID space for EC
    • RSADSI

      public static final OBJECT_IDENTIFIER RSADSI
      The OID space for RSA Data Security, Inc.
    • PKCS

      public static final OBJECT_IDENTIFIER PKCS
      The OID space for RSA's PKCS (public key cryptography standards).
    • PKCS1

      public static final OBJECT_IDENTIFIER PKCS1
      The OID space for RSA's PKCS #1.
    • PKCS2

      public static final OBJECT_IDENTIFIER PKCS2
      The OID space for RSA's PKCS #2, which has since been folded into PKCS #1.
    • RSA_DIGEST

      public static final OBJECT_IDENTIFIER RSA_DIGEST
      The OID space for RSA's message digest algorithms.
    • PKCS5

      public static final OBJECT_IDENTIFIER PKCS5
      The OID space for RSA's password-based encryption standard.
    • PKCS9

      public static final OBJECT_IDENTIFIER PKCS9
      The OID space for RSA's Selected Attribute Types standard, PKCS #9.
    • PKCS12

      public static final OBJECT_IDENTIFIER PKCS12
      The OID space for RSA's personal information exchange syntax standard.
    • RSA_CIPHER

      public static final OBJECT_IDENTIFIER RSA_CIPHER
      The OID space for RSA's ciphers.
    • ALGORITHM

      public static final OBJECT_IDENTIFIER ALGORITHM
      The OID space for FIPS standardized algorithms.
    • HASH_ALGORITHM

      public static final OBJECT_IDENTIFIER HASH_ALGORITHM
      The OID space for FIPS-180-2 SHA256/SHA384/SHA512 standardized algorithms.
    • PKIX

      public static final OBJECT_IDENTIFIER PKIX
      The OID space for PKIX.
    • id_cmc

      public static final OBJECT_IDENTIFIER id_cmc
    • id_cmc_cMCStatusInfo

      public static final OBJECT_IDENTIFIER id_cmc_cMCStatusInfo
      CMC control attributes
    • id_cmc_identification

      public static final OBJECT_IDENTIFIER id_cmc_identification
    • id_cmc_identityProof

      public static final OBJECT_IDENTIFIER id_cmc_identityProof
    • id_cmc_dataReturn

      public static final OBJECT_IDENTIFIER id_cmc_dataReturn
    • id_cmc_transactionId

      public static final OBJECT_IDENTIFIER id_cmc_transactionId
    • id_cmc_senderNonce

      public static final OBJECT_IDENTIFIER id_cmc_senderNonce
    • id_cmc_recipientNonce

      public static final OBJECT_IDENTIFIER id_cmc_recipientNonce
    • id_cmc_addExtensions

      public static final OBJECT_IDENTIFIER id_cmc_addExtensions
    • id_cmc_encryptedPOP

      public static final OBJECT_IDENTIFIER id_cmc_encryptedPOP
    • id_cmc_decryptedPOP

      public static final OBJECT_IDENTIFIER id_cmc_decryptedPOP
    • id_cmc_lraPOPWitness

      public static final OBJECT_IDENTIFIER id_cmc_lraPOPWitness
    • id_cmc_getCert

      public static final OBJECT_IDENTIFIER id_cmc_getCert
    • id_cmc_getCRL

      public static final OBJECT_IDENTIFIER id_cmc_getCRL
    • id_cmc_revokeRequest

      public static final OBJECT_IDENTIFIER id_cmc_revokeRequest
    • id_cmc_regInfo

      public static final OBJECT_IDENTIFIER id_cmc_regInfo
    • id_cmc_responseInfo

      public static final OBJECT_IDENTIFIER id_cmc_responseInfo
    • id_cmc_QueryPending

      public static final OBJECT_IDENTIFIER id_cmc_QueryPending
    • id_cmc_idPOPLinkRandom

      public static final OBJECT_IDENTIFIER id_cmc_idPOPLinkRandom
    • id_cmc_idPOPLinkWitness

      public static final OBJECT_IDENTIFIER id_cmc_idPOPLinkWitness
    • id_cmc_idConfirmCertAcceptance

      public static final OBJECT_IDENTIFIER id_cmc_idConfirmCertAcceptance
    • id_cmc_statusInfoV2

      public static final OBJECT_IDENTIFIER id_cmc_statusInfoV2
    • id_cmc_trustedAnchors

      public static final OBJECT_IDENTIFIER id_cmc_trustedAnchors
    • id_cmc_authData

      public static final OBJECT_IDENTIFIER id_cmc_authData
    • id_cmc_batchRequests

      public static final OBJECT_IDENTIFIER id_cmc_batchRequests
    • id_cmc_batchResponses

      public static final OBJECT_IDENTIFIER id_cmc_batchResponses
    • id_cmc_publishCert

      public static final OBJECT_IDENTIFIER id_cmc_publishCert
    • id_cmc_modCertTemplate

      public static final OBJECT_IDENTIFIER id_cmc_modCertTemplate
    • id_cmc_controlProcessed

      public static final OBJECT_IDENTIFIER id_cmc_controlProcessed
    • id_cmc_popLinkWitnessV2

      public static final OBJECT_IDENTIFIER id_cmc_popLinkWitnessV2
    • id_cmc_identityProofV2

      public static final OBJECT_IDENTIFIER id_cmc_identityProofV2
    • id_cct

      public static final OBJECT_IDENTIFIER id_cct
    • id_cct_PKIData

      public static final OBJECT_IDENTIFIER id_cct_PKIData
    • id_cct_PKIResponse

      public static final OBJECT_IDENTIFIER id_cct_PKIResponse
    • TAG

      public static final Tag TAG
    • FORM

      public static final Form FORM
    • numbers

      private long[] numbers
    • encodedContents

      private byte[] encodedContents
    • cachedEncoding

      byte[] cachedEncoding
    • tagForCache

      Tag tagForCache
    • templateInstance

      private static final OBJECT_IDENTIFIER.Template 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

      public OBJECT_IDENTIFIER(String dottedOID) throws NumberFormatException
      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

      public Tag getTag()
      Description copied from interface: ASN1Value
      Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
      Specified by:
      getTag in interface ASN1Value
      Returns:
      Base tag.
    • 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()
      Overrides:
      hashCode in class Object
    • subBranch

      public OBJECT_IDENTIFIER subBranch(long num)
      Creates a new OBJECT_IDENTIFIER that is a sub-branch of this one. For example, if OBJECT_IDENTIFIER oid has the value { 1 3 5 6 }, then calling oid.subBranch(4) would return a new OBJECT_IDENTIFIER with the value { 1 3 5 6 4 }.
      Parameters:
      num - Number.
      Returns:
      New sub-branch.
    • subBranch

      public OBJECT_IDENTIFIER subBranch(long[] newNums)
      Creates a new OBJECT_IDENTIFIER that is a sub-branch of this one. For example, if OBJECT_IDENTIFIER oid has the value { 1 3 5 6 }, then calling oid.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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toDottedString

      public String toDottedString()
    • encode

      public void encode(OutputStream ostream) throws IOException
      Description copied from interface: ASN1Value
      Write this value's DER encoding to an output stream using its own base tag.
      Specified by:
      encode in interface ASN1Value
      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

      private byte[] getEncoding(Tag tag)
      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

      private ASN1Header getHeader(Tag implicitTag)
      Compute the ASN1 header for this tag.
    • computeEncodedContents

      private byte[] computeEncodedContents()
      Actually computes the encoding of this object identifier.
    • encode

      public void encode(Tag implicitTag, OutputStream ostream) throws IOException
      Description copied from interface: ASN1Value
      Write this value's DER encoding to an output stream using an implicit tag.
      Specified by:
      encode in interface ASN1Value
      Parameters:
      implicitTag - Implicit tag.
      ostream - Output stream.
      Throws:
      IOException - If an error occurred.
    • getTemplate

      public static OBJECT_IDENTIFIER.Template getTemplate()