Class XMLAdvancedSignature
java.lang.Object
es.uji.crypto.xades.jxades.security.xml.XAdES.XMLAdvancedSignature
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Element
protected String
protected String
protected List
<XMLStructure> protected String
protected DigestMethod
static final String
static final String
private List
<QualifyingPropertiesReference> protected XMLSignature
protected DOMSignContext
protected XmlWrappedKeyInfo
protected BaseXAdESImpl
static final String
static final String
protected String
protected XMLSignatureFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddXMLObject
(XMLObject xmlObject) protected String
protected String
protected String
protected DigestMethod
static XMLAdvancedSignature
getInstance
(XAdESBase xades) protected String
getKeyInfoId
(String idPrefix) protected Reference
getReference
(String uri) protected Reference
getReference
(String uri, String type) protected Reference
getReference
(String uri, List<Transform> transforms, String type) protected Reference
getReferences
(List<?> idList) protected String
getSignatureId
(String idPrefix) protected String
getSignatureValueId
(String idPrefix) protected List
<XMLSignatureElement> protected XMLSignatureFactory
protected QualifyingProperties
marshalQualifyingProperties
(String xmlNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList) protected QualifyingProperties
marshalQualifyingProperties
(String xmlNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList, List<Transform> transforms) protected XMLObject
marshalXMLSignature
(String xadesNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList) protected XMLObject
marshalXMLSignature
(String xadesNamespace, String signedPropertiesTypeUrl, String signatureIdPrefix, List referencesIdList, List<Transform> SignedPropertiesTransforms) static XMLAdvancedSignature
newInstance
(XAdESBase xades) protected KeyInfo
newKeyInfo
(X509Certificate certificate, String keyInfoId) protected XMLObject
newXMLObject
(List<XMLStructure> xmlObjects) protected XMLObject
newXMLObject
(List<XMLStructure> xmlObjects, String id) protected XMLObject
newXMLObject
(List<XMLStructure> xmlObjects, String id, String mimeType) protected XMLObject
newXMLObject
(List<XMLStructure> xmlObjects, String id, String mimeType, String encoding) void
setDigestMethod
(String method) void
void
setSignedPropertiesTypeUrl
(String signedPropertiesTypeUrl) void
setWrappedKeyStorePlace
(WrappedKeyStorePlace wrappedKeyStorePlace) void
setXadesNamespace
(String xadesNamespace) void
setXmlWrappedKeyInfo
(XmlWrappedKeyInfo wrappedKeyInfo) void
sign
(X509Certificate signingCert, PrivateKey privateKey, String signatureMethod, List refsIdList, String signatureIdPrefix) void
sign
(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
-