JSR 105 Proposed Final Draft API Changes since Public Review

General

  1. Added new package javax.xml.crypto.dsig.dom containing DOM-specific classes for the javax.xml.crypto.dsig package. Moved DOMSignContext and DOMValidateContext classes from the javax.xml.crypto.dom package to the javax.xml.crypto.dsig.dom package.
  2. Removed "_URI" from the Algorithm URI String constants (ex: Transform.ENVELOPED_URI is now Transform.ENVELOPED).
  3. In the API Overview, added a DOM Mechanism requirement that implementations must support DOMStructures as the mechanism for applications to specify any elements or mixed content.

javax.xml.crypto

  1. Added new NoSuchMechanismException class which is an unchecked exception thrown by getInstance methods when no support for the requested mechanism is available.
  2. Added put and get methods to the XMLCryptoContext interface for storing arbitrary information.
  3. Removed the NodeSetData.contains method.
  4. Added a warning to the XMLCryptoContext class that contexts may contain state and are not meant to be reusable and that each context should only be used for signing/validating one XMLSignature.

javax.xml.crypto.dom

  1. Changed DOMNodeSetData from an interface to a concrete class, to make it easier for developers to use.

javax.xml.crypto.dsig

  1. Removed the Reference.ValidateResult and Reference.DigestValue classes and moved methods into the Reference class.
  2. Changed the return type of the Reference.getDigestValue method from Reference.DigestValue to byte[].
  3. Added a Reference.getCalculatedDigestValue method.
  4. Added new XMLSignature.SignatureValue nested class that represents the SignatureValue element and has methods for accessing the value and the Id attribute, as well as a validate method for validating the signature value
  5. Changed the return type of the XMLSignature.getSignatureValue method from byte[] to SignatureValue.
  6. Removed the XMLSignature.getSignatureValueId method (replaced by new SignatureValue.getId method).
  7. Added XMLSignature.getKeySelectorResult method.
  8. Added SignedInfo.getCanonicalizedData method.
  9. Removed the protected XMLSignatureFactory(String, Provider) constructor and replaced it with a no-args constructor, which is sufficient.
  10. Removed the Manifest.validate method.
  11. Renamed CanonicalizationMethod constants to avoid confusion.
  12. Added a sentence to the validate methods to state that the method always returns a cached value after the first successful invocation.
  13. Clarified that the XMLSignature.validate method only validates the signature and does not unmarshal and reinitialize the contents of the XMLSignature object.
  14. In XMLObject class, noted that content should be returned as instances of public XMLStructure subclasses, if they exist.

javax.xml.crypto.dsig.dom

  1. Added a constructor to the DOMValidateContext class that takes a single Node parameter, which is useful when you want to unmarshal, but not cryptographically validate an XMLSignature. This is also useful for using an existing XMLSignature as a template for a subsequent signing operation.
  2. Added overloaded constructors to the DOMSignContext class that take a KeySelector parameter instead of a Key parameter.

javax.xml.crypto.dsig.keyinfo

  1. Removed the protected KeyInfoFactory(String, Provider) constructor and replaced it with a no-args constructor, which is sufficient.
  2. Changed the KeyInfoFactory.newKeyValue method to throw KeyException if the key algorithm is unrecognized or unsupported.
  3. Changed the RetrievalMethod.dereference method to throw NullPointerException if the context parameter is null.
  4. Clarified that the KeyInfo.getContent method returns instances of public XMLStructure subclasses.

javax.xml.crypto.dsig.spec

  1. Added an XSLTTransformParameterSpec class for holding input parameters to the XSLT Transform algorithm.
  2. Renamed the HMACParameterSpec.getHMACOutputLength method to getOutputLength.
  3. Renamed the XPath class to XPathType.