Class XMLAdvancedSignature
java.lang.Object
es.uji.crypto.xades.jxades.security.xml.XAdES.XMLAdvancedSignature
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Elementprotected Stringprotected Stringprotected List<XMLStructure> protected Stringprotected DigestMethodstatic final Stringstatic final Stringprivate List<QualifyingPropertiesReference> protected XMLSignatureprotected DOMSignContextprotected XmlWrappedKeyInfoprotected BaseXAdESImplstatic final Stringstatic final Stringprotected Stringprotected XMLSignatureFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddXMLObject(XMLObject xmlObject) protected Stringprotected Stringprotected Stringprotected DigestMethodstatic XMLAdvancedSignaturegetInstance(XAdESBase xades) protected StringgetKeyInfoId(String idPrefix) protected ReferencegetReference(String uri) protected ReferencegetReference(String uri, String type) protected ReferencegetReference(String uri, List<Transform> transforms, String type) protected ReferencegetReferences(List<?> idList) protected StringgetSignatureId(String idPrefix) protected StringgetSignatureValueId(String idPrefix) protected List<XMLSignatureElement> protected XMLSignatureFactoryprotected QualifyingPropertiesmarshalQualifyingProperties(String xmlNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList) protected QualifyingPropertiesmarshalQualifyingProperties(String xmlNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList, List<Transform> transforms) protected XMLObjectmarshalXMLSignature(String xadesNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList) protected XMLObjectmarshalXMLSignature(String xadesNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList, List<Transform> SignedPropertiesTransforms) static XMLAdvancedSignaturenewInstance(XAdESBase xades) protected KeyInfonewKeyInfo(X509Certificate certificate, String keyInfoId) protected XMLObjectnewXMLObject(List<XMLStructure> xmlObjects) protected XMLObjectnewXMLObject(List<XMLStructure> xmlObjects, String id) protected XMLObjectnewXMLObject(List<XMLStructure> xmlObjects, String id, String mimeType) protected XMLObjectnewXMLObject(List<XMLStructure> xmlObjects, String id, String mimeType, String encoding) voidsetDigestMethod(String method) voidvoidsetSignedPropertiesTypeUrl(String signedPropertiesTypeUrl) voidsetWrappedKeyStorePlace(WrappedKeyStorePlace wrappedKeyStorePlace) voidsetXadesNamespace(String xadesNamespace) voidsetXmlWrappedKeyInfo(XmlWrappedKeyInfo wrappedKeyInfo) voidsign(X509Certificate signingCert, PrivateKey privateKey, String signatureMethod, List refsIdList, String signatureIdPrefix) voidsign(X509Certificate certificate, PrivateKey privateKey, String signatureMethod, List refsIdList, String signatureIdPrefix, SigningCertificateInfo signingCertInfo) validate()
-
Field Details
-
XADES_v132
- See Also:
-
XADES_v141
- See Also:
-
signedPropertiesTypeUrl
-
ELEMENT_SIGNATURE
- See Also:
-
ELEMENT_SIGNATURE_VALUE
- See Also:
-
xades
-
baseElement
-
xmlSignatureFactory
-
digestMethod
-
xadesNamespace
-
wrappedKeyInfo
-
xmlObjects
-
defaultXMLObjectItems
-
defaultXMLObjectId
-
defaultXMLObjectMimeType
-
defaultXMLObjectEncoding
-
signature
-
signContext
-
qualifyingPropertiesReferences
-
-
Constructor Details
-
XMLAdvancedSignature
-
-
Method Details
-
newInstance
- Throws:
GeneralSecurityException
-
getInstance
- Throws:
GeneralSecurityException
-
getBaseElement
-
getBaseDocument
-
setXadesNamespace
-
setSignedPropertiesTypeUrl
-
sign
public void sign(X509Certificate signingCert, PrivateKey privateKey, String signatureMethod, List refsIdList, String signatureIdPrefix) throws MarshalException, XMLSignatureException, GeneralSecurityException, TransformException, IOException, ParserConfigurationException, SAXException -
sign
public void sign(X509Certificate certificate, PrivateKey privateKey, String signatureMethod, List refsIdList, String signatureIdPrefix, SigningCertificateInfo signingCertInfo) throws MarshalException, XMLSignatureException, GeneralSecurityException, TransformException, IOException, ParserConfigurationException, SAXException -
validate
-
getWrappedKeyStorePlace
-
setWrappedKeyStorePlace
-
getXmlWrappedKeyInfo
-
getXMLObjects
-
setXmlWrappedKeyInfo
-
getXMLSignatureElements
-
getSignatureId
-
getSignatureValueId
-
getKeyInfoId
-
getXMLSignatureFactory
-
getReference
- Throws:
GeneralSecurityException
-
getReference
- Throws:
GeneralSecurityException
-
getReference
protected Reference getReference(String uri, List<Transform> transforms, String type) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
getReference
protected Reference getReference(String uri, List<Transform> transforms, String type, String referenceId) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
getReferences
- Throws:
GeneralSecurityException
-
getDigestMethod
- Throws:
GeneralSecurityException
-
setDigestMethod
- Throws:
GeneralSecurityException
-
newKeyInfo
- Throws:
KeyException
-
newXMLObject
-
newXMLObject
-
newXMLObject
-
newXMLObject
-
getDefaultXMLObjectId
-
getDefaultXMLObjectMimeType
-
getDefaultXMLObjectEncoding
-
addXMLObject
-
marshalQualifyingProperties
protected QualifyingProperties marshalQualifyingProperties(String xmlNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList) throws GeneralSecurityException, MarshalException -
marshalQualifyingProperties
protected QualifyingProperties marshalQualifyingProperties(String xmlNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList, List<Transform> transforms) throws GeneralSecurityException, MarshalException -
marshalXMLSignature
protected XMLObject marshalXMLSignature(String xadesNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList) throws GeneralSecurityException, MarshalException -
marshalXMLSignature
protected XMLObject marshalXMLSignature(String xadesNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList, List<Transform> SignedPropertiesTransforms) throws GeneralSecurityException, MarshalException -
getQualifyingPropertiesReferences
-
setQualifyingPropertiesReferences
-