IT. Expert System.

Android Reference

TestCertUtils.TestX509Certificate


org.apache.harmony.security.tests.support

Class TestCertUtils.TestX509Certificate

    • Method Detail

      • getEncoded

        public byte[] getEncoded()
                          throws CertificateEncodingException
        The encoded for of this X509Certificate is a byte array where first are bytes of encoded form of Subject (as X500Principal), followed by one zero byte and followed by the encoded form of Issuer (as X500Principal)
        Specified by:
        getEncoded in class Certificate
        Returns:
        the encoded representation for this certificate.
        Throws:
        CertificateEncodingException - if the encoding fails.
      • getBasicConstraints

        public int getBasicConstraints()
        Description copied from class: X509Certificate
        Returns the path length of the certificate constraints from the BasicContraints extension.
        Specified by:
        getBasicConstraints in class X509Certificate
        Returns:
        the path length of the certificate constraints if the extension is present or -1 if the extension is not present. Integer.MAX_VALUE if there's not limit.
      • getIssuerDN

        public Principal getIssuerDN()
        Description copied from class: X509Certificate
        Returns the issuer (issuer distinguished name) as an implementation specific Principal object.

        The ASN.1 definition of issuer:

          issuer      Name
        
          Name ::= CHOICE {
              RDNSequence }
        
            RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
        
            RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
        
            AttributeTypeAndValue ::= SEQUENCE {
              type     AttributeType,
              value    AttributeValue }
        
            AttributeType ::= OBJECT IDENTIFIER
        
            AttributeValue ::= ANY DEFINED BY AttributeType
         
        replaced by: X509Certificate.getIssuerX500Principal().
        Specified by:
        getIssuerDN in class X509Certificate
        Returns:
        the issuer as an implementation specific Principal.
      • getIssuerUniqueID

        public boolean[] getIssuerUniqueID()
        Description copied from class: X509Certificate
        Returns the issuerUniqueID from the certificate.
        Specified by:
        getIssuerUniqueID in class X509Certificate
        Returns:
        the issuerUniqueID or null if there's none in the certificate.
      • getKeyUsage

        public boolean[] getKeyUsage()
        Description copied from class: X509Certificate
        Returns the KeyUsage extension as a boolean array.

        The ASN.1 definition of KeyUsage:

         KeyUsage ::= BIT STRING {
              digitalSignature        (0),
              nonRepudiation          (1),
              keyEncipherment         (2),
              dataEncipherment        (3),
              keyAgreement            (4),
              keyCertSign             (5),
              cRLSign                 (6),
              encipherOnly            (7),
              decipherOnly            (8) }
        
         
        Specified by:
        getKeyUsage in class X509Certificate
        Returns:
        the KeyUsage extension or null if there's none in the certificate.
      • getNotAfter

        public Date getNotAfter()
        Description copied from class: X509Certificate
        Returns the notAfter date of the validity period of the certificate.
        Specified by:
        getNotAfter in class X509Certificate
        Returns:
        the end of the validity period.
      • getNotBefore

        public Date getNotBefore()
        Description copied from class: X509Certificate
        Returns the notBefore date from the validity period of the certificate.
        Specified by:
        getNotBefore in class X509Certificate
        Returns:
        the start of the validity period.
      • getSerialNumber

        public BigInteger getSerialNumber()
        Description copied from class: X509Certificate
        Returns the serialNumber of the certificate.

        The ASN.1 definition of serialNumber:

         CertificateSerialNumber  ::=  INTEGER
         
        Specified by:
        getSerialNumber in class X509Certificate
        Returns:
        the serial number.
      • getSigAlgName

        public String getSigAlgName()
        Description copied from class: X509Certificate
        Returns the name of the algorithm for the certificate signature.
        Specified by:
        getSigAlgName in class X509Certificate
        Returns:
        the signature algorithm name.
      • getSigAlgOID

        public String getSigAlgOID()
        Description copied from class: X509Certificate
        Returns the OID of the signature algorithm from the certificate.
        Specified by:
        getSigAlgOID in class X509Certificate
        Returns:
        the OID of the signature algorithm.
      • getSigAlgParams

        public byte[] getSigAlgParams()
        Description copied from class: X509Certificate
        Returns the parameters of the signature algorithm in DER-encoded format.
        Specified by:
        getSigAlgParams in class X509Certificate
        Returns:
        the parameters of the signature algorithm, or null if none are used.
      • getSignature

        public byte[] getSignature()
        Description copied from class: X509Certificate
        Returns the raw signature bits from the certificate.
        Specified by:
        getSignature in class X509Certificate
        Returns:
        the raw signature bits from the certificate.
      • getSubjectDN

        public Principal getSubjectDN()
        Description copied from class: X509Certificate
        Returns the subject (subject distinguished name) as an implementation specific Principal object.

        The ASN.1 definition of subject:

         subject      Name
        
          Name ::= CHOICE {
              RDNSequence }
        
            RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
        
            RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
        
            AttributeTypeAndValue ::= SEQUENCE {
              type     AttributeType,
              value    AttributeValue }
        
            AttributeType ::= OBJECT IDENTIFIER
        
            AttributeValue ::= ANY DEFINED BY AttributeType
         

        replaced by: X509Certificate.getSubjectX500Principal().

        Specified by:
        getSubjectDN in class X509Certificate
        Returns:
        the subject (subject distinguished name).
      • getSubjectUniqueID

        public boolean[] getSubjectUniqueID()
        Description copied from class: X509Certificate
        Returns the subjectUniqueID from the certificate.
        Specified by:
        getSubjectUniqueID in class X509Certificate
        Returns:
        the subjectUniqueID or null if there's none in the certificate.
      • getVersion

        public int getVersion()
        Description copied from class: X509Certificate
        Returns the certificates version (version number).

        The version defined is ASN.1:

         Version ::=  INTEGER  {  v1(0), v2(1), v3(2)  }
         
        Specified by:
        getVersion in class X509Certificate
        Returns:
        the version number.
      • getCriticalExtensionOIDs

        public Set getCriticalExtensionOIDs()
        Description copied from interface: X509Extension
        Returns the set of OIDs of the extension(s) marked as CRITICAL, that this implementation manages.
        Returns:
        the set of extension OIDs marked as CRITIAL, an empty set if none are marked as CRITICAL, or null if no extensions are present.
      • getExtensionValue

        public byte[] getExtensionValue(String oid)
        Description copied from interface: X509Extension
        Returns the extension value as DER-encoded OCTET string for the specified OID.
        Parameters:
        oid - the object identifier to get the extension value for.
        Returns:
        the extension value as DER-encoded OCTET string, or null if no extension for the specified OID can be found.
      • getNonCriticalExtensionOIDs

        public Set getNonCriticalExtensionOIDs()
        Description copied from interface: X509Extension
        Returns the set of OIDs of the extension(s) marked as NON-CRITICAL, that this implementation manages.
        Returns:
        the set of extension OIDs marked as NON-CRITIAL, an empty set if none are marked as NON-.CRITICAL, or null if no extensions are present.
      • hasUnsupportedCriticalExtension

        public boolean hasUnsupportedCriticalExtension()
        Description copied from interface: X509Extension
        Returns whether this instance has an extension marked as CRITICAL that it cannot support.
        Returns:
        true if an unsupported CRITICAL extension is present, false otherwise.
      • getPublicKey

        public PublicKey getPublicKey()
        Description copied from class: Certificate
        Returns the public key corresponding to this certificate.
        Specified by:
        getPublicKey in class Certificate
        Returns:
        the public key corresponding to this certificate.
      • toString

        public String toString()
        Description copied from class: Certificate
        Returns a string containing a concise, human-readable description of the certificate.
        Specified by:
        toString in class Certificate
        Returns:
        a printable representation for the certificate.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 389 / 158691828. Delta: 0.06152 с