JSR 105 Proposed Final Draft API Changes since Public Review
General
-
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.
-
Removed "_URI" from the Algorithm URI String constants (ex:
Transform.ENVELOPED_URI
is now
Transform.ENVELOPED
).
-
In the API Overview, added a DOM Mechanism requirement that
implementations must support
DOMStructure
s as the mechanism
for applications to specify any elements or mixed content.
javax.xml.crypto
-
Added new
NoSuchMechanismException
class which is an
unchecked exception thrown by getInstance
methods when no
support for the requested mechanism is available.
-
Added
put
and get
methods to the
XMLCryptoContext
interface for storing arbitrary information.
-
Removed the
NodeSetData.contains
method.
-
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
-
Changed
DOMNodeSetData
from an interface to a concrete
class, to make it easier for developers to use.
javax.xml.crypto.dsig
-
Removed the
Reference.ValidateResult
and
Reference.DigestValue
classes and moved methods into the
Reference
class.
-
Changed the return type of the
Reference.getDigestValue
method from Reference.DigestValue
to byte[]
.
-
Added a
Reference.getCalculatedDigestValue
method.
-
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
-
Changed the return type of the
XMLSignature.getSignatureValue
method from byte[]
to SignatureValue
.
-
Removed the
XMLSignature.getSignatureValueId
method
(replaced by new SignatureValue.getId
method).
-
Added
XMLSignature.getKeySelectorResult
method.
-
Added
SignedInfo.getCanonicalizedData
method.
-
Removed the protected
XMLSignatureFactory(String, Provider)
constructor and replaced it with a no-args constructor, which is
sufficient.
-
Removed the
Manifest.validate
method.
-
Renamed
CanonicalizationMethod
constants to avoid confusion.
-
Added a sentence to the
validate
methods to state that the
method always returns a cached value after the first successful
invocation.
-
Clarified that the
XMLSignature.validate
method only
validates the signature and does not unmarshal and reinitialize the
contents of the XMLSignature
object.
-
In
XMLObject
class, noted that content should be returned
as instances of public XMLStructure
subclasses, if they
exist.
javax.xml.crypto.dsig.dom
-
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.
-
Added overloaded constructors to the
DOMSignContext
class
that take a KeySelector
parameter instead of a
Key
parameter.
javax.xml.crypto.dsig.keyinfo
-
Removed the protected
KeyInfoFactory(String, Provider)
constructor and replaced it with a no-args constructor, which is
sufficient.
-
Changed the
KeyInfoFactory.newKeyValue
method to throw
KeyException
if the key algorithm is unrecognized or
unsupported.
-
Changed the
RetrievalMethod.dereference
method to throw
NullPointerException
if the context parameter is null.
-
Clarified that the
KeyInfo.getContent
method returns
instances of public XMLStructure
subclasses.
javax.xml.crypto.dsig.spec
-
Added an
XSLTTransformParameterSpec
class for holding input
parameters to the XSLT Transform algorithm.
-
Renamed the
HMACParameterSpec.getHMACOutputLength
method to
getOutputLength
.
-
Renamed the
XPath
class to XPathType
.