[WSS4J] wss4j/src/org/apache/ws/security WSConstants.java,1.12,1.13 WSSecurityEngine.java,1.34,1.35
[email protected] Tue, 10 Feb 2004 07:22:21 -0800
| Newsgroups | gmane.text.xml.wss4j |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/wss4j/wss4j/src/org/apache/ws/security
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5988/src/org/apache/ws/security
Modified Files:
WSConstants.java WSSecurityEngine.java
Log Message:
First working version of STRTransform with limited functionality. Only
direct references are supported yet. But all hooks are in place,
STRTransfrom is registered, and gets called, XML setup seems to be
ok. Refer to inline documentation of STRTransform.java
Index: WSConstants.java
===================================================================
RCS file: /cvsroot/wss4j/wss4j/src/org/apache/ws/security/WSConstants.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- WSConstants.java 21 Jan 2004 12:14:42 -0000 1.12
+++ WSConstants.java 10 Feb 2004 15:22:19 -0000 1.13
@@ -72,7 +72,6 @@
public static final String ENC_PREFIX = "xenc";
public static final String ENC_KEY_LN = "EncryptedKey";
public static final String REF_LIST_LN = "ReferenceList";
- // public static final String SOAP_NS = "http://schemas.xmlsoap.org/soap/envelope/";
public static final String SOAP_SEC_NS = "http://schemas.xmlsoap.org/soap/security/2000-12";
public static final String XMLNS_NS = "http://www.w3.org/2000/xmlns/";
public static final String XML_NS = "http://www.w3.org/XML/1998/namespace";
Index: WSSecurityEngine.java
===================================================================
RCS file: /cvsroot/wss4j/wss4j/src/org/apache/ws/security/WSSecurityEngine.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- WSSecurityEngine.java 9 Feb 2004 16:10:28 -0000 1.34
+++ WSSecurityEngine.java 10 Feb 2004 15:22:19 -0000 1.35
@@ -294,6 +294,8 @@
* it for retrival. Store the implemenation of signature crypto
* (no need for encryption --- yet)
*/
+ WSDocInfo wsDocInfo = new WSDocInfo(securityHeader.getOwnerDocument().hashCode());
+ wsDocInfo.setCrypto(sigCrypto);
NodeList list = securityHeader.getChildNodes();
int len = list.getLength();
@@ -326,20 +328,12 @@
t01=System.currentTimeMillis();
tlog.debug("newXMLSig(elem)= " + (t01-t00));
}
- // remove according to comment of xml-security mailing list
sig.addResourceResolver(EnvelopeIdResolver.getInstance());
if (sigCrypto == null) {
throw new WSSecurityException(WSSecurityException.FAILURE,
"noSigCryptoFile");
}
- /*
- * Gather some info about the document to process and store
- * it for retrival. Store the implemenation of signature crypto
- * (no need for encryption --- yet)
- */
- WSDocInfo wsDocInfo = new WSDocInfo(securityHeader.getOwnerDocument().hashCode());
- wsDocInfo.setCrypto(sigCrypto);
WSDocInfoStore.store(wsDocInfo);
try {
lastPrincipalFound = verifyXMLSignature(sig, sigCrypto);
@@ -397,6 +391,11 @@
* Decode Timestamp, add the found time (created/expiry) to result
*/
} else {
+ /*
+ * Add check for a BinarySecurityToken, add info to WSDocInfo. If BST is
+ * found before a Signature token this would speed up (at least a little
+ * bit) the processing of STR Transform.
+ */
if (doDebug) {
log.debug("Unknown Element: " + elem.getLocalName() + " " + elem.getNamespaceURI());
}
@@ -580,7 +579,7 @@
* @throws Exception When either no <code>Reference</code> element, or the found
* reference contains no URI, or the referenced signing not found.
*/
- protected Element getTokenElement(SecurityTokenReference secRef) throws Exception {
+ public Element getTokenElement(SecurityTokenReference secRef) throws Exception {
Reference ref = secRef.getReference();
if (ref == null) {
throw new WSSecurityException(WSSecurityException.INVALID_SECURITY, "noReference");
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn