You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Colm O hEigeartaigh (Created) (JIRA)" <ji...@apache.org> on 2012/01/10 17:19:40 UTC

[jira] [Created] (SANTUARIO-292) Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API

Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API
-----------------------------------------------------------------------------------------------------

                 Key: SANTUARIO-292
                 URL: https://issues.apache.org/jira/browse/SANTUARIO-292
             Project: Santuario
          Issue Type: Improvement
            Reporter: Colm O hEigeartaigh
            Assignee: Colm O hEigeartaigh
             Fix For: Java 1.5



This task is to allow access to the dereferenced Elements after signature validation in the non-JSR-105 API. Access is already available in the JSR-105 API by setting the "javax.xml.crypto.dsig.cacheReference" property to true.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SANTUARIO-292) Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API

Posted by "Colm O hEigeartaigh (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANTUARIO-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183384#comment-13183384 ] 

Colm O hEigeartaigh commented on SANTUARIO-292:
-----------------------------------------------


I duplicated the way JSR-105 returns dereferenced data by adding an interface:

http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/reference/ReferenceData.java?view=markup&pathrev=1229629

and three implementation that get populated depending on whether it's a node-set, Element or Octet-Stream:

http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/reference/ReferenceNodeSetData.java?view=markup&pathrev=1229629
http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/reference/ReferenceSubTreeData.java?view=markup&pathrev=1229629
http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/reference/ReferenceOctetStreamData.java?view=markup&pathrev=1229629

After signature validation, you can access the getReferenceData() method of org.apache.xml.security.signature.Reference to get the dereferenced Element. See the following test for an example of how this is done:

http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/signature/SignatureReferenceTest.java?view=markup&pathrev=1229629

e.g.:

XMLSignature signature = ...
SignedInfo signedInfo = signature.getSignedInfo();
for (int i = 0; i < signedInfo.getLength(); i++) {
    Reference reference = signedInfo.item(i);
    ReferenceData refData = reference.getReferenceData();
    ....
}


                
> Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SANTUARIO-292
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-292
>             Project: Santuario
>          Issue Type: Improvement
>            Reporter: Colm O hEigeartaigh
>            Assignee: Colm O hEigeartaigh
>             Fix For: Java 1.5
>
>
> This task is to allow access to the dereferenced Elements after signature validation in the non-JSR-105 API. Access is already available in the JSR-105 API by setting the "javax.xml.crypto.dsig.cacheReference" property to true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SANTUARIO-292) Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API

Posted by "Colm O hEigeartaigh (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANTUARIO-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183381#comment-13183381 ] 

Colm O hEigeartaigh commented on SANTUARIO-292:
-----------------------------------------------


Commit log:

Author: coheigea
Date: Tue Jan 10 16:36:36 2012
New Revision: 1229629

URL: http://svn.apache.org/viewvc?rev=1229629&view=rev
Log:
[SANTUARIO-192] - Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API

Added:
   santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/reference/
   santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/reference/ReferenceData.java
   santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/reference/ReferenceNodeSetData.java
   santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/reference/ReferenceOctetStreamData.java
   santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/reference/ReferenceSubTreeData.java
   santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/signature/SignatureReferenceTest.java
Modified:
   santuario/xml-security-java/trunk/CHANGELOG.txt
   santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Reference.java
   santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/XMLSignatureInput.java
   santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/interop/InteropTestBase.java

                
> Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SANTUARIO-292
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-292
>             Project: Santuario
>          Issue Type: Improvement
>            Reporter: Colm O hEigeartaigh
>            Assignee: Colm O hEigeartaigh
>             Fix For: Java 1.5
>
>
> This task is to allow access to the dereferenced Elements after signature validation in the non-JSR-105 API. Access is already available in the JSR-105 API by setting the "javax.xml.crypto.dsig.cacheReference" property to true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (SANTUARIO-292) Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API

Posted by "Colm O hEigeartaigh (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANTUARIO-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh closed SANTUARIO-292.
-----------------------------------------

    
> Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SANTUARIO-292
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-292
>             Project: Santuario
>          Issue Type: Improvement
>            Reporter: Colm O hEigeartaigh
>            Assignee: Colm O hEigeartaigh
>             Fix For: Java 1.5
>
>
> This task is to allow access to the dereferenced Elements after signature validation in the non-JSR-105 API. Access is already available in the JSR-105 API by setting the "javax.xml.crypto.dsig.cacheReference" property to true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (SANTUARIO-292) Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API

Posted by "Colm O hEigeartaigh (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANTUARIO-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh resolved SANTUARIO-292.
-------------------------------------------

    Resolution: Fixed
    
> Add the ability to access the dereferenced Elements after signature validation in the non-JSR-105 API
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SANTUARIO-292
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-292
>             Project: Santuario
>          Issue Type: Improvement
>            Reporter: Colm O hEigeartaigh
>            Assignee: Colm O hEigeartaigh
>             Fix For: Java 1.5
>
>
> This task is to allow access to the dereferenced Elements after signature validation in the non-JSR-105 API. Access is already available in the JSR-105 API by setting the "javax.xml.crypto.dsig.cacheReference" property to true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira