Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01

weblogic.xml.security.signature
Class Signature

java.lang.Object
  extended by weblogic.xml.security.signature.Signature
All Implemented Interfaces:
DSIGConstants

public final class Signature
extends Object
implements DSIGConstants


Field Summary
 
Fields inherited from interface weblogic.xml.security.signature.DSIGConstants
ATTR_ALGORITHM, ATTR_ID, ATTR_PREFIX_LIST, ATTR_URI, ATTR_XMLNS, DSIG_PREFIX, DSIG_URI, EXC_C14N_DEFAULT_PREFIX, TAG_C14N_METHOD, TAG_DIGEST_METHOD, TAG_DIGEST_VALUE, TAG_DSA_G, TAG_DSA_KEY_VALUE, TAG_DSA_P, TAG_DSA_Q, TAG_DSA_Y, TAG_HMAC_OUTPUT_LENGTH, TAG_INCLUSIVE_NAMESPACES, TAG_KEY_INFO, TAG_KEY_NAME, TAG_KEY_VALUE, TAG_OBJECT, TAG_REFERENCE, TAG_RSA_EXPONENT, TAG_RSA_KEY_VALUE, TAG_RSA_MODULUS, TAG_SIGNATURE, TAG_SIGNATURE_METHOD, TAG_SIGNATURE_VALUE, TAG_SIGNED_INFO, TAG_TRANSFORM, TAG_TRANSFORMS, TAG_X509_CERTIFICATE, TAG_X509_DATA, TAG_X509_ISSUER_NAME, TAG_X509_ISSUER_SERIAL, TAG_X509_SERIAL_NUMBER, TAG_X509_SUBJECT_NAME, TAG_XPATH, TC_C14N_METHOD, TC_DIGEST_METHOD, TC_DSA_KEY_VALUE, TC_KEY_INFO, TC_KEY_VALUE, TC_REFERENCE, TC_RSA_KEY_VALUE, TC_SIGNATURE, TC_SIGNATURE_METHOD, TC_SIGNED_INFO, TC_TRANSFORMS, TC_X509_DATA, VERBOSE, VERBOSE_PROPERTY, VERBOSE_PROPERTY_ALT
 
Constructor Summary
Signature()
          Creates a Signature object with the signature algorithm defaulted to SignatureAlgorithm.DSA_SHA1.
 
Method Summary
 void addReference(Reference reference)
          Adds a reference to be signed.
 KeyInfo getKeyInfo()
           
 Iterator getReferences()
          Gets all of the references signed by this signature
 String getSignatureMethod()
           
 KeyResult getValidatingKey()
           
static void main(String[] args)
           
 void setCanonicalizationMethod(CanonicalizationMethod c14nMethod)
           
 void setCanonicalizationMethod(String c14Method)
           
 void setKeyInfo(KeyInfo keyInfo)
           
 void setSignatureMethod(String algorithmURI)
           
 void sign(Key key)
          Generates the signature.
 void toXML(XMLOutputStream xos, String ns, int indent)
           
 void validate(Key validatingKey)
          Validates the signature and it's references.
 void validateReferences()
           
 void validateSignature(KeyResolver resolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Signature

public Signature()
Creates a Signature object with the signature algorithm defaulted to SignatureAlgorithm.DSA_SHA1.

Method Detail

setSignatureMethod

public void setSignatureMethod(String algorithmURI)
                        throws XMLSignatureException
Throws:
XMLSignatureException

getSignatureMethod

public String getSignatureMethod()

setCanonicalizationMethod

public void setCanonicalizationMethod(String c14Method)
                               throws XMLSignatureException
Throws:
XMLSignatureException

setCanonicalizationMethod

public void setCanonicalizationMethod(CanonicalizationMethod c14nMethod)

setKeyInfo

public void setKeyInfo(KeyInfo keyInfo)

getKeyInfo

public KeyInfo getKeyInfo()
                   throws KeyInfoValidationException
Throws:
KeyInfoValidationException

addReference

public void addReference(Reference reference)
Adds a reference to be signed. The default digest algorithm for the returned reference is derived from the signature algorithm for this Signature.


getReferences

public Iterator getReferences()
Gets all of the references signed by this signature


sign

public void sign(Key key)
          throws XMLSignatureException
Generates the signature. The result can be obtained by calling getSignatureElement.

Throws:
XMLSignatureException

validate

public void validate(Key validatingKey)
              throws XMLSignatureException
Validates the signature and it's references.

Throws:
XMLSignatureException - If the core signature validation passes but one or more references failed validation.

validateSignature

public void validateSignature(KeyResolver resolver)
                       throws XMLSignatureException
Throws:
XMLSignatureException

validateReferences

public void validateReferences()
                        throws XMLSignatureException
Throws:
XMLSignatureException

getValidatingKey

public KeyResult getValidatingKey()

toXML

public void toXML(XMLOutputStream xos,
                  String ns,
                  int indent)
           throws XMLStreamException
Throws:
XMLStreamException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01