Class XMLSignatureDocument
java.lang.Object
es.uji.crypto.xades.jxades.security.xml.XMLSignatureDocument
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Elementprivate List<SignatureProperty> private Stringprivate Stringprivate Stringprivate List<XMLStructure> private Stringprivate DigestMethodprivate List<SignatureProperties> private XmlWrappedKeyInfoprivate XMLSignatureFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSignatureProperty(List<DOMStructure> content, String target, String id) voidaddSignatureProperty(SignatureProperty signatureProperty) addXMLObject(List<XMLStructure> xmlObjects) addXMLObject(XMLObject xmlObject) voidaddXMLObjectItem(XMLStructure xmlObjectItem) protected StringgetKeyInfoId(String idPrefix) protected ReferencegetReference(String uri) protected ReferencegetReference(String uri, String type) protected ReferencegetReference(String uri, List transforms, String type) protected ReferencegetReference(String uri, List transforms, String type, String referenceId) getReferences(List idList) protected StringgetSignatureId(String idPrefix) protected StringgetSignatureValueId(String idPrefix) protected XMLSignatureFactoryprivate static DocumentnewKeyInfo(X509Certificate certificate, String keyInfoId) newXMLObject(List<XMLStructure> xmlObjects) newXMLObject(List<XMLStructure> xmlObjects, String id) newXMLObject(List<XMLStructure> xmlObjects, String id, String mimeType) newXMLObject(List<XMLStructure> xmlObjects, String id, String mimeType, String encoding) static voidprintDocument(Node node) voidvoidsetDefaultXMLObjectEncoding(String defaultXMLObjectEncoding) voidsetDefaultXMLObjectId(String defaultXMLObjectId) voidsetDefaultXMLObjectMimeType(String defaultXMLObjectMimeType) voidsetDigestMethod(DigestMethod digestMethod) voidsetListOfSignatureProperties(List<SignatureProperties> listOfSignatureProperties) voidsetWrappedKeyStorePlace(WrappedKeyStorePlace wrappedKeyStorePlace) voidsetXmlWrappedKeyInfo(XmlWrappedKeyInfo wrappedKeyInfo) voidsign(X509Certificate certificate, PrivateKey privateKey, String signatureMethod, List referencesIdList, String signatureIdPrefix, String xadesPrefix, String xadesNamespace, String xmlSignaturePrefix) validate()
-
Field Details
-
baseElement
-
xmlSignatureFactory
-
digestMethod
-
wrappedKeyInfo
-
listOfSignatureProperties
-
defaultSignatureProperties
-
defaultSignaturePropertiesId
-
xmlObjects
-
defaultXMLObjectItems
-
defaultXMLObjectId
-
defaultXMLObjectMimeType
-
defaultXMLObjectEncoding
-
-
Constructor Details
-
XMLSignatureDocument
-
-
Method Details
-
getBaseElement
-
getXMLSignatureFactory
-
getDigestMethod
- Throws:
GeneralSecurityException
-
setDigestMethod
-
getXMLSignatureElements
-
getXmlWrappedKeyInfo
-
setXmlWrappedKeyInfo
-
getWrappedKeyStorePlace
-
setWrappedKeyStorePlace
-
getReference
- Throws:
GeneralSecurityException
-
getReference
- Throws:
GeneralSecurityException
-
getReference
protected Reference getReference(String uri, List transforms, String type) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
getReference
protected Reference getReference(String uri, List transforms, String type, String referenceId) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
getReferences
- Throws:
GeneralSecurityException
-
validate
-
sign
public void sign(X509Certificate certificate, PrivateKey privateKey, String signatureMethod, List referencesIdList, String signatureIdPrefix, String xadesPrefix, String xadesNamespace, String xmlSignaturePrefix) throws MarshalException, XMLSignatureException, GeneralSecurityException -
getSignatureId
-
getSignatureValueId
-
getKeyInfoId
-
newKeyInfo
- Throws:
KeyException
-
getListOfSignatureProperties
-
setListOfSignatureProperties
-
addSignatureProperty
-
addSignatureProperty
-
getDefaultSignatureProperties
-
setDefaultSignaturePropertiesId
-
getDefaultSignaturePropertiesId
-
newXMLObject
-
newXMLObject
-
newXMLObject
-
newXMLObject
-
addXMLObject
-
addXMLObject
-
getXMLObjects
-
addXMLObjectItem
-
getDefaultXMLObject
-
getXMLObjectItems
-
setDefaultXMLObjectId
-
getDefaultXMLObjectId
-
setDefaultXMLObjectMimeType
-
getDefaultXMLObjectMimeType
-
setDefaultXMLObjectEncoding
-
getDefaultXMLObjectEncoding
-
loadEncryptionDocument
-
printDocument
- Throws:
TransformerException
-