Intel

Developer Zone

CertificateStore

com.intel.crypto

Class CertificateStore

  • java.lang.Object
    • com.intel.crypto.CertificateStore


  • public abstract class CertificateStore
    extends java.lang.Object

    This class represents a Certificate Store. Certificates should be added to a certificate store and used by SslSession as trust anchor to verify certificate chains and establish a secure connection to a remote SSL server.

    • Method Summary

      Methods
      Modifier and Type Method and Description
      abstract void addCertificate(byte[] input, short inputIndex, short inputLength)
      Adds a single X.509 v3 certificate in DER encoded format to the certificate store
      static CertificateStore create()
      A factory method returning a new certificate store instance
      abstract void destroy()
      Destroy this certificate store instance removing certificates that are not referenced by any other certificate store freeing system resources
      static short getMaxCertificateLength()
      Returns the maximum size in bytes allowed for a single certificate
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, toString
    • Method Detail

      • create

        public static CertificateStore create()
        A factory method returning a new certificate store instance
        Throws:
        OutOfResourcesException - if the system's maximum allowed number of certificate stores was exceeded
      • destroy

        public abstract void destroy()
                              throws CryptoException
        Destroy this certificate store instance removing certificates that are not referenced by any other certificate store freeing system resources
        Throws:
        IllegalUseException - if called more than once
        CryptoException - if an internal error occurred
      • getMaxCertificateLength

        public static short getMaxCertificateLength()
        Returns the maximum size in bytes allowed for a single certificate
        Returns:
        The maximum size in bytes allowed for a single certificate
      • addCertificate

        public abstract void addCertificate(byte[] input,
                          short inputIndex,
                          short inputLength)
                                     throws CryptoException
        Adds a single X.509 v3 certificate in DER encoded format to the certificate store
        Parameters:
        input - the certificate buffer
        inputIndex - the start index in the certificate buffer
        inputLength - the length of the certificate
        Throws:
        IllegalUseException - if destroy() was previously called
        IllegalParameterException - if the certificate format is invalid or there are illegal parameters
        OutOfResourcesException - if the certificate store space reached its maximum capacity
        CryptoException - if an internal error occurred