coheigea commented on code in PR #438:
URL: https://github.com/apache/ws-wss4j/pull/438#discussion_r1942302004
##########
ws-security-common/src/main/java/org/apache/wss4j/common/token/DOMX509SKI.java:
##########
@@ -19,17 +19,33 @@
package org.apache.wss4j.common.token;
+import org.apache.wss4j.common.WSS4JConstants;
+import org.apache.wss4j.common.crypto.BouncyCastleUtils;
import org.apache.wss4j.common.util.DOM2Writer;
+import org.w3c.dom.Document;
import org.apache.wss4j.common.util.XMLUtils;
import org.w3c.dom.Element;
+import java.security.cert.X509Certificate;
+
/**
* An X.509 SKI token.
*/
public final class DOMX509SKI {
private final Element element;
- private final byte[] skiBytes;
+ private byte[] skiBytes;
Review Comment:
Why remove final here?
##########
ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java:
##########
@@ -277,127 +277,144 @@ protected void
createEncryptedKeyElement(X509Certificate remoteCert, Crypto cryp
if (customEKKeyInfoElement != null) {
encryptedKeyElement.appendChild(getDocument().adoptNode(customEKKeyInfoElement));
} else {
+ Element keyInfoElement =
+ getDocument().createElementNS(
+ WSConstants.SIG_NS, WSConstants.SIG_PREFIX + ":" +
WSConstants.KEYINFO_LN
+ );
+ keyInfoElement.setAttributeNS(
+ WSConstants.XMLNS_NS, "xmlns:" + WSConstants.SIG_PREFIX,
WSConstants.SIG_NS
+ );
+
+ Element keyInfoChildElement;
+
Review Comment:
I think I'd prefer the "else" clause to stay the same as before, as you're
mixing the SecurityTokenReference case with this new case of not having one.
Instead please consider putting an "else if" clause before it for
WSConstants.X509_SKI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]