Author: coheigea
Date: Mon Apr 6 17:32:34 2009
New Revision: 762429
URL: http://svn.apache.org/viewvc?rev=762429&view=rev
Log:
[WSS-174] - Removed deprecated APIs/classes on trunk.
Removed:
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddSignatureConfirmation.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddTimestamp.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSBaseMessage.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSEncryptBody.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSAddSAMLToken.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSAddUsernameToken.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSignEnvelope.java
webservices/wss4j/trunk/src/org/apache/ws/security/saml/WSSignSAMLEnvelope.java
Modified:
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java
webservices/wss4j/trunk/src/org/apache/ws/security/SOAP11Constants.java
webservices/wss4j/trunk/src/org/apache/ws/security/SOAP12Constants.java
webservices/wss4j/trunk/src/org/apache/ws/security/SOAPConstants.java
webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java
webservices/wss4j/trunk/src/org/apache/ws/security/WSSecurityEngineResult.java
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/DerivedKeyToken.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SecurityContextToken.java
webservices/wss4j/trunk/src/org/apache/ws/security/util/WSSecurityUtil.java
Modified:
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
---
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java
(original)
+++
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java
Mon Apr 6 17:32:34 2009
@@ -285,7 +285,8 @@
.fetchActionResult(wsResult, WSConstants.SIGN);
if (actionResult != null) {
- X509Certificate returnCert = actionResult.getCertificate();
+ X509Certificate returnCert =
+
(X509Certificate)actionResult.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
if (returnCert != null && !verifyTrust(returnCert, reqData)) {
throw new AxisFault(
@@ -308,7 +309,8 @@
WSConstants.TS);
if (actionResult != null) {
- Timestamp timestamp = actionResult.getTimestamp();
+ Timestamp timestamp =
+
(Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
if (timestamp != null
&& !verifyTimestamp(timestamp, decodeTimeToLive(reqData)))
{
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/SOAP11Constants.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/SOAP11Constants.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/SOAP11Constants.java
(original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/SOAP11Constants.java Mon
Apr 6 17:32:34 2009
@@ -66,12 +66,4 @@
return "1";
}
- /**
- * Obtain the MustUnderstand string
- * @deprecated use getMustUnderstand() instead
- */
- public String getMustunderstand() {
- return getMustUnderstand();
- }
-
}
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/SOAP12Constants.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/SOAP12Constants.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/SOAP12Constants.java
(original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/SOAP12Constants.java Mon
Apr 6 17:32:34 2009
@@ -73,12 +73,4 @@
return "true";
}
- /**
- * Obtain the MustUnderstand string
- * @deprecated use getMustUnderstand() instead
- */
- public String getMustunderstand() {
- return getMustUnderstand();
- }
-
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/SOAPConstants.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/SOAPConstants.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/SOAPConstants.java
(original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/SOAPConstants.java Mon
Apr 6 17:32:34 2009
@@ -72,12 +72,5 @@
*/
public String getMustUnderstand();
- /**
- * Obtain the "next" role/actor URI
- * @deprecated use getMustUnderstand() instead
- */
- public String getMustunderstand();
-
-
}
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java
(original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java
Mon Apr 6 17:32:34 2009
@@ -105,6 +105,7 @@
this.type = type;
this.usage = usage;
}
+
/**
* Get the identifier.
* <p/>
@@ -116,17 +117,6 @@
}
/**
- * Get the identifier.
- * <p/>
- *
- * @return The identifier
- * @deprecated use getIdentifier() instead
- */
- public String getIdentifer() {
- return getIdentifier();
- }
-
- /**
* Extended callback interface allows for setting the username as well.
* Callback functions can change the identifier, this is intended in the
usernametoken scenario
* where the usernametoken denotes the identity, but a fixed identity for
signing is used
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/WSSecurityEngineResult.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/WSSecurityEngineResult.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
---
webservices/wss4j/trunk/src/org/apache/ws/security/WSSecurityEngineResult.java
(original)
+++
webservices/wss4j/trunk/src/org/apache/ws/security/WSSecurityEngineResult.java
Mon Apr 6 17:32:34 2009
@@ -201,6 +201,7 @@
this(act, princ, certificate, elements, sv);
put(TAG_PROTECTED_ELEMENTS, protectedElements);
}
+
public
WSSecurityEngineResult(
int act,
@@ -227,6 +228,7 @@
put(TAG_ENCRYPTED_KEY_ID, encyptedKeyId);
put(TAG_DATA_REF_URIS, dataRefUris);
}
+
public WSSecurityEngineResult(
int act,
byte[] decryptedKey,
@@ -270,125 +272,5 @@
put(TAG_X509_CERTIFICATES, certificates);
}
- /**
- * @return the actions vector. These actions were performed by the the
- * security engine.
- *
- * @deprecated use ((java.lang.Integer) #get(#TAG_ACTION)).intValue()
- * instead
- */
- public int getAction() {
- return ((java.lang.Integer) get(TAG_ACTION)).intValue();
- }
-
- /**
- * @return the principals found if UsernameToken or Signature
- * processing were done
- *
- * @deprecated use (Principal) #get(#TAG_PRINCIPAL) instead
- */
- public Principal getPrincipal() {
- return (Principal) get(TAG_PRINCIPAL);
- }
-
- /**
- * @return the Certificate found if Signature
- * processing were done
- *
- * @deprecated use (X509Certificate)
- * #get(#TAG_X509_CERTIFICATE) instead
- */
- public X509Certificate getCertificate() {
- return (X509Certificate) get(TAG_X509_CERTIFICATE);
- }
-
- /**
- * @return the timestamp found
- *
- * @deprecated use (Timestamp)
- * #get(#TAG_TIMESTAMP) instead
- */
- public Timestamp getTimestamp() {
- return (Timestamp) get(TAG_TIMESTAMP);
- }
-
- /**
- * @return Returns the signedElements.
- *
- * @deprecated use (java.util.Set)
- * #get(#TAG_SIGNED_ELEMENT_IDS) instead
- */
- public Set getSignedElements() {
- return (java.util.Set) get(TAG_SIGNED_ELEMENT_IDS);
- }
-
- /**
- * @return Returns the signatureValue.
- *
- * @deprecated use (byte[])
- * #get(#TAG_SIGNATURE_VALUE) instead
- */
- public byte[] getSignatureValue() {
- return (byte[]) get(TAG_SIGNATURE_VALUE);
- }
-
- /**
- * @return Returns the sigConf.
- *
- * @deprecated use (SignatureConfirmation)
- * #get(#TAG_SIGNATURE_CONFIRMATION) instead
- */
- public SignatureConfirmation getSigConf() {
- return (SignatureConfirmation) get(TAG_SIGNATURE_CONFIRMATION);
- }
-
- /**
- * @param signatureValue The signatureValue to set.
- *
- * @deprecated use put(#TAG_SIGNATURE_VALUE, signatureValue) instead
- */
- public void setSignatureValue(byte[] signatureValue) {
- put(TAG_SIGNATURE_VALUE, signatureValue);
- }
-
- /**
- * @return the security context token acquired off the message
- *
- * @deprecated use
- * #get(#TAG_SECURITY_CONTEXT_TOKEN) instead
- */
- public SecurityContextToken getSecurityContextToken() {
- return (SecurityContextToken) get(TAG_SECURITY_CONTEXT_TOKEN);
- }
-
- /**
- * @return the decrypted key
- *
- * @deprecated use
- * #get(#TAG_DECRYPTED_KEY) instead
- */
- public byte[] getDecryptedKey() {
- return (byte[]) get(TAG_DECRYPTED_KEY);
- }
-
- /**
- * @return the encrypted key id
- *
- * @deprecated use
- * #get(#TAG_ENCRYPTED_KEY) instead
- */
- public String getEncryptedKeyId() {
- return (String) get(TAG_ENCRYPTED_KEY_ID);
- }
-
- /**
- * @return the list of data ref URIs
- *
- * @deprecated use
- * #get(#TAG_DATA_REF_URIS) instead
- */
- public List getDataRefUris() {
- return (List) get(TAG_DATA_REF_URIS);
- }
}
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
---
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
(original)
+++
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
Mon Apr 6 17:32:34 2009
@@ -96,26 +96,6 @@
/**
* getInstance
* <p/>
- * Returns an instance of Crypto. The properties are handed over the the
crypto
- * implementation. The properties can be <code>null</code>. It is
dependent on the
- * Crypto implementation how the initialization is done in this case.
- * <p/>
- *
- * @param cryptoClassName This is the crypto implementation class. No
default is
- * provided here.
- * @param properties The Properties that are forwarded to the crypto
implementation.
- * These properties are dependent on the crypto
implementation
- * @return The crypto implementation or null if no cryptoClassName was
defined
- *
- * @deprecated use @link{#getInstance(java.lang.String,
java.util.Map)} instead.
- */
- public static Crypto getInstance(String cryptoClassName, Properties
properties) {
- return loadClass(cryptoClassName, properties);
- }
-
- /**
- * getInstance
- * <p/>
* Returns an instance of Crypto. The supplied map is handed over the the
crypto
* implementation. The map can be <code>null</code>. It is dependent on the
* Crypto implementation how the initialization is done in this case.
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
---
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java
(original)
+++
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java
Mon Apr 6 17:32:34 2009
@@ -345,18 +345,6 @@
return encryptedKey;
}
- /**
- * Create DOM subtree for <code>xenc:EncryptedKey</code>
- *
- * @param doc the SOAP envelope parent document
- * @param keyTransportAlgo specifies which algorithm to use to encrypt the
symmetric key
- * @return an <code>xenc:EncryptedKey</code> element
- * @deprecated use createEncryptedKey(Document doc, String
keyTransportAlgo) instead
- */
- protected Element createEnrcyptedKey(Document doc, String
keyTransportAlgo) {
- return createEncryptedKey(doc, keyTransportAlgo);
- }
-
protected Element createCipherValue(Document doc, Element encryptedKey) {
Element cipherData =
doc.createElementNS(WSConstants.ENC_NS, WSConstants.ENC_PREFIX +
":CipherData");
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/DerivedKeyToken.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/message/token/DerivedKeyToken.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
---
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/DerivedKeyToken.java
(original)
+++
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/DerivedKeyToken.java
Mon Apr 6 17:32:34 2009
@@ -156,30 +156,12 @@
WSSecurityUtil.prependChildElement(this.element, ref.getElement());
}
- /**
- * Sets the security token reference of the derived key token
- * This is the reference to the shared secret used in the
conversation/context
- *
- * @param ref Security token reference
- * @deprecated use setSecurityTokenReference(SecurityTokenReference ref)
instead
- */
- public void setSecuityTokenReference(SecurityTokenReference ref) {
- setSecurityTokenReference(ref);
- }
-
public void setSecurityTokenReference(Element elem) {
this.elementSecurityTokenReference = elem;
WSSecurityUtil.prependChildElement(this.element, elem);
}
/**
- * @deprecated use setSecurityTokenReference(Element elem) instead
- */
- public void setSecuityTokenReference(Element elem) {
- setSecurityTokenReference(elem);
- }
-
- /**
* Returns the SecurityTokenReference of the derived key token
*
* @return the Security Token Reference of the derived key token
@@ -193,19 +175,6 @@
}
/**
- * Returns the SecurityTokenReference of the derived key token
- *
- * @return the Security Token Reference of the derived key token
- * @throws WSSecurityException
- * @deprecated use getSecurityTokenReference() instead
- */
- public SecurityTokenReference getSecuityTokenReference() throws
WSSecurityException {
- return getSecurityTokenReference();
- }
-
- //Write the getter for security token reference
-
- /**
* This adds a property into
* /DerivedKeyToken/Properties
*
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SecurityContextToken.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SecurityContextToken.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
---
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SecurityContextToken.java
(original)
+++
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SecurityContextToken.java
Mon Apr 6 17:32:34 2009
@@ -145,15 +145,6 @@
/**
* Set the identifier.
- * @deprecated use {#link SecurityContextToken.setIdentifier(String)}
instead
- */
- public void setIdentifier(Document doc, String uuid) {
- Text node = getFirstNode(this.elementIdentifier);
- node.setData(uuid);
- }
-
- /**
- * Set the identifier.
*/
public void setIdentifier(String uuid) {
Text node = getFirstNode(this.elementIdentifier);
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/util/WSSecurityUtil.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/util/WSSecurityUtil.java?rev=762429&r1=762428&r2=762429&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/util/WSSecurityUtil.java
(original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/util/WSSecurityUtil.java
Mon Apr 6 17:32:34 2009
@@ -74,47 +74,6 @@
*
* @param doc
* @param actor
- * @deprecated use WSSecurityUtil.getSecurityHeader(Document, String)
instead
- * @return the <code>wsse:Security</code> element or <code>null</code>
- * if not such element found
- */
- public static Element getSecurityHeader(Document doc, String actor,
SOAPConstants sc) {
- Element soapHeaderElement =
- getDirectChildElement(
- doc.getDocumentElement(),
- sc.getHeaderQName().getLocalPart(),
- sc.getEnvelopeURI()
- );
- if (soapHeaderElement == null) { // no SOAP header at all
- return null;
- }
-
- // get all wsse:Security nodes
- NodeList list =
- soapHeaderElement.getElementsByTagNameNS(WSConstants.WSSE_NS,
WSConstants.WSSE_LN);
- if (list == null) {
- return null;
- }
- for (int i = 0; i < list.getLength(); i++) {
- Element elem = (Element) list.item(i);
- Attr attr =
- elem.getAttributeNodeNS(
- sc.getEnvelopeURI(),
sc.getRoleAttributeQName().getLocalPart()
- );
- String hActor = (attr != null) ? attr.getValue() : null;
- if (WSSecurityUtil.isActorEqual(actor, hActor)) {
- return elem;
- }
- }
- return null;
- }
-
- /**
- * Returns the first WS-Security header element for a given actor. Only one
- * WS-Security header is allowed for an actor.
- *
- * @param doc
- * @param actor
* @return the <code>wsse:Security</code> element or <code>null</code>
* if not such element found
*/
@@ -174,32 +133,6 @@
return false;
}
- /**
- * Gets a direct child with specified localname and namespace. <p/>
- *
- * @param fNode the node where to start the search
- * @param localName local name of the child to get
- * @param namespace the namespace of the child to get
- * @deprecated see WSSecurityUtil#getDirectChildElement instead
- * @return the node or <code>null</code> if not such node found
- */
- public static Node getDirectChild(
- Node fNode,
- String localName,
- String namespace
- ) {
- for (
- Node currentChild = fNode.getFirstChild();
- currentChild != null;
- currentChild = currentChild.getNextSibling()
- ) {
- if (localName.equals(currentChild.getLocalName())
- && namespace.equals(currentChild.getNamespaceURI())) {
- return currentChild;
- }
- }
- return null;
- }
/**
* Gets a direct child with specified localname and namespace. <p/>
@@ -232,25 +165,6 @@
/**
* return the first soap "Body" element. <p/>
*
- * @deprecated use findBodyElement(Document) instead
- * @param doc
- * @return the body element or <code>null</code> if document does not
- * contain a SOAP body
- */
- public static Element findBodyElement(Document doc, SOAPConstants sc) {
- Element soapBodyElement =
- WSSecurityUtil.getDirectChildElement(
- doc.getFirstChild(),
- sc.getBodyQName().getLocalPart(),
- sc.getEnvelopeURI()
- );
- return soapBodyElement;
- }
-
-
- /**
- * return the first soap "Body" element. <p/>
- *
* @param doc
* @return the body element or <code>null</code> if document does not
* contain a SOAP body
@@ -557,18 +471,6 @@
}
/**
- * Turn a reference (eg "#5") into an ID (eg "5").
- *
- * @param ref
- * @return ref trimmed and with the leading "#" removed, or null if not
- * correctly formed
- * @deprecated use getIDFromReference instead
- */
- public static String getIDfromReference(String ref) {
- return getIDFromReference(ref);
- }
-
- /**
* Search for an element given its generic id. <p/>
*
* @param doc the DOM document (SOAP request)
@@ -609,26 +511,6 @@
/**
- * append a child element <p/>
- *
- * @param doc the DOM document (SOAP request)
- * @param parent element of this child element
- * @param child the element to append
- * @deprecated use {...@link Node#appendChild(Node)} instead
- * @return the child element
- */
- public static Element appendChildElement(
- Document doc,
- Element parent,
- Element child
- ) {
- Node whitespaceText = doc.createTextNode("\n");
- parent.appendChild(whitespaceText);
- parent.appendChild(child);
- return child;
- }
-
- /**
* prepend a child element <p/>
*
* @param parent element of this child element
@@ -648,35 +530,6 @@
return child;
}
- /**
- * prepend a child element <p/>
- *
- * @param doc the DOM document (SOAP request)
- * @param parent element of this child element
- * @param child the element to append
- * @param addWhitespace if true prepend a newline before child
- * @deprecated use {...@link WSSecurityUtil#prependChildElement(Element,
Element)}
- * instead
- * @return the child element
- */
- public static Element prependChildElement(
- Document doc,
- Element parent,
- Element child,
- boolean addWhitespace
- ) {
- Node firstChild = parent.getFirstChild();
- if (firstChild == null) {
- parent.appendChild(child);
- } else {
- parent.insertBefore(child, firstChild);
- }
- if (addWhitespace) {
- Node whitespaceText = doc.createTextNode("\n");
- parent.insertBefore(whitespaceText, child);
- }
- return child;
- }
/**
* find the first ws-security header block <p/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]