Interface ITSLValidatorResult

  • All Known Implementing Classes:
    TSLValidatorResult

    public interface ITSLValidatorResult

    Interface that represents a validation result using TSL. .

    Project:

    Library for the integration with the services of @Firma, eVisor and TS@.

    Version:
    1.2, 19/09/2022.
    • Field Detail

      • RESULT_NOT_DETECTED

        static final int RESULT_NOT_DETECTED
        Constant attribute that represents a validation result: The certificate has not been detected with the TSL.
        See Also:
        Constant Field Values
      • RESULT_DETECTED_STATE_UNKNOWN

        static final int RESULT_DETECTED_STATE_UNKNOWN
        Constant attribute that represents a validation result: The certificate has been detected by the TSL, but its state is unknown.
        See Also:
        Constant Field Values
      • RESULT_DETECTED_STATE_VALID

        static final int RESULT_DETECTED_STATE_VALID
        Constant attribute that represents a validation result: The certificate has been detected by the TSL and its state is valid.
        See Also:
        Constant Field Values
      • RESULT_DETECTED_STATE_REVOKED

        static final int RESULT_DETECTED_STATE_REVOKED
        Constant attribute that represents a validation result: The certificate has been detected by the TSL and its state is revoked.
        See Also:
        Constant Field Values
      • RESULT_DETECTED_STATE_CERTCHAIN_NOTVALID

        static final int RESULT_DETECTED_STATE_CERTCHAIN_NOTVALID
        Constant attribute that represents a validation result: The certificate has been detected by the TSL and its certificate chain is not valid (expired).
        See Also:
        Constant Field Values
      • RESULT_DETECTED_STATE_REVOKED_SERVICESTATUS

        static final int RESULT_DETECTED_STATE_REVOKED_SERVICESTATUS
        Constant attribute that represents a validation result: The certificate has been detected by the TSL and the service status is revoked.
        See Also:
        Constant Field Values
      • RESULT_DETECTED_STATE_CERTCHAIN_NOTVALID_SERVICESTATUS

        static final int RESULT_DETECTED_STATE_CERTCHAIN_NOTVALID_SERVICESTATUS
        Constant attribute that represents a validation result: The certificate has been detected by the TSL and the service status is not valid.
        See Also:
        Constant Field Values
      • MAPPING_TYPE_UNKNOWN

        static final int MAPPING_TYPE_UNKNOWN
        Constant attribute that represents the value for a mapping certificate type unknown.
        See Also:
        Constant Field Values
      • MAPPING_TYPE_NONQUALIFIED

        static final int MAPPING_TYPE_NONQUALIFIED
        Constant attribute that represents the value for a mapping certificate type non qualified.
        See Also:
        Constant Field Values
      • MAPPING_TYPE_QUALIFIED

        static final int MAPPING_TYPE_QUALIFIED
        Constant attribute that represents the value for a mapping certificate type qualified.
        See Also:
        Constant Field Values
      • MAPPING_CLASSIFICATION_OTHER_UNKNOWN

        static final int MAPPING_CLASSIFICATION_OTHER_UNKNOWN
        Constant attribute that represents the value for a mapping certificate classification other/unknown.
        See Also:
        Constant Field Values
      • MAPPING_CLASSIFICATION_NATURAL_PERSON

        static final int MAPPING_CLASSIFICATION_NATURAL_PERSON
        Constant attribute that represents the value for a mapping certificate classification natural person.
        See Also:
        Constant Field Values
      • MAPPING_CLASSIFICATION_LEGALPERSON

        static final int MAPPING_CLASSIFICATION_LEGALPERSON
        Constant attribute that represents the value for a mapping certificate classification legal person.
        See Also:
        Constant Field Values
      • MAPPING_CLASSIFICATION_ESEAL

        static final int MAPPING_CLASSIFICATION_ESEAL
        Constant attribute that represents the value for a mapping certificate classification ESEAL.
        See Also:
        Constant Field Values
      • MAPPING_CLASSIFICATION_ESIG

        static final int MAPPING_CLASSIFICATION_ESIG
        Constant attribute that represents the value for a mapping certificate classification ESIG.
        See Also:
        Constant Field Values
      • MAPPING_CLASSIFICATION_WSA

        static final int MAPPING_CLASSIFICATION_WSA
        Constant attribute that represents the value for a mapping certificate classification WSA.
        See Also:
        Constant Field Values
      • MAPPING_CLASSIFICATION_TSA

        static final int MAPPING_CLASSIFICATION_TSA
        Constant attribute that represents the value for a mapping certificate classification TSA.
        See Also:
        Constant Field Values
      • MAPPING_QSCD_UNKNOWN

        static final int MAPPING_QSCD_UNKNOWN
        Constant attribute that represents the value for a mapping certificate QSCD unknown.
        See Also:
        Constant Field Values
      • MAPPING_QSCD_NO

        static final int MAPPING_QSCD_NO
        Constant attribute that represents the value for a mapping certificate no QSCD.
        See Also:
        Constant Field Values
      • MAPPING_QSCD_YES

        static final int MAPPING_QSCD_YES
        Constant attribute that represents the value for a mapping certificate QSCD.
        See Also:
        Constant Field Values
      • MAPPING_QSCD_ASINCERT

        static final int MAPPING_QSCD_ASINCERT
        Constant attribute that represents the value for a mapping certificate QSCD specified in the attributes.
        See Also:
        Constant Field Values
      • MAPPING_QSCD_YES_MANAGEDONBEHALF

        static final int MAPPING_QSCD_YES_MANAGEDONBEHALF
        Constant attribute that represents the value for a mapping certificate QSCD managed by TSP.
        See Also:
        Constant Field Values
    • Method Detail

      • getTslCountryRegionCode

        java.lang.String getTslCountryRegionCode()
        Gets the TSL Country/Region Code.
        Returns:
        the TSL Country/Region Code.
      • getTslSequenceNumber

        int getTslSequenceNumber()
        Gets the TSL Sequence Number.
        Returns:
        the value of the TSL Sequence Number.
      • getTslEtsiSpecificationAndVersion

        java.lang.String getTslEtsiSpecificationAndVersion()
        Gets the TSL ETSI TS Specification and Version.
        Returns:
        the TSL ETSI TS Specification and Version.
      • getTslIssueDate

        java.util.Date getTslIssueDate()
        Gets the TSL Issue Date.
        Returns:
        the TSL Issue Date.
      • getTslNextUpdate

        java.util.Date getTslNextUpdate()
        Gets the TSL Next Update Date.
        Returns:
        the TSL Next Update Date.
      • getTslCertificateExtensionAnalyzer

        TSLCertificateExtensionAnalyzer getTslCertificateExtensionAnalyzer()
        Gets the extension analyzer for the certificate to validate.
        Returns:
        the extension analyzer for the certificate to validate.
      • isResultFromServiceStatus

        java.lang.Boolean isResultFromServiceStatus()
        Checks if the validation result value is obtained from a TSL-Service status.
        Returns:
        null if the certificate has not been detected or its status is unknown. true if the status has been determined by a TSL-Service status, otherwise false.
      • isResultFromDPorAIA

        java.lang.Boolean isResultFromDPorAIA()
        Checks if the validation result value is obtained from a DP or AIA.
        Returns:
        null if the certificate has not been detected or its status is unknown. true if the status has been determined by a DP or AIA, otherwise false.
      • hasBeenDetectedTheCertificate

        boolean hasBeenDetectedTheCertificate()
        Checks if the result is different of RESULT_NOT_DETECTED.
        Returns:
        true if the result is different of RESULT_NOT_DETECTED, otherwise false.
      • isEuropean

        boolean isEuropean()
        Check if the TSL used is from an European member.
        Returns:
        true if the TSL is from an European member, otherwise false.
      • getTSPName

        java.lang.String getTSPName()
        Gets the name of the TSP which has detected the certificate.
        Returns:
        the name of the TSP which has detected the certificate, or null if the certificate has not been detected.
      • getTSP

        TrustServiceProvider getTSP()
        Gets the TSP which has detected the certificate.
        Returns:
        TSP which has detected the certificate, or null if the certificate has not been detected.
      • getTSPServiceNameForDetect

        java.lang.String getTSPServiceNameForDetect()
        Gets the name of the TSP Service which has detected the certificate.
        Returns:
        the name of the TSP Service which has detected the certificate, or null if the certificate has not been detected.
      • getTSPServiceForDetect

        TSPService getTSPServiceForDetect()
        Gets the TSP Service which has detected the certificate.
        Returns:
        TSP Service which has detected the certificate, or null if the certificate has not been detected.
      • getTSPServiceHistoryInformationInstanceNameForDetect

        java.lang.String getTSPServiceHistoryInformationInstanceNameForDetect()
        Gets the name of the TSP Service History-Information which has detected the certificate.
        Returns:
        the name of the TSP Service History-Information which has detected the certificate, or null if the certificate has not been detected.
      • getTSPServiceHistoryInformationInstanceForDetect

        ServiceHistoryInstance getTSPServiceHistoryInformationInstanceForDetect()
        Gets the TSP Service History-Information which has detected the certificate.
        Returns:
        TSP Service History-Information which has detected the certificate, or null if the certificate has not been detected.
      • getTSPServiceNameForValidate

        java.lang.String getTSPServiceNameForValidate()
        Gets the name of the TSP Service which has validate the certificate.
        Returns:
        the name of the TSP Service which has validate the certificate, or null if the certificate has not been validated.
      • getTSPServiceForValidate

        TSPService getTSPServiceForValidate()
        Gets the TSP Service which has validate the certificate.
        Returns:
        the TSP Service which has validate the certificate, or null if the certificate has not been validated.
      • getTSPServiceHistoryInformationInstanceNameForValidate

        java.lang.String getTSPServiceHistoryInformationInstanceNameForValidate()
        Gets the name of the TSP Service History-Information which has validate the certificate.
        Returns:
        the name of the TSP Service History-Information which has validate the certificate, or null if the certificate has not been validated.
      • getTSPServiceHistoryInformationInstanceForValidate

        ServiceHistoryInstance getTSPServiceHistoryInformationInstanceForValidate()
        Gets the TSP Service History-Information which has validate the certificate.
        Returns:
        the TSP Service History-Information which has validate the certificate, or null if the certificate has not been validated.
      • getMappings

        java.util.Map<java.lang.String,​java.lang.String> getMappings()
        Gets all the mappings information calculated for the validated certificate.
        Returns:
        Map with the pairs <MappingName, MappingValue> calculated for the validated certificate.
      • setMappings

        void setMappings​(java.util.Map<java.lang.String,​java.lang.String> mappings)
        Sets the mappings calculated for the validated certificate.
        Parameters:
        mappings - Map with the pairs <MappingName, MappingValue> calculated for the validated certificate.
      • getIssuerCert

        java.security.cert.X509Certificate getIssuerCert()
        Gets the X509 Certificate of the issuer of the certificate to validate (if this has been found).
        Returns:
        the X509 Certificate of the issuer of the certificate to validate (if this has been found), otherwise null.
      • getRevocationValueBasicOCSPResp

        org.bouncycastle.cert.ocsp.BasicOCSPResp getRevocationValueBasicOCSPResp()
        Gets the Basic OCSP Response selected how revocation value.
        Returns:
        Basic OCSP Response selected how revocation value, null if there is not.
      • setRevocationValueBasicOCSPResp

        void setRevocationValueBasicOCSPResp​(org.bouncycastle.cert.ocsp.BasicOCSPResp bor)
        Sets the selected revocation value of type Basic OCSP Response.
        Parameters:
        bor - Basic OCSP Response to assign how the selected revocation value.
      • getRevocationValueCRL

        java.security.cert.X509CRL getRevocationValueCRL()
        Gets the CRL selected how revocation value.
        Returns:
        CRL selected how revocation value, null if there is not.
      • setRevocationValueCRL

        void setRevocationValueCRL​(java.security.cert.X509CRL crl)
        Sets the selected revocation value of type CRL.
        Parameters:
        crl - CRL to assign how the selected revocation value.
      • getRevocationValueURL

        java.lang.String getRevocationValueURL()
        Gets the URL from which the revocation value has been obtained.
        Returns:
        the URL from which the revocation value has been obtained.
      • setRevocationValueURL

        void setRevocationValueURL​(java.lang.String revValueUrl)
        Sets the URL from which the revocation value has been obtained.
        Parameters:
        revValueUrl - the URL from which the revocation value has been obtained.
      • getRevocationDate

        java.util.Date getRevocationDate()
        Gets the revocation date of the certificate validate (if it is revoked).
        Returns:
        the revocation date of the certificate validate (if it is revoked), otherwise null.
      • getRevocationReason

        int getRevocationReason()
        Gets the Revocation Reason for the certificate that has been validated.
        Returns:
        Revocation Reason integer representation for the certificate validated, or -1 if was not possible to validate or the certificate is not revoked.