Here are an example of signed document (HTH): <searchRequestRequests messageID="searchBatch-0001" offerID="/GIP-CPS/OC-SCL/ARGENT-PE-AUTH" protocolVersion="1.0"> <searchRequestRequest id="search-0002"> <criteria> <property name="IdStructPE" value="CHU Puteaux"/> </criteria> </searchRequestRequest> <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference> <Transforms> <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> </Transforms> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue>l+iIpWpGpdxfvdW0zuCNmGw3H4U=</DigestValue> </Reference> </SignedInfo> <SignatureValue>Ba4u4pWJ9qi4249tRV26JgxCqcwZn9XM71MHREYMIV4Ssdzb/Qix DpySgXHm+RsHlddJgJFQXu6xMYUfsSUcCr5UdRW790RwJ4Jz2Fgli6NHC3e/LFMWcyaUNxmR4YLOpsymV732zPlLaQ8Ylqk+bt61yy20NnHUYx2Eu/ZCjL7dtjBI1G+8TyRk6mfi3sawKrAcUcemusZasCQbM1gEj2bH5Ic5AwtYvYIg==</SignatureValue> <KeyInfo> <X509Data> <X509Certificate> MIID8jCCA1ugAwIBAgIJAMvCN5kpn2MOMA0GCSqGSIb3DQEBBAUAMIGgMQswCQYDVQQGEwJGUjEOMAwG A1UECBMFUGFyaXMxDjAMBgNVBAcTBVBhcmlzMQ8wDQYDVQQKEwZNaW5kZWYxDzANBgNVBAsTBkRpcmlza TEkMCIGA1UEAxQbQUNfVGVjaG5pcXVlX0lHQ0dfTUlOREVGX0NEMSkwJwYJKoZIhvcNAQkBFhphZG1pbi 5pZ2NnX2NkQGludHJhY2VkLm5ldDAeFw0wNjA1MDQxNjI1MzVaFw0wNzA1MDQxNjI1MzVaMH4xCzAJBgNV BAYTAkZSMQ4wDAYDVQQIEwVQYXJpczEPMA0GA1UEChMGTWluZGVmMQ8wDQYDVQQLEwZEaXJpc2kxFDASBg NVBAMTC0plYW4gUm91dGV0MScwJQYJKoZIhvcNAQkBFhhqZWFuLnJvdXRldEBpbnRyYWNlZC5uZXQwggEi MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDRU3sekHKKhLchUJhPSDGuNX/Rh6QUYej6m13/q6xGxe7 f/a+8+kKMSELJIOt/BTDJyeXC478pmeejzF9zo0FYO7L5uha0vUCocaVTcO0eSFhs29b/cciWePUJdKKzV qIuz7UMI8OI3Yj8gcwTah8c/Ac96hEWhyXKbgQsaiudTPoGx2lzW/OH3CjgdA76uK6tiuP1S+nDeZ4hkl/8 T+KsLb3GqlHYScavzHLCasmrhRJqgFVBFYwsTx6Lw6csDakXHaM4N1btibaugE2qQsEGwLN8sZfx4Q0r9LCV jn7sumiC+OerrQKzeJT7xkUxlWWysr5sK0OXrQV4gNifnPjFAgMBAAGjgdAwgc0wDAYDVR0TAQH/BAIwADA sBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFAtJTkuWO2 b6iWkjBo9Dug6pHD9aMB8GA1UdIwQYMBaAFCLUFszWl0Ql7s3XBHVMsRu91jDbMB0GA1UdJQQWMBQGCCsGA QUFBwMCBggrBgEFBQcDBDAjBgNVHREEHDAagRhqZWFuLnJvdXRldEBpbnRyYWNlZC5uZXQwCwYDVR0PBAQ DAgTwMA0GCSqGSIb3DQEBBAUAA4GBAFURibwF/dsIzp0W4WyKLrlk94eTH4o25yv5yGSD7XxVIpAG95QeK xVkE2+4dUTcNbV+ptMWwnFveyfeu41vST7B0e </X509Certificate> </X509Data> </KeyInfo> </Signature> </searchRequestRequests>
And a encrypted one : <?xml version="1.0" encoding="UTF-8"?> <searchRequestRequests messageID="searchBatch-0001" offerID="/GIP-CPS/OC-SCL/ARGENT-PE-AUTH" protocolVersion="1.0"> <EncryptedData xmlns="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element"> <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#"> <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <KeyName>RA_ADONIS_TEST-1</KeyName> </KeyInfo> <CipherData> <CipherValue>navhaW5bMeRNZtu+gMvYHDZuYd1/AdCHYWfso4i1tBVy9tcRRwhlrIhe 01gytLhh8gSqJ7buSE5f13nVuG9/D+dP4wXEGXoiIRAwSw6LYaLf5hUwbZ2LB7COTUQeJl70xeTYdkgA C0Dp4pDRbGPBPdlm1y0dkNOzAlZGMvDTflNb+ujVN0PZyTQHN4bYPbvilyu+qO6dhmOIfOdTYV3MxPxB6 hEPcKLS2fqCvaQIbRyRfVb8hCGQFuAUcC56L4fuzu3wA==</CipherValue> </CipherData> </EncryptedKey> </KeyInfo> <CipherData> <CipherValue>AAAAAAAAAADhFoP1b5Wjg/9lzuIJs/sktsRRrPHEN4Ipxdwid03CAfbNQWAOM1YLuud RQXDv9qsplG3FIUuetpJbQ1kIuo58MQZa4fB10UV92NJvwWEs=</CipherValue> </CipherData> </EncryptedData> </searchRequestRequests> > -----Message d'origine----- > De : Berin Lautenbach [mailto:[EMAIL PROTECTED] > Envoyé : mercredi 18 avril 2007 14:05 > À : security-dev@xml.apache.org > Objet : Re: Namespaces > > Can you post a signature from the implementation you use to > see what it looks like? > > Cheers, > Berin > > Eric Tournier wrote: > > Hi Berin :) > > > > I'm using a home-made XML Encryption implementation but > unfortunately I'm not the developer of it. This > implementation does not support ds: and xenc: prefixes, so I > try not to have them. In order to test interoperability of it > with well-known API, I'm trying to encrypt a XML document > with XML Security and decrypt the result with my > implementation, and vice-versa. > > My intent is not to have two different namespaces as the > default namespace for the Signature element, but trying not > to have any of the ds: and xenc: prefix into the final > encrypted then signed XML document : element <Signature > instead of <ds:Signature and <CipherValue instead of > <xenc:CipherValue. > > > > Thanks for your help > > > > Eric > > > >> -----Message d'origine----- > >> De : Berin Lautenbach [mailto:[EMAIL PROTECTED] Envoyé : > >> mercredi 18 avril 2007 11:36 À : > security-dev@xml.apache.org Objet : > >> Re: Namespaces > >> > >> As far as I can see - effectively your trying to have two > different > >> namespaces as the default namespace for the Signature > element. Which > >> can't really be done. Or am I misreading your intent? > >> > >> Why do you not want the namespaces? Both specs exist inside a > >> specific namespace, so you can't not use them. > >> > >> Cheers, > >> Berin > >> > >> Eric Tournier wrote: > >>> Hi :) > >>> > >>> I wish to encrypt then sign a XML document without the > 'ds;' and > >>> 'xenc:' namespaces. Unfortunately, I can only suppress on > of these > >>> namespaces :| The following code throws > >> XmlSecurityException always on > >>> the second line independent from its nature > >>> (EncryptionConstants.setEncryptionSpecNSprefixor or > >>> Constants.setSignatureSpecNSprefix) : > >>> (...) > >>> static > >>> { > >>> org.apache.xml.security.Init.init(); > >>> JCA.setProvider(); > >>> } > >>> > >>> public XMLSecurityResource() throws XMLSecurityException > >>> { > >>> // Suppression du namespace 'xenc:' > >>> EncryptionConstants.setEncryptionSpecNSprefix(""); > >>> // Suppression du namespace 'ds:' > >>> Constants.setSignatureSpecNSprefix(""); > >>> } > >>> (...) > >>> > >>> Could someone tell me how to resolve this ? > >>> Thanks > >>> Eric