Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

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

Open
glassfishrobot opened this issue Apr 1, 2014 · 4 comments
Open

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

glassfishrobot opened this issue Apr 1, 2014 · 4 comments

Comments

@glassfishrobot
Copy link
Contributor

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

Affected Versions

[2.1.1]

@glassfishrobot
Copy link
Contributor Author

Reported by mleese

@glassfishrobot
Copy link
Contributor Author

Was assigned to symonchang

@glassfishrobot
Copy link
Contributor Author

mleese said:
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.

@glassfishrobot
Copy link
Contributor Author

This issue was imported from java.net JIRA WSIT-1685

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant