Uploaded image for project: 'WSS4J'
  1. WSS4J
  2. WSS-182

Encryption with symmetric key with encryptSymmKey set to false generates invalid xml without xenc defined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.5.7
    • 1.5.8, 1.6
    • WSS4J Core
    • None
    • tomcat + axis 1.4 + wss4j 1.5.7

    Description

      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);

      Attachments

        Activity

          People

            coheigea Colm O hEigeartaigh
            nitin_handa Nitin Handa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: