You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Giacomo Boccardo (Jira)" <ji...@apache.org> on 2020/11/02 11:36:00 UTC
[jira] [Updated] (SANTUARIO-558) XAdES validation extremely slow
using old transformation/canonicalization algorithm
[ https://issues.apache.org/jira/browse/SANTUARIO-558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Giacomo Boccardo updated SANTUARIO-558:
---------------------------------------
Description:
When the old transformation algorithm
{noformat}
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(ancestor-or-self::ds:Signature)</ds:XPath>
</ds:Transform>{noformat}
is used in a XAdES signature the validation of the signature takes "forever" (3.59MB XML file, about 3 hours).
Using the more modern XPath2Filter
{noformat}
<ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
<dsig-xpath:XPath Filter="subtract" xmlns:dsig-xpath="http://www.w3.org/2002/06/xmldsig-filter2">/descendant::ds:Signature</dsig-xpath:XPath>
</ds:Transform> {noformat}
there's no such issue.
The call which causes this issue is org.apache.xml.security.signature.XMLSignature#checkSignatureValue(java.security.cert.X509Certificate)
Unfortunately I don't have any control on the signatures I receive.
Do you plan to optimize it? Is there a workaround?
I'm sorry but I can't attach the file I used, but you can find similar samples [here|https://ec.europa.eu/cefdigital/tracker/browse/DSS-2071?jql=project%20%3D%20DSS%20AND%20text%20~%20%22not(ancestor-or-self%3A%3Ads%3ASignature)%22%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC] where the same issue is raised.
was:
When the old transformation algorithm
{noformat}
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(ancestor-or-self::ds:Signature)</ds:XPath>
</ds:Transform>{noformat}
is used in a XAdES signature the validation of the signature takes "forever" (3.59MB XML file, about 3 hours).
Using the more modern XPath2Filter
{noformat}
<ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
<dsig-xpath:XPath Filter="subtract" xmlns:dsig-xpath="http://www.w3.org/2002/06/xmldsig-filter2">/descendant::ds:Signature</dsig-xpath:XPath>
</ds:Transform> {noformat}
there's no such issue.
The call which causes this issue is org.apache.xml.security.signature.XMLSignature#checkSignatureValue(java.security.cert.X509Certificate)
Unfortunately I don't have any control on the signatures I receive.
Do you plan to optimize it? Is there a workaround?
I'm sorry but I can't attach the file I used, but you can find similar samples [here|[https://ec.europa.eu/cefdigital/tracker/browse/DSS-2071?jql=project%20%3D%20DSS%20AND%20text%20~%20%22not(ancestor-or-self%3A%3Ads%3ASignature)%22%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC],] where the same issue is raised.
> XAdES validation extremely slow using old transformation/canonicalization algorithm
> -----------------------------------------------------------------------------------
>
> Key: SANTUARIO-558
> URL: https://issues.apache.org/jira/browse/SANTUARIO-558
> Project: Santuario
> Issue Type: Bug
> Components: Java
> Affects Versions: Java 2.2.0
> Reporter: Giacomo Boccardo
> Assignee: Colm O hEigeartaigh
> Priority: Major
> Labels: XPath2Filter, canonicalization, transformation
>
> When the old transformation algorithm
> {noformat}
> <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
> <ds:XPath>not(ancestor-or-self::ds:Signature)</ds:XPath>
> </ds:Transform>{noformat}
> is used in a XAdES signature the validation of the signature takes "forever" (3.59MB XML file, about 3 hours).
> Using the more modern XPath2Filter
> {noformat}
> <ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
> <dsig-xpath:XPath Filter="subtract" xmlns:dsig-xpath="http://www.w3.org/2002/06/xmldsig-filter2">/descendant::ds:Signature</dsig-xpath:XPath>
> </ds:Transform> {noformat}
> there's no such issue.
> The call which causes this issue is org.apache.xml.security.signature.XMLSignature#checkSignatureValue(java.security.cert.X509Certificate)
> Unfortunately I don't have any control on the signatures I receive.
> Do you plan to optimize it? Is there a workaround?
> I'm sorry but I can't attach the file I used, but you can find similar samples [here|https://ec.europa.eu/cefdigital/tracker/browse/DSS-2071?jql=project%20%3D%20DSS%20AND%20text%20~%20%22not(ancestor-or-self%3A%3Ads%3ASignature)%22%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC] where the same issue is raised.
>
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)