Interface ITSLValidatorResult
-
- All Known Implementing Classes:
TSLValidatorResult
public interface ITSLValidatorResultInterface 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 Summary
Fields Modifier and Type Field Description static intMAPPING_CLASSIFICATION_ESEALConstant attribute that represents the value for a mapping certificate classification ESEAL.static intMAPPING_CLASSIFICATION_ESIGConstant attribute that represents the value for a mapping certificate classification ESIG.static intMAPPING_CLASSIFICATION_LEGALPERSONConstant attribute that represents the value for a mapping certificate classification legal person.static intMAPPING_CLASSIFICATION_NATURAL_PERSONConstant attribute that represents the value for a mapping certificate classification natural person.static intMAPPING_CLASSIFICATION_OTHER_UNKNOWNConstant attribute that represents the value for a mapping certificate classification other/unknown.static intMAPPING_CLASSIFICATION_TSAConstant attribute that represents the value for a mapping certificate classification TSA.static intMAPPING_CLASSIFICATION_WSAConstant attribute that represents the value for a mapping certificate classification WSA.static intMAPPING_QSCD_ASINCERTConstant attribute that represents the value for a mapping certificate QSCD specified in the attributes.static intMAPPING_QSCD_NOConstant attribute that represents the value for a mapping certificate no QSCD.static intMAPPING_QSCD_UNKNOWNConstant attribute that represents the value for a mapping certificate QSCD unknown.static intMAPPING_QSCD_YESConstant attribute that represents the value for a mapping certificate QSCD.static intMAPPING_QSCD_YES_MANAGEDONBEHALFConstant attribute that represents the value for a mapping certificate QSCD managed by TSP.static intMAPPING_TYPE_NONQUALIFIEDConstant attribute that represents the value for a mapping certificate type non qualified.static intMAPPING_TYPE_QUALIFIEDConstant attribute that represents the value for a mapping certificate type qualified.static intMAPPING_TYPE_UNKNOWNConstant attribute that represents the value for a mapping certificate type unknown.static intRESULT_DETECTED_STATE_CERTCHAIN_NOTVALIDConstant attribute that represents a validation result: The certificate has been detected by the TSL and its certificate chain is not valid (expired).static intRESULT_DETECTED_STATE_CERTCHAIN_NOTVALID_SERVICESTATUSConstant attribute that represents a validation result: The certificate has been detected by the TSL and the service status is not valid.static intRESULT_DETECTED_STATE_REVOKEDConstant attribute that represents a validation result: The certificate has been detected by the TSL and its state is revoked.static intRESULT_DETECTED_STATE_REVOKED_SERVICESTATUSConstant attribute that represents a validation result: The certificate has been detected by the TSL and the service status is revoked.static intRESULT_DETECTED_STATE_UNKNOWNConstant attribute that represents a validation result: The certificate has been detected by the TSL, but its state is unknown.static intRESULT_DETECTED_STATE_VALIDConstant attribute that represents a validation result: The certificate has been detected by the TSL and its state is valid.static intRESULT_NOT_DETECTEDConstant attribute that represents a validation result: The certificate has not been detected with the TSL.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.cert.X509CertificategetIssuerCert()Gets the X509 Certificate of the issuer of the certificate to validate (if this has been found).intgetMappingClassification()Gets the mapping classification of the validated certificate.intgetMappingQSCD()Gets the mapping QSCD of the validated certificate.java.util.Map<java.lang.String,java.lang.String>getMappings()Gets all the mappings information calculated for the validated certificate.intgetMappingType()Gets the mapping type of the validated certificate.intgetResult()Gets the validation result.java.util.DategetRevocationDate()Gets the revocation date of the certificate validate (if it is revoked).intgetRevocationReason()Gets the Revocation Reason for the certificate that has been validated.org.bouncycastle.cert.ocsp.BasicOCSPRespgetRevocationValueBasicOCSPResp()Gets the Basic OCSP Response selected how revocation value.java.security.cert.X509CRLgetRevocationValueCRL()Gets the CRL selected how revocation value.java.lang.StringgetRevocationValueURL()Gets the URL from which the revocation value has been obtained.TSLCertificateExtensionAnalyzergetTslCertificateExtensionAnalyzer()Gets the extension analyzer for the certificate to validate.java.lang.StringgetTslCountryRegionCode()Gets the TSL Country/Region Code.java.lang.StringgetTslEtsiSpecificationAndVersion()Gets the TSL ETSI TS Specification and Version.java.util.DategetTslIssueDate()Gets the TSL Issue Date.java.util.DategetTslNextUpdate()Gets the TSL Next Update Date.intgetTslSequenceNumber()Gets the TSL Sequence Number.TrustServiceProvidergetTSP()Gets the TSP which has detected the certificate.java.lang.StringgetTSPName()Gets the name of the TSP which has detected the certificate.TSPServicegetTSPServiceForDetect()Gets the TSP Service which has detected the certificate.TSPServicegetTSPServiceForValidate()Gets the TSP Service which has validate the certificate.ServiceHistoryInstancegetTSPServiceHistoryInformationInstanceForDetect()Gets the TSP Service History-Information which has detected the certificate.ServiceHistoryInstancegetTSPServiceHistoryInformationInstanceForValidate()Gets the TSP Service History-Information which has validate the certificate.java.lang.StringgetTSPServiceHistoryInformationInstanceNameForDetect()Gets the name of the TSP Service History-Information which has detected the certificate.java.lang.StringgetTSPServiceHistoryInformationInstanceNameForValidate()Gets the name of the TSP Service History-Information which has validate the certificate.java.lang.StringgetTSPServiceNameForDetect()Gets the name of the TSP Service which has detected the certificate.java.lang.StringgetTSPServiceNameForValidate()Gets the name of the TSP Service which has validate the certificate.booleanhasBeenDetectedTheCertificate()Checks if the result is different ofRESULT_NOT_DETECTED.booleanhasBeenDetectedTheCertificateWithUnknownState()Checks if the result is equal toRESULT_DETECTED_STATE_UNKNOWN.booleanisEuropean()Check if the TSL used is from an European member.java.lang.BooleanisResultFromDPorAIA()Checks if the validation result value is obtained from a DP or AIA.java.lang.BooleanisResultFromServiceStatus()Checks if the validation result value is obtained from a TSL-Service status.voidsetMappings(java.util.Map<java.lang.String,java.lang.String> mappings)Sets the mappings calculated for the validated certificate.voidsetRevocationValueBasicOCSPResp(org.bouncycastle.cert.ocsp.BasicOCSPResp bor)Sets the selected revocation value of type Basic OCSP Response.voidsetRevocationValueCRL(java.security.cert.X509CRL crl)Sets the selected revocation value of type CRL.voidsetRevocationValueURL(java.lang.String revValueUrl)Sets the URL from which the revocation value has been obtained.
-
-
-
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.
-
getResult
int getResult()
Gets the validation result. It only can be one of the following:
- Returns:
- int that represents the validation result.
-
isResultFromServiceStatus
java.lang.Boolean isResultFromServiceStatus()
Checks if the validation result value is obtained from a TSL-Service status.- Returns:
nullif the certificate has not been detected or its status is unknown.trueif the status has been determined by a TSL-Service status, otherwisefalse.
-
isResultFromDPorAIA
java.lang.Boolean isResultFromDPorAIA()
Checks if the validation result value is obtained from a DP or AIA.- Returns:
nullif the certificate has not been detected or its status is unknown.trueif the status has been determined by a DP or AIA, otherwisefalse.
-
hasBeenDetectedTheCertificate
boolean hasBeenDetectedTheCertificate()
Checks if the result is different ofRESULT_NOT_DETECTED.- Returns:
trueif the result is different ofRESULT_NOT_DETECTED, otherwisefalse.
-
hasBeenDetectedTheCertificateWithUnknownState
boolean hasBeenDetectedTheCertificateWithUnknownState()
Checks if the result is equal toRESULT_DETECTED_STATE_UNKNOWN.- Returns:
trueif the result is equal toRESULT_DETECTED_STATE_UNKNOWN, otherwisefalse.
-
isEuropean
boolean isEuropean()
Check if the TSL used is from an European member.- Returns:
trueif the TSL is from an European member, otherwisefalse.
-
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
nullif 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
nullif 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
nullif 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
nullif 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
nullif 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
nullif 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
nullif 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
nullif 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
nullif 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
nullif the certificate has not been validated.
-
getMappingType
int getMappingType()
Gets the mapping type of the validated certificate. It only can be one of the following:
- Returns:
- the mapping type of the validated certificate.
-
getMappingClassification
int getMappingClassification()
Gets the mapping classification of the validated certificate. It only can be one of the following:
- Returns:
- the mapping classification of the validated certificate.
-
getMappingQSCD
int getMappingQSCD()
Gets the mapping QSCD of the validated certificate. It only can be one of the following:
- Returns:
- the mapping SSCD of the validated certificate.
-
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,
nullif 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,
nullif 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.
-
-