Hi.
I have created detached xml signature using java XML Signature (javax.xml.crypto.dsig.* classes). Signature is referenced using element id (#). XML looks something like this:
<ThreeDSecure>
<Message id="a239396308">
<Msg1 id="#MSG24596608192729662548">
...
</Msg1>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI="#MSG24596608192729662548"> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>Bn+mvxvJsNgSrS/66YZnoACFdHg=</DigestValue> </Reference> </SignedInfo> <SignatureValue>...</SignatureValue> <KeyInfo> <X509Data> <X509SubjectName>...</X509SubjectName> <X509Certificate>...</X509Certificate> <X509Certificate>...</X509Certificate> <X509Certificate>...</X509Certificate> </X509Data> </KeyInfo> </Signature> </Message> </ThreeDSecure>
When I try to validate XML signature I get this exception:
javax.crypto.BadPaddingException: Encountered block type: 102 while expecting 1
What is a block type 102 and what is block type 1?
Where can I find block type description?
Any help or suggestion would be nice.
Thanks.
Alan
I have created detached xml signature using java XML Signature (javax.xml.crypto.dsig.* classes). Signature is referenced using element id (#). XML looks something like this:
<ThreeDSecure>
<Message id="a239396308">
<Msg1 id="#MSG24596608192729662548">
...
</Msg1>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI="#MSG24596608192729662548"> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>Bn+mvxvJsNgSrS/66YZnoACFdHg=</DigestValue> </Reference> </SignedInfo> <SignatureValue>...</SignatureValue> <KeyInfo> <X509Data> <X509SubjectName>...</X509SubjectName> <X509Certificate>...</X509Certificate> <X509Certificate>...</X509Certificate> <X509Certificate>...</X509Certificate> </X509Data> </KeyInfo> </Signature> </Message> </ThreeDSecure>
When I try to validate XML signature I get this exception:
javax.crypto.BadPaddingException: Encountered block type: 102 while expecting 1
What is a block type 102 and what is block type 1?
Where can I find block type description?
Any help or suggestion would be nice.
Thanks.
Alan