Class SignatureImpl
- java.lang.Object
-
- org.opensaml.core.xml.AbstractXMLObject
-
- org.opensaml.xmlsec.signature.impl.SignatureImpl
-
- All Implemented Interfaces:
org.opensaml.core.xml.XMLObject
,org.opensaml.xmlsec.signature.Signature
public class SignatureImpl extends org.opensaml.core.xml.AbstractXMLObject implements org.opensaml.xmlsec.signature.Signature
XMLObject representing an enveloped or detached XML Digital Signature, version 20020212, Signature element.
-
-
Field Summary
Fields Modifier and Type Field Description private String
canonicalizationAlgorithm
Canonicalization algorithm used in signature.private List<org.opensaml.xmlsec.signature.support.ContentReference>
contentReferences
References to content to be signed.private Integer
hmacOutputLength
Optional HMAC output length parameter to the signature algorithm.private org.opensaml.xmlsec.signature.KeyInfo
keyInfo
Public key information to embed in the signature.private String
signatureAlgorithm
Algorithm used to generate the signature.private org.opensaml.security.credential.Credential
signingCredential
Key used to sign the signature.private org.apache.xml.security.signature.XMLSignature
xmlSignature
Constructed Apache XML Security signature object.
-
Constructor Summary
Constructors Modifier Constructor Description protected
SignatureImpl(String namespaceURI, String elementLocalName, String namespacePrefix)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCanonicalizationAlgorithm()
List<org.opensaml.xmlsec.signature.support.ContentReference>
getContentReferences()
Integer
getHMACOutputLength()
org.opensaml.xmlsec.signature.KeyInfo
getKeyInfo()
List<org.opensaml.core.xml.XMLObject>
getOrderedChildren()
String
getSignatureAlgorithm()
org.opensaml.security.credential.Credential
getSigningCredential()
org.apache.xml.security.signature.XMLSignature
getXMLSignature()
Get the Apache XML Security signature instance held by this object.void
releaseDOM()
void
setCanonicalizationAlgorithm(String newAlgorithm)
void
setHMACOutputLength(Integer length)
void
setKeyInfo(org.opensaml.xmlsec.signature.KeyInfo newKeyInfo)
void
setSignatureAlgorithm(String newAlgorithm)
void
setSigningCredential(org.opensaml.security.credential.Credential newCredential)
void
setXMLSignature(org.apache.xml.security.signature.XMLSignature signature)
Set the Apache XML Security signature instance held by this object.-
Methods inherited from class org.opensaml.core.xml.AbstractXMLObject
detach, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensaml.core.xml.XMLObject
detach, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation
-
-
-
-
Field Detail
-
canonicalizationAlgorithm
private String canonicalizationAlgorithm
Canonicalization algorithm used in signature.
-
signatureAlgorithm
private String signatureAlgorithm
Algorithm used to generate the signature.
-
hmacOutputLength
private Integer hmacOutputLength
Optional HMAC output length parameter to the signature algorithm.
-
signingCredential
private org.opensaml.security.credential.Credential signingCredential
Key used to sign the signature.
-
keyInfo
private org.opensaml.xmlsec.signature.KeyInfo keyInfo
Public key information to embed in the signature.
-
contentReferences
private List<org.opensaml.xmlsec.signature.support.ContentReference> contentReferences
References to content to be signed.
-
xmlSignature
private org.apache.xml.security.signature.XMLSignature xmlSignature
Constructed Apache XML Security signature object.
-
-
Constructor Detail
-
SignatureImpl
protected SignatureImpl(String namespaceURI, String elementLocalName, String namespacePrefix)
Constructor.- Parameters:
namespaceURI
- the namespace the element is inelementLocalName
- the local name of the XML element this Object representsnamespacePrefix
- the prefix for the given namespace
-
-
Method Detail
-
getCanonicalizationAlgorithm
public String getCanonicalizationAlgorithm()
- Specified by:
getCanonicalizationAlgorithm
in interfaceorg.opensaml.xmlsec.signature.Signature
-
setCanonicalizationAlgorithm
public void setCanonicalizationAlgorithm(String newAlgorithm)
- Specified by:
setCanonicalizationAlgorithm
in interfaceorg.opensaml.xmlsec.signature.Signature
-
getSignatureAlgorithm
public String getSignatureAlgorithm()
- Specified by:
getSignatureAlgorithm
in interfaceorg.opensaml.xmlsec.signature.Signature
-
setSignatureAlgorithm
public void setSignatureAlgorithm(String newAlgorithm)
- Specified by:
setSignatureAlgorithm
in interfaceorg.opensaml.xmlsec.signature.Signature
-
getHMACOutputLength
public Integer getHMACOutputLength()
- Specified by:
getHMACOutputLength
in interfaceorg.opensaml.xmlsec.signature.Signature
-
setHMACOutputLength
public void setHMACOutputLength(Integer length)
- Specified by:
setHMACOutputLength
in interfaceorg.opensaml.xmlsec.signature.Signature
-
getSigningCredential
public org.opensaml.security.credential.Credential getSigningCredential()
- Specified by:
getSigningCredential
in interfaceorg.opensaml.xmlsec.signature.Signature
-
setSigningCredential
public void setSigningCredential(org.opensaml.security.credential.Credential newCredential)
- Specified by:
setSigningCredential
in interfaceorg.opensaml.xmlsec.signature.Signature
-
getKeyInfo
public org.opensaml.xmlsec.signature.KeyInfo getKeyInfo()
- Specified by:
getKeyInfo
in interfaceorg.opensaml.xmlsec.signature.Signature
-
setKeyInfo
public void setKeyInfo(org.opensaml.xmlsec.signature.KeyInfo newKeyInfo)
- Specified by:
setKeyInfo
in interfaceorg.opensaml.xmlsec.signature.Signature
-
getContentReferences
public List<org.opensaml.xmlsec.signature.support.ContentReference> getContentReferences()
- Specified by:
getContentReferences
in interfaceorg.opensaml.xmlsec.signature.Signature
-
getOrderedChildren
public List<org.opensaml.core.xml.XMLObject> getOrderedChildren()
- Specified by:
getOrderedChildren
in interfaceorg.opensaml.core.xml.XMLObject
-
releaseDOM
public void releaseDOM()
- Specified by:
releaseDOM
in interfaceorg.opensaml.core.xml.XMLObject
- Overrides:
releaseDOM
in classorg.opensaml.core.xml.AbstractXMLObject
-
getXMLSignature
public org.apache.xml.security.signature.XMLSignature getXMLSignature()
Get the Apache XML Security signature instance held by this object.- Returns:
- an Apache XML Security signature object
-
setXMLSignature
public void setXMLSignature(org.apache.xml.security.signature.XMLSignature signature)
Set the Apache XML Security signature instance held by this object.- Parameters:
signature
- an Apache XML Security signature object
-
-