You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by ebxml ebxml <eb...@yahoo.com.au> on 2002/12/09 08:38:10 UTC

si.getVerificationResult(i);

Hi all,

i was trying with XML signature signing &
verification, my verification was failing.
so to test what is signed and what i am verifying, i
put this block of code immediately
after  "xmlSignature.sign(privateKey);" statment

1        SignedInfo si = xmlSignature.getSignedInfo();
2        for (int i = 0; i <
si.getSignedContentLength(); i++) {
3          boolean thisOneWasSigned =
si.getVerificationResult(i);
4          System.out.println("EBXML = " +
thisOneWasSigned);
5        }


but i am getting the 

java.lang.ArrayIndexOutOfBoundsException
        at
org.apache.xml.security.signature.Manifest.getVerificationResult(Unknown
Source)
        
at line number 3 in the above code, what is that
mean?.

i want to sign the entire XML document for that what i
am doing is 

.....
XMLSignature xmlSignature = new XMLSignature(xmlDoc,
null, signAlgo);
...
.............
...
xmlSignature.addDocument("", transforms,
Constants.ALGO_ID_DIGEST_SHA1);
....


even though i am signing only the XML Document, but
the getSignedContentLength i am getting is 2

any hint or help for that.

thanks in advance

http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
- Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!

Re: si.getVerificationResult(i);

Posted by ebxml ebxml <eb...@yahoo.com.au>.
Hi all, 

i got the solution, there was small mistake.

thanks


 --- ebxml ebxml <eb...@yahoo.com.au> wrote: >
Hi all,
> 
> i was trying with XML signature signing &
> verification, my verification was failing.
> so to test what is signed and what i am verifying, i
> put this block of code immediately
> after  "xmlSignature.sign(privateKey);" statment
> 
> 1        SignedInfo si =
> xmlSignature.getSignedInfo();
> 2        for (int i = 0; i <
> si.getSignedContentLength(); i++) {
> 3          boolean thisOneWasSigned =
> si.getVerificationResult(i);
> 4          System.out.println("EBXML = " +
> thisOneWasSigned);
> 5        }
> 
> 
> but i am getting the 
> 
> java.lang.ArrayIndexOutOfBoundsException
>         at
>
org.apache.xml.security.signature.Manifest.getVerificationResult(Unknown
> Source)
>         
> at line number 3 in the above code, what is that
> mean?.
> 
> i want to sign the entire XML document for that what
> i
> am doing is 
> 
> .....
> XMLSignature xmlSignature = new XMLSignature(xmlDoc,
> null, signAlgo);
> ...
> .............
> ...
> xmlSignature.addDocument("", transforms,
> Constants.ALGO_ID_DIGEST_SHA1);
> ....
> 
> 
> even though i am signing only the XML Document, but
> the getSignedContentLength i am getting is 2
> 
> any hint or help for that.
> 
> thanks in advance
> 
> http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint
> Dropper
> - Avoid getting hideous gifts this Christmas with
> Yahoo! Hint Dropper! 

http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
- Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!