Encryption with symmetric key with encryptSymmKey set to false generates
invalid xml without xenc defined
---------------------------------------------------------------------------------------------------------
Key: WSS-182
URL: https://issues.apache.org/jira/browse/WSS-182
Project: WSS4J
Issue Type: Bug
Components: WSS4J Core
Affects Versions: 1.5.7
Environment: tomcat + axis 1.4 + wss4j 1.5.7
Reporter: Nitin Handa
Assignee: Ruchith Udayanga Fernando
Priority: Blocker
WSSecEncrypt.java below function doesn't define xenc prefix being used. if
encryptSymmKey set to false then ReferenceList is the only element which is
inserted in soap response.
public Element encryptForInternalRef(Element dataRef, List references)
throws WSSecurityException {
List encDataRefs =
doEncryption(document, symmetricKey, references);
Element referenceList = dataRef;
if (referenceList == null) {
referenceList =
document.createElementNS(
WSConstants.ENC_NS,
WSConstants.ENC_PREFIX + ":ReferenceList"
);
}
createDataRefList(document, referenceList, encDataRefs);
return referenceList;
}
It should call set namespace like createEncryptedKey function (of
WSSecEncryptedKey.java) does:
WSSecurityUtil.setNamespace(encryptedKey, WSConstants.ENC_NS,
WSConstants.ENC_PREFIX);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]