Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XML Signed document

user10878887May 24 2011 — edited May 26 2011
I must send some XML signed files to a server but the format I send is not accepted by the server.
I generated the signed file using the class javax.xml.crypto and it looks like "Listing 1".
The server only accept signed files in a format that I don't recognize - there are a lot of ascii extended codes in the beginning and at the end of the file(http://www.bolen.net/html/misc/ascii_extend.gif).
In the middle I can see the contents of my XML file.
What is this format and how can I reproduce it in java?
Thank you.

Listing 1:
xml data....
<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=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>M241K7hDcTNv+X5bikWHUF9eWCY=</DigestValue></Reference></SignedInfo><SignatureValue>EWkokAK8dJC3TRpGlQCIfVod7KCnLzKvvU8TCYhdAIsBCHV3N/epQQ04Gfp9XEe5XMB7LDrZyDHHzAWx4vZCMZXBVSGCxjvSxDIWsEzRETKmh1yHwPl3crqQVp9SRG1UBCsy9kcQM68acURThWRutuLedZ2qjT/cqfDuA10wLuU=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>u2dogP/FESclEev1uOJsKvTPGLTIavrfufVqU8HGV3HoSEDnH+cYu4rCe1aLSWhHupqDsT86i23QGK68nHRx+vRxp0gbyUV2lyrNhM/13UZMTBowQ2dB14BKRcQrve9th/YYMgFaqKkn/ckuj7MohXuLLtboqcH/PFMaEnKCKTk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue></KeyInfo></Signature></report>
This post has been answered by safarmer on May 25 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2011
Added on May 24 2011
11 comments
760 views