You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by we...@apache.org on 2005/09/07 10:29:26 UTC
svn commit: r279278 - in /webservices/wss4j/trunk/src: ./
org/apache/ws/sandbox/axis/security/trust/
org/apache/ws/sandbox/security/conversation/
org/apache/ws/sandbox/security/conversation/message/info/
org/apache/ws/sandbox/security/conversation/mess...
Author: werner
Date: Wed Sep 7 01:28:55 2005
New Revision: 279278
URL: http://svn.apache.org/viewcvs?rev=279278&view=rev
Log:
Make sandbox code compile clean after changes to remove old namespaces.
Modified:
webservices/wss4j/trunk/src/log4j.properties
webservices/wss4j/trunk/src/org/apache/ws/sandbox/axis/security/trust/STSAgentAddressingConfiguration.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationConstants.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationEngine.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationManager.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationSession.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/KeyDerivator.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/info/DerivedKeyInfo.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/token/DerivedKeyToken.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/sessions/SessionMonitor.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/STSUtil.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/errors.properties
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/BaseToken.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RenewTarget.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestSecurityTokenResponse.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestedProofToken.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/Lifetime.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/SecurityTokenOrReference.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/TokenTypes.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/WSAddTokenRequest.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/serialization/TestSerialization.java
webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/errors.properties
webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties
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/token/SignatureConfirmation.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/UsernameToken.java
webservices/wss4j/trunk/src/org/apache/ws/security/saml/saml.properties
webservices/wss4j/trunk/src/org/apache/ws/security/util/StringUtil.java
webservices/wss4j/trunk/src/org/apache/ws/security/util/XmlSchemaDateFormat.java
webservices/wss4j/trunk/src/saml.properties
webservices/wss4j/trunk/src/saml3.properties
webservices/wss4j/trunk/src/saml4.properties
webservices/wss4j/trunk/src/trustEngine.properties
Modified: webservices/wss4j/trunk/src/log4j.properties
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/log4j.properties?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/log4j.properties (original)
+++ webservices/wss4j/trunk/src/log4j.properties Wed Sep 7 01:28:55 2005
@@ -25,12 +25,26 @@
# log4j.logger.org.apache.axis.encoding.SerializationContextImpl=INFO
# log4j.logger.org.apache.axis.encoding.DeserializationContextImpl=INFO
# log4j.logger.org.apache.xml.security.signature.Reference=DEBUG
+# log4j.logger.wssec.TestWSSecurity=DEBUG
+#log4j.logger.wssec.TestWSSecurity1=DEBUG
+#log4j.logger.wssec.TestWSSecurity2=DEBUG
+#log4j.logger.wssec.TestWSSecurity3=DEBUG
+#log4j.logger.wssec.TestWSSecurity4=DEBUG
+#log4j.logger.wssec.TestWSSecurity5=DEBUG
+#log4j.logger.wssec.TestWSSecurity6=DEBUG
+#log4j.logger.wssec.TestWSSecurity7=DEBUG
+#log4j.logger.wssec.TestWSSecurity8=DEBUG
+#log4j.logger.wssec.TestWSSecurity9=DEBUG
+#log4j.logger.wssec.TestWSSecurity10=DEBUG
+#log4j.logger.wssec.TestWSSecurity11=DEBUG
+#log4j.logger.wssec.TestWSSecurity12=DEBUG
+#log4j.logger.wssec.TestWSSecurity13=DEBUG
# log4j.logger.wssec.TestWSSecurityST1=DEBUG
# log4j.logger.wssec.TestWSSecurityST2=DEBUG
# log4j.logger.wssec.TestWSSecurityST3=DEBUG
# log4j.logger.wssec.TestWSSecuritySOAP12=DEBUG
-# log4j.logger.wssec.TestWSSecurity13=DEBUG
# log4j.logger.org.apache.ws.security.handler.WSS4JHandler=DEBUG
+# log4j.logger.org.apache.ws.security.handler.WSHandler=DEBUG
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/axis/security/trust/STSAgentAddressingConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/axis/security/trust/STSAgentAddressingConfiguration.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/axis/security/trust/STSAgentAddressingConfiguration.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/axis/security/trust/STSAgentAddressingConfiguration.java Wed Sep 7 01:28:55 2005
@@ -71,4 +71,4 @@
public void setRepyTo(String endpoint) throws MalformedURIException {
//this.headers.setReplyTo(new Address(endpoint));
}
-}
\ No newline at end of file
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationConstants.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationConstants.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationConstants.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationConstants.java Wed Sep 7 01:28:55 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2004 The Apache Software Foundation.
+ * Copyright 2003-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationEngine.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationEngine.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationEngine.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationEngine.java Wed Sep 7 01:28:55 2005
@@ -444,7 +444,6 @@
Element encBodyData = null;
if ((encBodyData =
WSSecurityUtil.getElementByWsuId(
- WSSConfig.getDefaultWSConfig(),
doc,
dataRefURI))
== null) {
@@ -475,11 +474,10 @@
(Element) WSSecurityUtil.findElement(
(Node) encBodyData,
"SecurityTokenReference",
- WSSConfig.getDefaultWSConfig().getWsseNS()))
+ WSConstants.WSSE_NS))
!= null) {
SecurityTokenReference secRef =
new SecurityTokenReference(
- WSSConfig.getDefaultWSConfig(),
tmpE);
try {
@@ -560,7 +558,6 @@
//Get hold of the DerivedKeyToken 'Element'
Element ele =
WSSecurityUtil.getElementByWsuId(
- WSSConfig.getDefaultWSConfig(),
secRef2DkToken.getElement().getOwnerDocument(),
ref.getURI());
if (ele == null) {
@@ -699,7 +696,7 @@
*/
sig.addResourceResolver(
- EnvelopeIdResolver.getInstance(WSSConfig.getDefaultWSConfig()));
+ EnvelopeIdResolver.getInstance());
KeyInfo info = sig.getKeyInfo();
if (info == null) {
throw new WSSecurityException(
@@ -710,7 +707,7 @@
WSSecurityUtil.getDirectChild(
info.getElement(),
SecurityTokenReference.SECURITY_TOKEN_REFERENCE,
- wssConfig.getWsseNS());
+ WSConstants.WSSE_NS);
if (node == null) {
throw new WSSecurityException(
WSSecurityException.INVALID_SECURITY,
@@ -718,7 +715,6 @@
}
SecurityTokenReference secRef =
new SecurityTokenReference(
- WSSConfig.getDefaultWSConfig(),
(Element) node);
Document docSig = sig.getDocument();
int docHash = docSig.hashCode();
@@ -944,7 +940,7 @@
//get the security header block
//get the saml assertion
- Element ele=WSSecurityUtil.findWsseSecurityHeaderBlock(WSSConfig.getDefaultWSConfig(), doc, doc.getDocumentElement(), false);
+ Element ele=WSSecurityUtil.findWsseSecurityHeaderBlock(doc, doc.getDocumentElement(), false);
Element samEle =(Element)WSSecurityUtil.getDirectChild(ele, "Assertion", "urn:oasis:names:tc:SAML:1.0:assertion" );
// SAMLAssertion assertion = new SAMLAssertion(samEle);
//
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationManager.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationManager.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationManager.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationManager.java Wed Sep 7 01:28:55 2005
@@ -91,10 +91,10 @@
*/
// step 1 : Creating wsse:Reference to DerivedKeyToken
- Reference ref = new Reference(WSSConfig.getDefaultWSConfig(), doc);
+ Reference ref = new Reference(doc);
ref.setURI("#" + genID);
ref.setValueType(ConversationConstants.TOKEN_TYPE_DERIVED_KEY_TOKEN);
- SecurityTokenReference stRef = new SecurityTokenReference(WSSConfig.getDefaultWSConfig(), doc);
+ SecurityTokenReference stRef = new SecurityTokenReference(doc);
stRef.setReference(ref);
WSSecurityUtil.setNamespace(stRef.getElement(),
@@ -298,8 +298,7 @@
Element envelope = doc.getDocumentElement();
SOAPConstants soapConstants = WSSecurityUtil.getSOAPConstants(envelope);
Element securityHeader =
- WSSecurityUtil.findWsseSecurityHeaderBlock(WSSConfig.getDefaultWSConfig(),
- doc,
+ WSSecurityUtil.findWsseSecurityHeaderBlock(doc,
doc.getDocumentElement(),
true);
@@ -315,7 +314,7 @@
String keyInfoUri = "KeyId-" + info.hashCode();
info.setId(keyInfoUri);
- SecurityTokenReference secRef = new SecurityTokenReference(WSSConfig.getDefaultWSConfig(), doc);
+ SecurityTokenReference secRef = new SecurityTokenReference(doc);
String strUri = "STRId-" + secRef.hashCode();
secRef.setID(strUri);
@@ -389,7 +388,7 @@
}
}
- sig.addResourceResolver(EnvelopeIdResolver.getInstance(WSSConfig.getDefaultWSConfig()));
+ sig.addResourceResolver(EnvelopeIdResolver.getInstance());
/*
* Prepending order
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationSession.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationSession.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationSession.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/ConversationSession.java Wed Sep 7 01:28:55 2005
@@ -193,4 +193,4 @@
ref2Base = reference;
}
-}
\ No newline at end of file
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/KeyDerivator.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/KeyDerivator.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/KeyDerivator.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/KeyDerivator.java Wed Sep 7 01:28:55 2005
@@ -215,4 +215,4 @@
}
}
-}
\ No newline at end of file
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/info/DerivedKeyInfo.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/info/DerivedKeyInfo.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/info/DerivedKeyInfo.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/info/DerivedKeyInfo.java Wed Sep 7 01:28:55 2005
@@ -123,4 +123,4 @@
dkTok = token;
}
-}
\ No newline at end of file
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/token/DerivedKeyToken.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/token/DerivedKeyToken.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/token/DerivedKeyToken.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/message/token/DerivedKeyToken.java Wed Sep 7 01:28:55 2005
@@ -143,7 +143,7 @@
public SecurityTokenReference getSecuityTokenReference() throws
WSSecurityException {
if (this.elementSecurityTokenReference != null) {
- return new SecurityTokenReference(WSSConfig.getDefaultWSConfig(), this.elementSecurityTokenReference);
+ return new SecurityTokenReference(this.elementSecurityTokenReference);
}
return null;
}
@@ -461,4 +461,4 @@
prefix + ":Algorithm", algo);
}
-}
\ No newline at end of file
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/sessions/SessionMonitor.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/sessions/SessionMonitor.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/sessions/SessionMonitor.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/conversation/sessions/SessionMonitor.java Wed Sep 7 01:28:55 2005
@@ -162,4 +162,4 @@
return (Hashtable) this.sessionTable.clone();
}
-}
\ No newline at end of file
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/STSUtil.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/STSUtil.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/STSUtil.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/STSUtil.java Wed Sep 7 01:28:55 2005
@@ -91,7 +91,7 @@
//If the first child is a binary token
if((elemBaseChild.getLocalName().equals("BinarySecurityToken")) ){
- binarySecurity=new BinarySecurity(WSSConfig.getDefaultWSConfig(),elemBaseChild);
+ binarySecurity=new BinarySecurity(elemBaseChild);
return binarySecurity;
}else if((elemBaseChild.getLocalName().equals(SecurityTokenReference.SECURITY_TOKEN_REFERENCE) ) ){
return null;
@@ -122,7 +122,7 @@
//If the first child is a UNT
if((elemBaseChild.getLocalName().equals("UsernameToken")) ){
- unt=new UsernameToken(WSSConfig.getDefaultWSConfig(),elemBaseChild);
+ unt=new UsernameToken(elemBaseChild);
return unt;
}else{
return null;
@@ -148,7 +148,7 @@
Reference ref=secTokRef.getReference();
String uri=ref.getURI();
//System.out.println("uri"+uri);
- Element elemFound=WSSecurityUtil.getElementByWsuId(WSSConfig.getDefaultWSConfig(),doc,uri);
+ Element elemFound=WSSecurityUtil.getElementByWsuId(doc,uri);
doc.replaceChild(secTokRef.getElement(),elemFound);
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/errors.properties
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/errors.properties?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/errors.properties (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/errors.properties Wed Sep 7 01:28:55 2005
@@ -15,4 +15,4 @@
incorrectChildElement={\"{0}\"}\"{1}\" element cannot contain a {\"{3}\"}\"{4}\" element
expectedChildElement={\"{0}\"}\"{1}\" is expected within the {\"{3}\"}\"{4}\" element
childInValueElement={\"{0}\"}\"{1}\" element cannot contain any child elements. Found {\"{3}\"}\"{4}\"
-textInCompositeElement={\"{0}\"}\"{1}\" composite element cannot contain a value. Found \"{3}\"
\ No newline at end of file
+textInCompositeElement={\"{0}\"}\"{1}\" composite element cannot contain a value. Found \"{3}\"
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/BaseToken.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/BaseToken.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/BaseToken.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/BaseToken.java Wed Sep 7 01:28:55 2005
@@ -88,16 +88,14 @@
if ("BinarySecurityToken" == firstChild) {
binarySecToken =
- new BinarySecurity(WSSConfig.getDefaultWSConfig(), (Element) this.element.getFirstChild());
+ new BinarySecurity((Element) this.element.getFirstChild());
return binarySecToken;
} else if ("SecurityTokenReference" == firstChild) {
SecurityTokenReference secTokRef =
- new SecurityTokenReference(WSSConfig.getDefaultWSConfig(),
- (Element) this.element.getFirstChild());
+ new SecurityTokenReference((Element) this.element.getFirstChild());
binarySecToken =
- new BinarySecurity(WSSConfig.getDefaultWSConfig(),
- secTokRef.getTokenElement(element.getOwnerDocument(),
+ new BinarySecurity(secTokRef.getTokenElement(element.getOwnerDocument(),
null));
return binarySecToken;
} else {
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RenewTarget.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RenewTarget.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RenewTarget.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RenewTarget.java Wed Sep 7 01:28:55 2005
@@ -106,7 +106,7 @@
if(el.equals(secTokRef)) {
try {
- this.securityTokenReference = new SecurityTokenReference(WSSConfig.getDefaultWSConfig(), elem);
+ this.securityTokenReference = new SecurityTokenReference(elem);
} catch (WSSecurityException ex) {
throw new WSTrustException(WSTrustException.INVALID_REQUEST, ex.getMessage());
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestSecurityTokenResponse.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestSecurityTokenResponse.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestSecurityTokenResponse.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestSecurityTokenResponse.java Wed Sep 7 01:28:55 2005
@@ -125,7 +125,7 @@
* @param doc
*/
public void build(Document doc) {
- Element securityHeader = WSSecurityUtil.findWsseSecurityHeaderBlock(WSSConfig.getDefaultWSConfig(), doc, doc.getDocumentElement(), true);
+ Element securityHeader = WSSecurityUtil.findWsseSecurityHeaderBlock(doc, doc.getDocumentElement(), true);
WSSecurityUtil.appendChildElement(doc, securityHeader, this.element);
if (log.isInfoEnabled()) {
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestedProofToken.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestedProofToken.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestedProofToken.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestedProofToken.java Wed Sep 7 01:28:55 2005
@@ -331,10 +331,10 @@
case WSConstants.BST_DIRECT_REFERENCE:
BinarySecurity bstToken = null;
- bstToken = new X509Security(WSSConfig.getDefaultWSConfig(), doc);
+ bstToken = new X509Security(doc);
((X509Security) bstToken).setX509Certificate(remoteCert);
bstToken.setID(certUri);
- Reference ref = new Reference(WSSConfig.getDefaultWSConfig(), doc);
+ Reference ref = new Reference(doc);
ref.setURI("#" + certUri);
ref.setValueType(bstToken.getValueType());
secToken.setReference(ref);
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/Lifetime.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/Lifetime.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/Lifetime.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/Lifetime.java Wed Sep 7 01:28:55 2005
@@ -46,7 +46,7 @@
*
*/
public Lifetime(WSSConfig wssConfig, Document doc, Element element) throws WSSecurityException {
- super(wssConfig, element);
+ super(element);
this.element = copyElement(doc, element);
}
@@ -55,7 +55,7 @@
* @param duration Indicates how many seconds in the future this Lifetime Expires
*/
public Lifetime(WSSConfig wssConfig, Document doc, int duration) {
- super(wssConfig, doc, duration);
+ super(wssConfig.isPrecisionInMilliSeconds(), doc, duration);
element = changeElementName(element, TrustConstants.WST_NS, TrustConstants.WST_PREFIX + TrustConstants.LIFETIME);
}
@@ -69,7 +69,7 @@
* @param expires When this lifetime expires
*/
public Lifetime(WSSConfig wssConfig, Document doc, Date created, Date expires) {
- super(wssConfig, doc, 0);
+ super(wssConfig.isPrecisionInMilliSeconds(), doc, 0);
element = doc.createElementNS(TrustConstants.WST_NS, TrustConstants.WST_PREFIX + TrustConstants.LIFETIME);
WSSecurityUtil.setNamespace(element, WSConstants.WSU_NS, WSConstants.WSU_PREFIX);
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/SecurityTokenOrReference.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/SecurityTokenOrReference.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/SecurityTokenOrReference.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/SecurityTokenOrReference.java Wed Sep 7 01:28:55 2005
@@ -61,11 +61,11 @@
WSSConfig wssConfig = WSSConfig.getDefaultWSConfig();
try {
if (el.equals(SecurityTokenReference.SECURITY_TOKEN_REFERENCE))
- this.reference = new SecurityTokenReference(wssConfig, element);
+ this.reference = new SecurityTokenReference(element);
if (el.equals(UsernameToken.TOKEN))
- this.usernameToken = new UsernameToken(wssConfig, element);
+ this.usernameToken = new UsernameToken(element);
if (el.equals(BinarySecurity.TOKEN))
- this.binarySecurityToken = new BinarySecurity(wssConfig, element);
+ this.binarySecurityToken = new BinarySecurity(element);
doc = element.getOwnerDocument();
} catch (WSSecurityException e) {
throw new ElementParsingException("WSSecurityException while trying to create a SecurityTokenOrReference object from an XML Element: "
@@ -128,9 +128,9 @@
try {
WSSConfig wssConfig = WSSConfig.getDefaultWSConfig();
if (el.equals(UsernameToken.TOKEN))
- return new UsernameToken(wssConfig, tokenElement);
+ return new UsernameToken(tokenElement);
if (el.equals(BinarySecurity.TOKEN))
- return new BinarySecurity(wssConfig, tokenElement);
+ return new BinarySecurity(tokenElement);
} catch (WSSecurityException e) {
throw new ElementParsingException("WSSecurityException while trying to create a SecurityToken object from a SecurityTokenReference: "
+ e.getMessage());
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/TokenTypes.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/TokenTypes.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/TokenTypes.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/TokenTypes.java Wed Sep 7 01:28:55 2005
@@ -19,6 +19,7 @@
import org.apache.ws.security.WSConstants;
import org.apache.ws.security.message.token.X509Security;
+import org.apache.ws.security.message.token.PKIPathSecurity;
import java.net.URI;
import java.net.URISyntaxException;
@@ -41,8 +42,8 @@
static {
try {
USERNAME = new URI(WSConstants.USERNAMETOKEN_NS + "#" + WSConstants.USERNAME_TOKEN_LN);
- X509 = new URI(WSConstants.X509TOKEN_NS + "#" + X509Security.X509_V3);
- X509PKIPATH = new URI(x509prefix + "#X509PKIPathv1");
+ X509 = new URI(X509Security.getType());
+ X509PKIPATH = new URI(PKIPathSecurity.getType());
PKCS7 = new URI(x509prefix + "#PKCS7");
} catch (URISyntaxException e) {
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/WSAddTokenRequest.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/WSAddTokenRequest.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/WSAddTokenRequest.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/WSAddTokenRequest.java Wed Sep 7 01:28:55 2005
@@ -144,17 +144,17 @@
tokenRequest.setContext(new URI("http://context.context"));
tokenRequest.setTokenType(TokenTypes.X509);
- UsernameToken userToken = new UsernameToken(wssConfig, doc);
+ UsernameToken userToken = new UsernameToken(wssConfig.isPrecisionInMilliSeconds(), doc);
userToken.setName("bob");
userToken.setPassword("bobspass");
tokenRequest.setBase(new SecurityTokenOrReference(userToken));
- UsernameToken user2Token = new UsernameToken(wssConfig, doc);
+ UsernameToken user2Token = new UsernameToken(wssConfig.isPrecisionInMilliSeconds(), doc);
user2Token.setName("joe");
user2Token.setPassword("bobspass");
tokenRequest.addSupporting(new SecurityTokenOrReference(user2Token));
- UsernameToken user3Token = new UsernameToken(wssConfig, doc);
+ UsernameToken user3Token = new UsernameToken(wssConfig.isPrecisionInMilliSeconds(), doc);
user3Token.setName("mike");
user3Token.setPassword("bobspass");
tokenRequest.addSupporting(new SecurityTokenOrReference(user3Token));
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java Wed Sep 7 01:28:55 2005
@@ -64,7 +64,7 @@
X509Certificate cert = (X509Certificate) cf.generateCertificate(inputStream);
// Add the cert to a <BinarySecurityToken> element
- X509Security binaryToken = new X509Security(WSSConfig.getDefaultWSConfig(),doc);
+ X509Security binaryToken = new X509Security(doc);
binaryToken.setX509Certificate(cert);
// Set the <BinarySecurityToken> as the <RequestedToken> in our response
@@ -75,7 +75,7 @@
} else if (TokenTypes.USERNAME.equals(tokenRequest.getTokenType())) {
// Create an arbitrary, fixed UsernameToken to return if the client requests one
// A real security token service would do something more intelligent
- UsernameToken userToken = new UsernameToken(WSSConfig.getDefaultWSConfig(),doc);
+ UsernameToken userToken = new UsernameToken(WSSConfig.getDefaultWSConfig().isPrecisionInMilliSeconds(),doc);
userToken.setName("bob");
userToken.setPassword("bobspass");
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java Wed Sep 7 01:28:55 2005
@@ -68,17 +68,17 @@
tokenRequest.setTokenType(TokenTypes.X509);
// Construct a bunch of username tokens to be used as <Base> and <Supporting> elements
- UsernameToken userToken = new UsernameToken(wssConfig, doc);
+ UsernameToken userToken = new UsernameToken(wssConfig.isPrecisionInMilliSeconds(), doc);
userToken.setName("bob");
userToken.setPassword("bobspass");
tokenRequest.setBase(new SecurityTokenOrReference(userToken));
- UsernameToken user2Token = new UsernameToken(wssConfig, doc);
+ UsernameToken user2Token = new UsernameToken(wssConfig.isPrecisionInMilliSeconds(), doc);
user2Token.setName("joe");
user2Token.setPassword("bobspass");
tokenRequest.addSupporting(new SecurityTokenOrReference(user2Token));
- UsernameToken user3Token = new UsernameToken(wssConfig, doc);
+ UsernameToken user3Token = new UsernameToken(wssConfig.isPrecisionInMilliSeconds(), doc);
user3Token.setName("mike");
user3Token.setPassword("bobspass");
tokenRequest.addSupporting(new SecurityTokenOrReference(user3Token));
Modified: webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/serialization/TestSerialization.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/serialization/TestSerialization.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/serialization/TestSerialization.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/serialization/TestSerialization.java Wed Sep 7 01:28:55 2005
@@ -53,7 +53,7 @@
Document doc = msg.getAsDocument();
- UsernameToken userToken = new UsernameToken(WSSConfig.getDefaultWSConfig(),doc);
+ UsernameToken userToken = new UsernameToken(WSSConfig.getDefaultWSConfig().isPrecisionInMilliSeconds(),doc);
userToken.setName("bob");
userToken.setPassword("bobspass");
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java Wed Sep 7 01:28:55 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2004 The Apache Software Foundation.
+ * Copyright 2003-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,17 +53,21 @@
*/
protected boolean precisionInMilliSeconds = true;
- protected boolean enableSignatureConfirmation = false;
+ protected boolean enableSignatureConfirmation = true;
protected WSSConfig() {
org.apache.xml.security.Init.init();
try {
- Class c = Loader.loadClass("org.bouncycastle.jce.provider.BouncyCastleProvider");
+ Class c = Loader
+ .loadClass("org.bouncycastle.jce.provider.BouncyCastleProvider");
String Id = "BC";
if (java.security.Security.getProvider(Id) == null) {
- log.debug("The provider " + Id
- + " had to be added to the java.security.Security");
- java.security.Security.addProvider((java.security.Provider)c.newInstance());
+ if (log.isDebugEnabled()) {
+ log.debug("The provider " + Id
+ + " had to be added to the java.security.Security");
+ }
+ java.security.Security.addProvider((java.security.Provider) c
+ .newInstance());
}
} catch (Throwable t) {
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/errors.properties
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/errors.properties?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/errors.properties (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/errors.properties Wed Sep 7 01:28:55 2005
@@ -15,4 +15,4 @@
noCerts00 = No certificates loaded
noKey00 = No private key loaded
noSKIHandling = Problem with SKI information: {0}
-badBase64Data = Unable to decode Base64 encoded data
\ No newline at end of file
+badBase64Data = Unable to decode Base64 encoded data
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties Wed Sep 7 01:28:55 2005
@@ -64,4 +64,4 @@
#
noSAMLdoc=Cannot convert SAML to DOM document
invalidSAMLsecurity=SAML token security failure
-invalidData=Invalid data: {0}
\ No newline at end of file
+invalidData=Invalid data: {0}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddSignatureConfirmation.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddSignatureConfirmation.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddSignatureConfirmation.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddSignatureConfirmation.java Wed Sep 7 01:28:55 2005
@@ -1,114 +1,114 @@
-/*
- * Copyright 2003-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.ws.security.message;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.ws.security.message.token.SignatureConfirmation;
-import org.apache.ws.security.util.WSSecurityUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Builds a WS SignatureConfirmation and inserts it into the SOAP Envelope.
- *
- * @author Werner Dittmann (Werner.Dittmann@t-online.de).
- */
-
-public class WSAddSignatureConfirmation extends WSBaseMessage {
- private static Log log = LogFactory.getLog(WSAddSignatureConfirmation.class
- .getName());
-
- private SignatureConfirmation sc = null;
-
- private String id = null;
-
- /**
- * Constructor.
- */
- public WSAddSignatureConfirmation() {
- }
-
- /**
- * Constructor.
- *
- * @param actor
- * the name of the actor of the <code>wsse:Security</code>
- * header
- */
- public WSAddSignatureConfirmation(String actor) {
- super(actor);
- }
-
- /**
- * Constructor.
- *
- * @param actor
- * The name of the actor of the <code>wsse:Security</code>
- * header
- * @param mu
- * Set <code>mustUnderstand</code> to true or false
- */
- public WSAddSignatureConfirmation(String actor, boolean mu) {
- super(actor, mu);
- }
-
- /**
- * Adds a new <code>SignatureConfirmation</code> to a soap envelope.
- *
- * A complete <code>SignatureConfirmation</code> is constructed and added
- * to the <code>wsse:Security</code> header.
- *
- * @param doc
- * The SOAP enevlope as W3C document
- * @param sigVal
- * the Signature value. This will be the content of the "Value"
- * attribute.
- * @return Document with SignatureConfirmation added
- */
- public Document build(Document doc, byte[] sigVal) {
- log.debug("Begin add signature confirmation...");
- Element securityHeader = insertSecurityHeader(doc);
- sc = new SignatureConfirmation(doc, sigVal);
- if (id != null) {
- sc.setID(id);
- }
- WSSecurityUtil.prependChildElement(doc, securityHeader,
- sc.getElement(), true);
- sc = null;
- return doc;
- }
-
- /**
- * Set the wsu:Id value of the SignatureConfirmation
- *
- * @param id
- */
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * Get the wsu:Id value of the SignatureConfirmation
- *
- * @return Returns the wsu:id value
- */
- public String getId() {
- return id;
- }
-}
\ No newline at end of file
+/*
+ * Copyright 2003-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ws.security.message;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.security.message.token.SignatureConfirmation;
+import org.apache.ws.security.util.WSSecurityUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Builds a WS SignatureConfirmation and inserts it into the SOAP Envelope.
+ *
+ * @author Werner Dittmann (Werner.Dittmann@t-online.de).
+ */
+
+public class WSAddSignatureConfirmation extends WSBaseMessage {
+ private static Log log = LogFactory.getLog(WSAddSignatureConfirmation.class
+ .getName());
+
+ private SignatureConfirmation sc = null;
+
+ private String id = null;
+
+ /**
+ * Constructor.
+ */
+ public WSAddSignatureConfirmation() {
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param actor
+ * the name of the actor of the <code>wsse:Security</code>
+ * header
+ */
+ public WSAddSignatureConfirmation(String actor) {
+ super(actor);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param actor
+ * The name of the actor of the <code>wsse:Security</code>
+ * header
+ * @param mu
+ * Set <code>mustUnderstand</code> to true or false
+ */
+ public WSAddSignatureConfirmation(String actor, boolean mu) {
+ super(actor, mu);
+ }
+
+ /**
+ * Adds a new <code>SignatureConfirmation</code> to a soap envelope.
+ *
+ * A complete <code>SignatureConfirmation</code> is constructed and added
+ * to the <code>wsse:Security</code> header.
+ *
+ * @param doc
+ * The SOAP enevlope as W3C document
+ * @param sigVal
+ * the Signature value. This will be the content of the "Value"
+ * attribute.
+ * @return Document with SignatureConfirmation added
+ */
+ public Document build(Document doc, byte[] sigVal) {
+ log.debug("Begin add signature confirmation...");
+ Element securityHeader = insertSecurityHeader(doc);
+ sc = new SignatureConfirmation(doc, sigVal);
+ if (id != null) {
+ sc.setID(id);
+ }
+ WSSecurityUtil.prependChildElement(doc, securityHeader,
+ sc.getElement(), true);
+ sc = null;
+ return doc;
+ }
+
+ /**
+ * Set the wsu:Id value of the SignatureConfirmation
+ *
+ * @param id
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Get the wsu:Id value of the SignatureConfirmation
+ *
+ * @return Returns the wsu:id value
+ */
+ public String getId() {
+ return id;
+ }
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddTimestamp.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddTimestamp.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddTimestamp.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/WSAddTimestamp.java Wed Sep 7 01:28:55 2005
@@ -115,4 +115,4 @@
public String getId() {
return id;
}
-}
\ No newline at end of file
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SignatureConfirmation.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SignatureConfirmation.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SignatureConfirmation.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SignatureConfirmation.java Wed Sep 7 01:28:55 2005
@@ -1,134 +1,134 @@
-/*
- * Copyright 2003-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.ws.security.message.token;
-
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.util.DOM2Writer;
-import org.apache.ws.security.util.WSSecurityUtil;
-import org.apache.xml.security.exceptions.Base64DecodingException;
-import org.apache.xml.security.utils.Base64;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * Signature Confirmation element.
- *
- *
- * @author Werner Dittmann (Werner.Dittmann@t-online.de)
- */
-public class SignatureConfirmation {
-
- private static final String VALUE = "Value";
- protected Element element = null;
- private byte[] signatureValue = null;
- /**
- * Constructs a <code>SignatureConfirmation</code> object and parses the
- * <code>wsse11:SignatureCOnfirmation</code> element to initialize it.
- *
- * @param elem the <code>wsse11:SignatureCOnfirmation</code> element that
- * contains the confirmation data
- */
- public SignatureConfirmation(Element elem) throws WSSecurityException {
-
- element = elem;
- String sv = element.getAttributeNS(null, VALUE);
- if (sv != null) {
- try {
- signatureValue = Base64.decode(sv);
- } catch (Base64DecodingException e) {
- throw new WSSecurityException(WSSecurityException.FAILURE,
- null,
- null,
- e);
- }
- }
- }
-
- /**
- * Constructs a <code>SignatureConfirmation</code> object according
- * to the defined parameters.
- * <p/>
- *
- * @param doc the SOAP envelope as <code>Document</code>
- * @param the Signature value as byte[] of <code>null</code> if no value
- * available.
- */
- public SignatureConfirmation(Document doc, byte[] signVal) {
-
- element =
- doc.createElementNS(WSConstants.WSSE11_NS,
- WSConstants.WSSE11_PREFIX
- + ":"
- + WSConstants.SIGNATURE_CONFIRMATION_LN);
- WSSecurityUtil.setNamespace(element,
- WSConstants.WSSE11_NS,
- WSConstants.WSSE11_PREFIX);
- if (signVal != null) {
- String sv = Base64.encode(signVal,0);
- element.setAttribute(VALUE, sv);
- }
-
- }
-
- /**
- * Returns the dom element of this <code>Timestamp</code> object.
- *
- * @return the <code>wsse:UsernameToken</code> element
- */
- public Element getElement() {
- return this.element;
- }
-
- /**
- * Returns the string representation of the token.
- *
- * @return a XML string representation
- */
- public String toString() {
- return DOM2Writer.nodeToString((Node) this.element);
- }
-
- /**
- * Set wsu:Id attribute of this timestamp
- * @param id
- */
- public void setID(String id) {
- String prefix = WSSecurityUtil.setNamespace(this.element,
- WSConstants.WSU_NS, WSConstants.WSU_PREFIX);
- this.element.setAttributeNS(WSConstants.WSU_NS, prefix + ":Id", id);
- }
-
- /**
- * Returns the value of the wsu:Id attribute
- * @return
- */
- public String getID() {
- return this.element.getAttributeNS(WSConstants.WSU_NS, "Id");
- }
-
- /**
- * @return Returns the signatureValue.
- */
- public byte[] getSignatureValue() {
- return signatureValue;
- }
-
-}
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ws.security.message.token;
+
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.WSSecurityException;
+import org.apache.ws.security.util.DOM2Writer;
+import org.apache.ws.security.util.WSSecurityUtil;
+import org.apache.xml.security.exceptions.Base64DecodingException;
+import org.apache.xml.security.utils.Base64;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ * Signature Confirmation element.
+ *
+ *
+ * @author Werner Dittmann (Werner.Dittmann@t-online.de)
+ */
+public class SignatureConfirmation {
+
+ private static final String VALUE = "Value";
+ protected Element element = null;
+ private byte[] signatureValue = null;
+ /**
+ * Constructs a <code>SignatureConfirmation</code> object and parses the
+ * <code>wsse11:SignatureCOnfirmation</code> element to initialize it.
+ *
+ * @param elem the <code>wsse11:SignatureCOnfirmation</code> element that
+ * contains the confirmation data
+ */
+ public SignatureConfirmation(Element elem) throws WSSecurityException {
+
+ element = elem;
+ String sv = element.getAttributeNS(null, VALUE);
+ if (sv != null) {
+ try {
+ signatureValue = Base64.decode(sv);
+ } catch (Base64DecodingException e) {
+ throw new WSSecurityException(WSSecurityException.FAILURE,
+ null,
+ null,
+ e);
+ }
+ }
+ }
+
+ /**
+ * Constructs a <code>SignatureConfirmation</code> object according
+ * to the defined parameters.
+ * <p/>
+ *
+ * @param doc the SOAP envelope as <code>Document</code>
+ * @param the Signature value as byte[] of <code>null</code> if no value
+ * available.
+ */
+ public SignatureConfirmation(Document doc, byte[] signVal) {
+
+ element =
+ doc.createElementNS(WSConstants.WSSE11_NS,
+ WSConstants.WSSE11_PREFIX
+ + ":"
+ + WSConstants.SIGNATURE_CONFIRMATION_LN);
+ WSSecurityUtil.setNamespace(element,
+ WSConstants.WSSE11_NS,
+ WSConstants.WSSE11_PREFIX);
+ if (signVal != null) {
+ String sv = Base64.encode(signVal,0);
+ element.setAttribute(VALUE, sv);
+ }
+
+ }
+
+ /**
+ * Returns the dom element of this <code>Timestamp</code> object.
+ *
+ * @return the <code>wsse:UsernameToken</code> element
+ */
+ public Element getElement() {
+ return this.element;
+ }
+
+ /**
+ * Returns the string representation of the token.
+ *
+ * @return a XML string representation
+ */
+ public String toString() {
+ return DOM2Writer.nodeToString((Node) this.element);
+ }
+
+ /**
+ * Set wsu:Id attribute of this timestamp
+ * @param id
+ */
+ public void setID(String id) {
+ String prefix = WSSecurityUtil.setNamespace(this.element,
+ WSConstants.WSU_NS, WSConstants.WSU_PREFIX);
+ this.element.setAttributeNS(WSConstants.WSU_NS, prefix + ":Id", id);
+ }
+
+ /**
+ * Returns the value of the wsu:Id attribute
+ * @return
+ */
+ public String getID() {
+ return this.element.getAttributeNS(WSConstants.WSU_NS, "Id");
+ }
+
+ /**
+ * @return Returns the signatureValue.
+ */
+ public byte[] getSignatureValue() {
+ return signatureValue;
+ }
+
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/message/token/UsernameToken.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/message/token/UsernameToken.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/token/UsernameToken.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/token/UsernameToken.java Wed Sep 7 01:28:55 2005
@@ -62,7 +62,7 @@
protected boolean hashed = true;
private static SecureRandom random = null;
- protected static final QName token = new QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN);
+ public static final QName TOKEN = new QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN);
static {
try {
@@ -84,7 +84,7 @@
public UsernameToken(Element elem) throws WSSecurityException {
this.element = elem;
QName el = new QName(this.element.getNamespaceURI(), this.element.getLocalName());
- if (!el.equals(token)) {
+ if (!el.equals(TOKEN)) {
throw new WSSecurityException(WSSecurityException.INVALID_SECURITY_TOKEN, "badTokenType00", new Object[]{el});
}
elementUsername = (Element) WSSecurityUtil.getDirectChild(element, "Username", WSConstants.WSSE_NS);
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/saml/saml.properties
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/saml/saml.properties?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/saml/saml.properties (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/saml/saml.properties Wed Sep 7 01:28:55 2005
@@ -7,4 +7,4 @@
org.apache.ws.security.saml.confirmationMethod=senderVouches
#org.apache.ws.security.saml.confirmationMethod=keyHolder
#org.apache.ws.security.saml
-#org.apache.ws.security.saml
\ No newline at end of file
+#org.apache.ws.security.saml
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/util/StringUtil.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/util/StringUtil.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/util/StringUtil.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/util/StringUtil.java Wed Sep 7 01:28:55 2005
@@ -112,4 +112,4 @@
}
return (String[]) list.toArray(new String[list.size()]);
}
-}
\ No newline at end of file
+}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/util/XmlSchemaDateFormat.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/util/XmlSchemaDateFormat.java?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/util/XmlSchemaDateFormat.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/util/XmlSchemaDateFormat.java Wed Sep 7 01:28:55 2005
@@ -215,4 +215,4 @@
throw new ParseException("INVALID_XSD_DATETIME", parse_pos.getErrorIndex());
}
-}
\ No newline at end of file
+}
Modified: webservices/wss4j/trunk/src/saml.properties
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/saml.properties?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/saml.properties (original)
+++ webservices/wss4j/trunk/src/saml.properties Wed Sep 7 01:28:55 2005
@@ -9,4 +9,4 @@
org.apache.ws.security.saml.confirmationMethod=senderVouches
#org.apache.ws.security.saml.confirmationMethod=keyHolder
#org.apache.ws.security.saml
-#org.apache.ws.security.saml
\ No newline at end of file
+#org.apache.ws.security.saml
Modified: webservices/wss4j/trunk/src/saml3.properties
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/saml3.properties?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/saml3.properties (original)
+++ webservices/wss4j/trunk/src/saml3.properties Wed Sep 7 01:28:55 2005
@@ -9,4 +9,4 @@
org.apache.ws.security.saml.confirmationMethod=senderVouches
#org.apache.ws.security.saml.confirmationMethod=keyHolder
#org.apache.ws.security.saml
-#org.apache.ws.security.saml
\ No newline at end of file
+#org.apache.ws.security.saml
Modified: webservices/wss4j/trunk/src/saml4.properties
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/saml4.properties?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/saml4.properties (original)
+++ webservices/wss4j/trunk/src/saml4.properties Wed Sep 7 01:28:55 2005
@@ -9,4 +9,4 @@
#org.apache.ws.security.saml.confirmationMethod=senderVouches
org.apache.ws.security.saml.confirmationMethod=keyHolder
#org.apache.ws.security.saml
-#org.apache.ws.security.saml
\ No newline at end of file
+#org.apache.ws.security.saml
Modified: webservices/wss4j/trunk/src/trustEngine.properties
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/trustEngine.properties?rev=279278&r1=279277&r2=279278&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/trustEngine.properties (original)
+++ webservices/wss4j/trunk/src/trustEngine.properties Wed Sep 7 01:28:55 2005
@@ -3,4 +3,4 @@
org.apache.ws.security.trust.IssuerVerifierClass=org.apache.ws.security.trust.verify.IssuerVerifier
org.apache.ws.security.trust.ClaimVerifierProperties=claimVerifier.properties
org.apache.ws.security.trust.SignatureVerifierProperties=signatureVerifier.properties
-org.apache.ws.security.trust.IssuerVerifierProperties=issuerVerifier.properties
\ No newline at end of file
+org.apache.ws.security.trust.IssuerVerifierProperties=issuerVerifier.properties
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org