Class PTEID_Certificate


  • public class PTEID_Certificate
    extends PTEID_Object
    Class that represents one certificate.
    • Field Detail

      • CITIZEN_AUTH

        public static final long CITIZEN_AUTH
      • CITIZEN_SIGN

        public static final long CITIZEN_SIGN
      • SUB_CA_SIGN

        public static final long SUB_CA_SIGN
      • SUB_CA_AUTH

        public static final long SUB_CA_AUTH
    • Method Detail

      • getFormattedData

        public void getFormattedData​(PTEID_ByteArray data)
        Return the content of the certificate without ending zero
      • getSerialNumber

        public java.lang.String getSerialNumber()
                                         throws PTEID_Exception
        Return the serial number of the certificate
        Throws:
        PTEID_Exception
      • getOwnerName

        public java.lang.String getOwnerName()
                                      throws PTEID_Exception
        Return the name of the owner of the certificate
        Throws:
        PTEID_Exception
      • getSubjectSerialNumber

        public java.lang.String getSubjectSerialNumber()
        Return the serial number of the subject of the certificate
      • getIssuerName

        public java.lang.String getIssuerName()
                                       throws PTEID_Exception
        Return the name of the issuer of the certificate
        Throws:
        PTEID_Exception
      • getValidityBegin

        public java.lang.String getValidityBegin()
                                          throws PTEID_Exception
        Return the validity begin date of the certificate
        Throws:
        PTEID_Exception
      • getValidityEnd

        public java.lang.String getValidityEnd()
                                        throws PTEID_Exception
        Return the validity end date of the certificate
        Throws:
        PTEID_Exception
      • getStatus

        public PTEID_CertifStatus getStatus​(boolean useCache,
                                            boolean validateChain)
        OCSP/CRL validation status

        Parameters:
        useCache - boolean that specifies if cached certificates can be utilized for the validation (default true)
        validateChain - boolean that specifies if the entire certificate chain is to be validated or not (default true)
      • isTest

        public boolean isTest()
        Return the test status.

        Returns:
        true if test certificate
      • isFromPteidValidChain

        public boolean isFromPteidValidChain()
                                      throws PTEID_Exception
        Return true if the certificate chain end by the one of pteid root.
        Throws:
        PTEID_Exception
      • verifyDateValidity

        public boolean verifyDateValidity()
        Return true if the current time is between the certificate's notBefore and notAfter
      • getChildren

        public PTEID_Certificate getChildren​(long ulIndex)
                                      throws PTEID_Exception
        Return the children certificate (certificate that has been issued by this one).

        Parameters:
        ulIndex - is the children index (the index for the first child is 0)
        Throw PTEID_ExParamRange exception if the index is out of range
        Throws:
        PTEID_Exception