Class JAdESLevelBaselineLT
java.lang.Object
eu.europa.esig.dss.jades.signature.JAdESExtensionBuilder
eu.europa.esig.dss.jades.signature.JAdESLevelBaselineT
eu.europa.esig.dss.jades.signature.JAdESLevelBaselineLT
- All Implemented Interfaces:
JAdESLevelBaselineExtension,SignatureExtension<JAdESSignatureParameters>
- Direct Known Subclasses:
JAdESLevelBaselineLTA
Creates an LT-level of a JAdES signature
-
Field Summary
Fields inherited from class eu.europa.esig.dss.jades.signature.JAdESLevelBaselineT
certificateVerifier, documentValidator, tspSource -
Constructor Summary
ConstructorsConstructorDescriptionJAdESLevelBaselineLT(CertificateVerifier certificateVerifier) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidextendSignatures(List<AdvancedSignature> signatures, JAdESSignatureParameters params) Extends the signaturesprotected JsonObjectBuilds and returns 'rVals' JsonObjectprotected org.jose4j.json.internal.json_simple.JSONArraygetXVals(Set<CertificateToken> certificateValuesToAdd) Builds and returns 'xVals' JSONArrayprotected voidincorporateAnyValidationData(JAdESEtsiUHeader etsiUHeader, ValidationData validationDataForInclusion, boolean base64UrlEncoded) This method incorporates the 'anyValData' dictionary in the signatureprotected voidincorporateRVals(JAdESEtsiUHeader etsiUHeader, Set<CRLToken> crlsToAdd, Set<OCSPToken> ocspsToAdd, boolean base64UrlEncoded) Incorporates the provided set of certificates intoetsiUHeaderprotected voidincorporateTstValidationData(JAdESEtsiUHeader etsiUHeader, ValidationData validationDataForInclusion, boolean base64UrlEncoded) This method incorporates the 'tstVD' dictionary in the signatureprotected voidincorporateValidationData(JAdESEtsiUHeader etsiUHeader, ValidationData validationDataForInclusion, String headerName, boolean base64UrlEncoded) This method incorporates the validation data container in the signatureprotected voidincorporateXVals(JAdESEtsiUHeader etsiUHeader, Set<CertificateToken> certificateValuesToAdd, boolean base64UrlEncoded) Incorporates the provided set of certificates intoetsiUHeaderprotected voidremoveLastTimestampAndAnyValidationData(JAdESSignature jadesSignature, JAdESEtsiUHeader etsiUHeader) This method removes the 'tstVd' and 'anyValData' header parameters appearing in the end of the 'etsiU' unsigned property array.Methods inherited from class eu.europa.esig.dss.jades.signature.JAdESLevelBaselineT
extendSignatures, getSignatureRequirementsChecker, setOperationKind, setTspSourceMethods inherited from class eu.europa.esig.dss.jades.signature.JAdESExtensionBuilder
assertEtsiUComponentsConsistent, assertJSONSerializationObjectMayBeExtended, assertJWSJsonSerializationObjectValid
-
Constructor Details
-
JAdESLevelBaselineLT
The default constructor- Parameters:
certificateVerifier-CertificateVerifierto use
-
-
Method Details
-
extendSignatures
protected void extendSignatures(List<AdvancedSignature> signatures, JAdESSignatureParameters params) Description copied from class:JAdESLevelBaselineTExtends the signatures- Overrides:
extendSignaturesin classJAdESLevelBaselineT- Parameters:
signatures- a list ofAdvancedSignatures to be extendedparams-JAdESSignatureParametersthe extension parameters
-
removeLastTimestampAndAnyValidationData
protected void removeLastTimestampAndAnyValidationData(JAdESSignature jadesSignature, JAdESEtsiUHeader etsiUHeader) This method removes the 'tstVd' and 'anyValData' header parameters appearing in the end of the 'etsiU' unsigned property array.- Parameters:
jadesSignature-JAdESSignatureetsiUHeader-JAdESEtsiUHeader
-
getXVals
protected org.jose4j.json.internal.json_simple.JSONArray getXVals(Set<CertificateToken> certificateValuesToAdd) Builds and returns 'xVals' JSONArray- Parameters:
certificateValuesToAdd- a set ofCertificateTokens to add- Returns:
JSONArray'xVals' JSONArray
-
incorporateXVals
protected void incorporateXVals(JAdESEtsiUHeader etsiUHeader, Set<CertificateToken> certificateValuesToAdd, boolean base64UrlEncoded) Incorporates the provided set of certificates intoetsiUHeader- Parameters:
etsiUHeader-JAdESEtsiUHeaderto updatecertificateValuesToAdd- a set ofCertificateTokens to addbase64UrlEncoded- if members of the etsiU array shall be base64UrlEncoded
-
getRVals
Builds and returns 'rVals' JsonObject- Parameters:
crlsToAdd- a set ofCRLTokens to addocspsToAdd- a set ofOCSPTokens to add- Returns:
JsonObject'rVals' object
-
incorporateRVals
protected void incorporateRVals(JAdESEtsiUHeader etsiUHeader, Set<CRLToken> crlsToAdd, Set<OCSPToken> ocspsToAdd, boolean base64UrlEncoded) Incorporates the provided set of certificates intoetsiUHeader- Parameters:
etsiUHeader-JAdESEtsiUHeaderto updatecrlsToAdd- a set ofCRLTokens to addocspsToAdd- a set ofOCSPTokens to addbase64UrlEncoded- if members of the etsiU array shall be base64UrlEncoded
-
incorporateTstValidationData
protected void incorporateTstValidationData(JAdESEtsiUHeader etsiUHeader, ValidationData validationDataForInclusion, boolean base64UrlEncoded) This method incorporates the 'tstVD' dictionary in the signature- Parameters:
etsiUHeader-JAdESEtsiUHeadercontaining the unsigned properties listvalidationDataForInclusion-ValidationDatato be included into the signaturebase64UrlEncoded- boolean value whether the etsiUHeader shall be base64url encoded or not
-
incorporateAnyValidationData
protected void incorporateAnyValidationData(JAdESEtsiUHeader etsiUHeader, ValidationData validationDataForInclusion, boolean base64UrlEncoded) This method incorporates the 'anyValData' dictionary in the signature- Parameters:
etsiUHeader-JAdESEtsiUHeadercontaining the unsigned properties listvalidationDataForInclusion-ValidationDatato be included into the signaturebase64UrlEncoded- boolean value whether the etsiUHeader shall be base64url encoded or not
-
incorporateValidationData
protected void incorporateValidationData(JAdESEtsiUHeader etsiUHeader, ValidationData validationDataForInclusion, String headerName, boolean base64UrlEncoded) This method incorporates the validation data container in the signature- Parameters:
etsiUHeader-JAdESEtsiUHeadercontaining the unsigned properties listvalidationDataForInclusion-ValidationDatato be included into the signatureheaderName-Stringthe name of the property to be incorporatedbase64UrlEncoded- boolean value whether the etsiUHeader shall be base64url encoded or not
-