/** * This method indicates if the certificate is QCP. * * @param dssCertificateId DSS certificate identifier to be checked * @return true if QCP */ public boolean isCertificateQCP(final int dssCertificateId) { final boolean qcp = getBoolValue("/DiagnosticData/UsedCertificates/Certificate[@Id='%s']/QCStatement/QCP/text()", dssCertificateId); return qcp; }
/** * This method indicates if the certificate is QCC. * * @param dssCertificateId DSS certificate identifier to be checked * @return true if QCC */ public boolean isCertificateQCC(final int dssCertificateId) { final boolean qcc = getBoolValue("/DiagnosticData/UsedCertificates/Certificate[@Id='%s']/QCStatement/QCC/text()", dssCertificateId); return qcc; }
/** * Returns the result of validation of the timestamp message imprint. * * @param timestampId timestamp id * @return true or false */ public boolean isTimestampMessageImprintIntact(final String timestampId) { final boolean messageImprintIntact = getBoolValue("/DiagnosticData/Signature/Timestamps/Timestamp[@Id='%s']/MessageImprintDataIntact/text()", timestampId); return messageImprintIntact; }
/** * This method indicates if the certificate is QCPPlus. * * @param dssCertificateId DSS certificate identifier to be checked * @return true if QCPPlus */ public boolean isCertificateQCPPlus(final int dssCertificateId) { final boolean qcpPlus = getBoolValue("/DiagnosticData/UsedCertificates/Certificate[@Id='%s']/QCStatement/QCPPlus/text()", dssCertificateId); return qcpPlus; }
/** * Returns the result of validation of the timestamp signature. * * @param timestampId timestamp id * @return */ public boolean isTimestampSignatureValid(final String timestampId) { final boolean signatureValid = getBoolValue("/DiagnosticData/Signature/Timestamps/Timestamp[@Id='%s']/BasicSignature/SignatureValid/text()", timestampId); return signatureValid; }
/** * This method indicates if the certificate is QCSSCD. * * @param dssCertificateId DSS certificate identifier to be checked * @return true if QCSSCD */ public boolean isCertificateQCSSCD(final int dssCertificateId) { final boolean qcsscd = getBoolValue("/DiagnosticData/UsedCertificates/Certificate[@Id='%s']/QCStatement/QCSSCD/text()", dssCertificateId); return qcsscd; }
/** * This method returns the revocation status for the given certificate. * * @param dssCertificateId DSS certificate identifier to be checked * @return revocation status */ public boolean getCertificateRevocationStatus(final int dssCertificateId) { final boolean certificateRevocationStatus = getBoolValue("/DiagnosticData/UsedCertificates/Certificate[@Id='%s']/Revocation/Status/text()", dssCertificateId); return certificateRevocationStatus; }
/** * This method indicates if the digest value and the issuer and serial match for the signing certificate . * * @param signatureId The identifier of the signature. * @return true if the digest value and the issuer and serial match. */ public boolean isSigningCertificateIdentified(final String signatureId) { final boolean digestValueMatch = getBoolValue("/DiagnosticData/Signature[@Id='%s']/SigningCertificate/DigestValueMatch/text()", signatureId); final boolean issuerSerialMatch = getBoolValue("/DiagnosticData/Signature[@Id='%s']/SigningCertificate/IssuerSerialMatch/text()", signatureId); return digestValueMatch && issuerSerialMatch; }
/** * Indicates if the -B level is technically valid. It means that the signature value is valid. * * @param signatureId The identifier of the signature. * @return true if the signature value is valid */ public boolean isBLevelTechnicallyValid(final String signatureId) { final boolean signatureValueValid = getBoolValue("/DiagnosticData/Signature[@Id='%s']/BasicSignature/SignatureValid/text()", signatureId); return signatureValueValid; }
/** * This method returns the validity of the certificate at the validation time. * * @param dssCertificateId DSS certificate identifier to be checked * @return serial number */ public boolean isCertificateValidAtValidationTime(final int dssCertificateId) { final boolean validityAtValidationTime = getBoolValue("/DiagnosticData/UsedCertificates/Certificate[@Id='%s']/ValidityAtValidationTime/text()", dssCertificateId); return validityAtValidationTime; }
/** * This method indicates if the associated trusted list is well signed. * * @param dssCertificateId DSS certificate identifier to be checked * @return TSPServiceName */ public boolean isCertificateRelatedTSLWellSigned(final int dssCertificateId) { final boolean wellSigned = getBoolValue("/DiagnosticData/UsedCertificates/Certificate[@Id='%s']/TrustedServiceProvider/WellSigned/text()", dssCertificateId); return wellSigned; }