Class DefalutPDFSigValReportGenerator
java.lang.Object
se.swedenconnect.sigval.report.impl.AbstractSigValReportGenerator<ExtendedPdfSigValResult>
se.swedenconnect.sigval.pdf.verify.impl.DefalutPDFSigValReportGenerator
- All Implemented Interfaces:
SigValReportGenerator<ExtendedPdfSigValResult>
public class DefalutPDFSigValReportGenerator
extends AbstractSigValReportGenerator<ExtendedPdfSigValResult>
PDF Implementation of the Signature validation report generator
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyValidationPolicy
(SignatureValidationReportType signatureValidationReportType, ExtendedPdfSigValResult sigValResult) Apply the final validation checks against any policy provided by the profileprotected SADataObjectFormatType
Get the signed data object format for this signature validation resultprotected DigestAlgAndValueType
getSignatureDtbsDigestAndValue
(ExtendedPdfSigValResult sigValResult, String hashAlgoId) Get the DTBSR (Data to be signed representation) hash value and hash algorithm according the document profileprotected String
getSignatureQuality
(ExtendedPdfSigValResult sigValResult) Get signature quality from the signature validation resultprotected SignatureValidationProcessType
getSignatureValidationProcess
(ExtendedPdfSigValResult sigValResult, String pol) Get the signature validation process identifier for this signature validation processprotected byte[]
getSignatureValue
(ExtendedPdfSigValResult sigValResult) Get the signature valueMethods inherited from class se.swedenconnect.sigval.report.impl.AbstractSigValReportGenerator
addSignatureIdentifier, addSignedDocumentRepresentation, addSignerAttributes, addSignerInformation, defaultGetSignatureValidationProcess, defaultSignatureQuality, extendElement, getBestSignatureTime, getHashAlgo, getSignedValidationReport, getValidationObejctMap, getValidationReport, isValidTime, setResultMessage, setValidationStatus, updateResult
-
Constructor Details
-
DefalutPDFSigValReportGenerator
public DefalutPDFSigValReportGenerator() -
DefalutPDFSigValReportGenerator
-
-
Method Details
-
getSignatureQuality
Get signature quality from the signature validation result- Specified by:
getSignatureQuality
in classAbstractSigValReportGenerator<ExtendedPdfSigValResult>
- Parameters:
sigValResult
- The result of signature validation- Returns:
- signature quality
-
getSignatureValidationProcess
protected SignatureValidationProcessType getSignatureValidationProcess(ExtendedPdfSigValResult sigValResult, String pol) Get the signature validation process identifier for this signature validation process- Specified by:
getSignatureValidationProcess
in classAbstractSigValReportGenerator<ExtendedPdfSigValResult>
- Parameters:
sigValResult
- The result data from signature validationpol
- the policy used to do the original signature validation- Returns:
- the signature validation process identifier to be included in the signature validation report
-
getDataObjectFormat
Get the signed data object format for this signature validation result- Specified by:
getDataObjectFormat
in classAbstractSigValReportGenerator<ExtendedPdfSigValResult>
- Returns:
- Signed data object format
-
getSignatureDtbsDigestAndValue
protected DigestAlgAndValueType getSignatureDtbsDigestAndValue(ExtendedPdfSigValResult sigValResult, String hashAlgoId) throws IOException Get the DTBSR (Data to be signed representation) hash value and hash algorithm according the document profile- Specified by:
getSignatureDtbsDigestAndValue
in classAbstractSigValReportGenerator<ExtendedPdfSigValResult>
- Parameters:
sigValResult
- signature validation resulthashAlgoId
- hash algorithm id- Returns:
- digest value and algorithm for the DTBSR
- Throws:
IOException
-
getSignatureValue
Get the signature value- Specified by:
getSignatureValue
in classAbstractSigValReportGenerator<ExtendedPdfSigValResult>
- Parameters:
sigValResult
-- Returns:
- the bytes of the signature value
- Throws:
IOException
-
applyValidationPolicy
protected void applyValidationPolicy(SignatureValidationReportType signatureValidationReportType, ExtendedPdfSigValResult sigValResult) Apply the final validation checks against any policy provided by the profile- Specified by:
applyValidationPolicy
in classAbstractSigValReportGenerator<ExtendedPdfSigValResult>
- Parameters:
signatureValidationReportType
- signature validation report data before policy checksigValResult
- signature validation result
-