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 storestatic CertificateStore
create()
A factory method returning a new certificate store instanceabstract void
destroy()
Destroy this certificate store instance removing certificates that are not referenced by any other certificate store freeing system resourcesstatic short
getMaxCertificateLength()
Returns the maximum size in bytes allowed for a single certificate
-
-
-
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 onceCryptoException
- 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 bufferinputIndex
- the start index in the certificate bufferinputLength
- the length of the certificate- Throws:
IllegalUseException
- ifdestroy()
was previously calledIllegalParameterException
- if the certificate format is invalid or there are illegal parametersOutOfResourcesException
- if the certificate store space reached its maximum capacityCryptoException
- if an internal error occurred
-
-