com.intel.crypto
Class SslSession.CertificateInfo
- java.lang.Object
-
- com.intel.crypto.SslSession.CertificateInfo
-
- Enclosing class:
- SslSession
public abstract static class SslSession.CertificateInfo extends java.lang.Object
This class represents single certificate in the certificate chain received from the SSL server during the Handshake phase
-
-
Field Summary
Fields Modifier and Type Field and Description static short
INFO_TYPE_APPLICATION_POLICIES
The certificate Application Policies entrystatic short
INFO_TYPE_CRL_DIST_POINT
The CRL distribution point extension in the certificatestatic short
INFO_TYPE_EXTENDED_KEY_USAGE
The certificate Extended Key Usage entrystatic short
INFO_TYPE_ISSUER
The certificate Issuer entrystatic short
INFO_TYPE_ISSUER_RAW
The certificate issuer raw entrystatic short
INFO_TYPE_KEY_USAGE
The certificate key usage entrystatic short
INFO_TYPE_PUBLIC_KEY_EXPONENT
The public key exponent partstatic short
INFO_TYPE_PUBLIC_KEY_MODULUS
The public key modulus partstatic short
INFO_TYPE_RAW_DATA
The certificate raw data in DER formatstatic short
INFO_TYPE_SERIAL_NUMBER
The certificate serial numberstatic short
INFO_TYPE_SUBJECT
The certificate Subject entrystatic short
INFO_TYPE_SUBJECT_ALTERNATIVE_NAME
The certificate Subject Alternative Name entrystatic short
INFO_TYPE_SUBJECT_RAW
The certificate subject raw entry
-
Method Summary
Methods Modifier and Type Method and Description abstract byte
getIndex()
Returns the location of the certificate in the certificate chain retrieved bygetChainInfo()
orgetChainInfo()
.abstract List
getInfo(short infoType)
Returns a List of buffers with the requested information from the certificate.
-
-
-
Field Detail
-
INFO_TYPE_CRL_DIST_POINT
public static final short INFO_TYPE_CRL_DIST_POINT
The CRL distribution point extension in the certificate- See Also:
- Constant Field Values
-
INFO_TYPE_SERIAL_NUMBER
public static final short INFO_TYPE_SERIAL_NUMBER
The certificate serial number- See Also:
- Constant Field Values
-
INFO_TYPE_RAW_DATA
public static final short INFO_TYPE_RAW_DATA
The certificate raw data in DER format- See Also:
- Constant Field Values
-
INFO_TYPE_PUBLIC_KEY_MODULUS
public static final short INFO_TYPE_PUBLIC_KEY_MODULUS
The public key modulus part- See Also:
- Constant Field Values
-
INFO_TYPE_PUBLIC_KEY_EXPONENT
public static final short INFO_TYPE_PUBLIC_KEY_EXPONENT
The public key exponent part- See Also:
- Constant Field Values
-
INFO_TYPE_ISSUER
public static final short INFO_TYPE_ISSUER
The certificate Issuer entry- See Also:
- Constant Field Values
-
INFO_TYPE_SUBJECT
public static final short INFO_TYPE_SUBJECT
The certificate Subject entry- See Also:
- Constant Field Values
-
INFO_TYPE_EXTENDED_KEY_USAGE
public static final short INFO_TYPE_EXTENDED_KEY_USAGE
The certificate Extended Key Usage entry- See Also:
- Constant Field Values
-
INFO_TYPE_SUBJECT_ALTERNATIVE_NAME
public static final short INFO_TYPE_SUBJECT_ALTERNATIVE_NAME
The certificate Subject Alternative Name entry- See Also:
- Constant Field Values
-
INFO_TYPE_APPLICATION_POLICIES
public static final short INFO_TYPE_APPLICATION_POLICIES
The certificate Application Policies entry- See Also:
- Constant Field Values
-
INFO_TYPE_KEY_USAGE
public static final short INFO_TYPE_KEY_USAGE
The certificate key usage entry- See Also:
- Constant Field Values
-
INFO_TYPE_ISSUER_RAW
public static final short INFO_TYPE_ISSUER_RAW
The certificate issuer raw entry- See Also:
- Constant Field Values
-
INFO_TYPE_SUBJECT_RAW
public static final short INFO_TYPE_SUBJECT_RAW
The certificate subject raw entry- See Also:
- Constant Field Values
-
-
Method Detail
-
getIndex
public abstract byte getIndex() throws CryptoException
Returns the location of the certificate in the certificate chain retrieved bygetChainInfo()
orgetChainInfo()
.- Returns:
- The zero-based location of the certificate in the certificate chain, index is from leaf to root: 0 index is the leaf
- Throws:
IllegalUseException
- if one of the following occurs- the associated SslSession instance called
destroy()
- the associated SslSession instance called
generateAlertMessage()
- the associated CertificateChain instance called
destroy()
- the associated CertificateChain instance wasn't verified successfully via calling
verify()
- the associated SslSession instance called
CryptoException
-
getInfo
public abstract List getInfo(short infoType) throws CryptoException
Returns a List of buffers with the requested information from the certificate. The supported info types are:- INFO_TYPE_SERIAL_NUMBER: single value, up to 20 bytes.
- INFO_TYPE_RAW_DATA: single value, up to the size of the certificate.
- INFO_TYPE_PUBLIC_KEY_MODULUS: single value, up to 512 bytes.
- INFO_TYPE_KEY_USAGE: single value, up to 9 bytes.
- INFO_TYPE_PUBLIC_KEY_EXPONENT: single value, up to 1024 bytes.
- INFO_TYPE_ISSUER_RAW: single value, up to the size of the certificate.
- INFO_TYPE_SUBJECT_RAW: single value, up to the size of the certificate.
The following are up to 30 values, each size up to 1024 bytes:- INFO_TYPE_CRL_DIST_POINT
- INFO_TYPE_ISSUER
- INFO_TYPE_SUBJECT
- INFO_TYPE_EXTENDED_KEY_USAGE
- INFO_TYPE_SUBJECT_ALTERNATIVE_NAME
- INFO_TYPE_APPLICATION_POLICIES
- Parameters:
infoType
- the type of requested information in the certificate object (one of INFO_TYPE_*)- Returns:
- A
List
of buffers (byte[] elements) with the requested information extracted from the certificate or an empty list in case no information is available. - Throws:
IllegalUseException
- if one of the following occurs- the associated SslSession instance called
destroy()
- the associated SslSession instance called
generateAlertMessage()
- the associated CertificateChain instance called
destroy()
- the associated CertificateChain instance wasn't verified successfully via calling
verify()
- the associated SslSession instance called
IllegalParameterException
- if the infoType is invalidCryptoException
- if an internal error occurred
-
-