wsit
  1. wsit
  2. WSIT-1685

Failure to add "#" to beginning of reference in signatures

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: security
    • Labels:
      None

      Description

      The security processing fails to add a "#" to the beginning of a reference included in a signature.

        Activity

        Hide
        mleese added a comment -

        The following patch corrects this issue:
        diff --git a/metro/com/sun/xml/wss/impl/dsig/WSSPolicyConsumerImpl.java b/metro/com/sun/xml/wss/impl/dsig/WSSPolicyConsumerImpl.java
        index f095043..4a14de6 100644
        — a/metro/com/sun/xml/wss/impl/dsig/WSSPolicyConsumerImpl.java
        +++ b/metro/com/sun/xml/wss/impl/dsig/WSSPolicyConsumerImpl.java
        @@ -1024,9 +1024,9 @@
        attribute.getNamespaceURI().equals(MessageConstants.NAMESPACES_NS)) {
        byte [] digestValue = fpContext.getDigestValue();
        Reference reference = null;
        if(!verify && digestValue != null)

        { + reference = signatureFactory.newReference("#"+targetURI,digestMethod,transformList,null,null,digestValue); - reference = signatureFactory.newReference(targetURI,digestMethod,transformList,null,null,digestValue); }

        else

        { + reference = signatureFactory.newReference("#"+targetURI,digestMethod,transformList,null,null,null); - reference = signatureFactory.newReference(targetURI,digestMethod,transformList,null,null,null); }

        //Note :: Id is null.

        Show
        mleese added a comment - The following patch corrects this issue: diff --git a/metro/com/sun/xml/wss/impl/dsig/WSSPolicyConsumerImpl.java b/metro/com/sun/xml/wss/impl/dsig/WSSPolicyConsumerImpl.java index f095043..4a14de6 100644 — a/metro/com/sun/xml/wss/impl/dsig/WSSPolicyConsumerImpl.java +++ b/metro/com/sun/xml/wss/impl/dsig/WSSPolicyConsumerImpl.java @@ -1024,9 +1024,9 @@ attribute.getNamespaceURI().equals(MessageConstants.NAMESPACES_NS)) { byte [] digestValue = fpContext.getDigestValue(); Reference reference = null; if(!verify && digestValue != null) { + reference = signatureFactory.newReference("#"+targetURI,digestMethod,transformList,null,null,digestValue); - reference = signatureFactory.newReference(targetURI,digestMethod,transformList,null,null,digestValue); } else { + reference = signatureFactory.newReference("#"+targetURI,digestMethod,transformList,null,null,null); - reference = signatureFactory.newReference(targetURI,digestMethod,transformList,null,null,null); } //Note :: Id is null.

          People

          • Assignee:
            symonchang
            Reporter:
            mleese
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: