Output
When you build and run the KeyFromCSP example, you should get output similar to the following. Some of your KeyInfo
values will be different if you use a different key for signing the document. Additionally, the KeyInfo
items here have been rearranged for better readability.
Input signature template: <?xml version="1.0"?> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference URI="#HelloWorld" Type="http://www.w3.org/2000/09/xmldsig#;Object"> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <ds:DigestValue/> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue/> <ds:Object Id="HelloWorld" MimeType="text/plain">Hello, World!</ds:Object> </ds:Signature> The data referenced in the signature template was signed successfully. Resultant signature: <?xml version="1.0"?> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference URI="#HelloWorld" Type="http://www.w3.org/2000/09/xmldsig#;Object"> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <ds:DigestValue>BQKNAJjTw98dp7Uvw4oAmJU8LSU=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue> nPHDVveSlkEaxiYl/WOhq4aeN4niqGcfvZ4ULaDqmXCSRVhAkIq49bbMI/EeloMI9FvJiwcS +YV8DsRFlaNMmNZsnEorcOeefLWwUlGOaRcd4iPnxp2MKRRaCLq4t3bq5pt1LKUkaa2JEn7T u7AMy9SAjEdDlRA0mOWTcsing0o= </ds:SignatureValue> <ds:Object Id="HelloWorld" MimeType="text/plain">Hello, World!</ds:Object> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <KeyValue> <RSAKeyValue> <Modulus> xnajBJAOaCVfy7q3wgSni1ZPWes1c8YdcoJdgqLW+RVQliykwcbV4Xgv9U8OlIlKa9/Q5Me7 B1SwMAiNfzA+dXsSeXcdcA7NJi5zmJbs3XdlDSfEf4cboyCv/ZX9V7CvdGu09FtcsfIo6F38 9ScEWaf0I1QNTueK8a/3WRNcqkE= </Modulus> <Exponent>AQAB</Exponent> </RSAKeyValue> </KeyValue> </KeyInfo> </ds:Signature>