org.apache.abdera.security.xmlsec
Class XmlSignature

java.lang.Object
  extended by org.apache.abdera.security.util.SecurityBase
      extended by org.apache.abdera.security.util.SignatureBase
          extended by org.apache.abdera.security.xmlsec.XmlSignature
All Implemented Interfaces:
Signature

public class XmlSignature
extends SignatureBase


Field Summary
 
Fields inherited from class org.apache.abdera.security.util.SecurityBase
abdera
 
Constructor Summary
XmlSignature()
           
XmlSignature(Abdera abdera)
           
 
Method Summary
 SignatureOptions getDefaultSignatureOptions()
          Returns the default signing options
<T extends Element>
org.apache.xml.security.keys.KeyInfo
getSignatureKeyInfo(T element, SignatureOptions options)
           
<T extends Element>
X509Certificate[]
getValidSignatureCertificates(T element, SignatureOptions options)
          Returns a listing of X.509 certificates of valid digital signatures in the element
<T extends Element>
T
removeInvalidSignatures(T element, SignatureOptions options)
           
<T extends Element>
T
sign(T entry, SignatureOptions options)
          Adds a digital signature to the specified element
<T extends Element>
boolean
verify(T entry, SignatureOptions options)
          Verifies that the digitally signed element is valid
 
Methods inherited from class org.apache.abdera.security.util.SignatureBase
isSigned
 
Methods inherited from class org.apache.abdera.security.util.SecurityBase
domToFom, domToFom, fomToDom, fomToDom, getAbdera
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlSignature

public XmlSignature()

XmlSignature

public XmlSignature(Abdera abdera)
Method Detail

sign

public <T extends Element> T sign(T entry,
                                  SignatureOptions options)
                       throws SecurityException
Description copied from interface: Signature
Adds a digital signature to the specified element

Throws:
SecurityException

getValidSignatureCertificates

public <T extends Element> X509Certificate[] getValidSignatureCertificates(T element,
                                                                           SignatureOptions options)
                                                throws SecurityException
Description copied from interface: Signature
Returns a listing of X.509 certificates of valid digital signatures in the element

Throws:
SecurityException

getSignatureKeyInfo

public <T extends Element> org.apache.xml.security.keys.KeyInfo getSignatureKeyInfo(T element,
                                                                                    SignatureOptions options)
                                                         throws SecurityException
Throws:
SecurityException

verify

public <T extends Element> boolean verify(T entry,
                                          SignatureOptions options)
               throws SecurityException
Description copied from interface: Signature
Verifies that the digitally signed element is valid

Throws:
SecurityException

getDefaultSignatureOptions

public SignatureOptions getDefaultSignatureOptions()
                                            throws SecurityException
Description copied from interface: Signature
Returns the default signing options

Throws:
SecurityException
See Also:
SignatureOptions

removeInvalidSignatures

public <T extends Element> T removeInvalidSignatures(T element,
                                                     SignatureOptions options)
                                          throws SecurityException
Throws:
SecurityException


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.