Hi, Aleksey!<br><br>Can xmlsec work with WS-I compliant templates?<br>For example, i tried to encrypt message with the follwoing template but was not succeeded:<br><br><?xml version="1.0" encoding="UTF-8"?><br>
<wsse:Security xmlns:wsse='<a href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</a>'<br> xmlns:wsu='<a href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a>' <br>
xmlns:xenc='<a href="http://www.w3.org/2001/04/xmlenc#">http://www.w3.org/2001/04/xmlenc#</a>' <br> xmlns:ds='<a href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>' ><br>
<xenc:EncryptedKey><br> <xenc:EncryptionMethod Algorithm='<a href="http://www.w3.org/2001/04/xmlenc#rsa-1_5">http://www.w3.org/2001/04/xmlenc#rsa-1_5</a>' /><br> <ds:KeyInfo xmlns:ds="<a href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>"><br>
<ds:KeyName>my-rsa-key</ds:KeyName><br> </ds:KeyInfo><br> <xenc:CipherData><br> <xenc:CipherValue><br> </xenc:CipherValue><br> </xenc:CipherData><br> <xenc:ReferenceList><br>
<xenc:DataReference URI='#Enc1' /><br> </xenc:ReferenceList><br> </xenc:EncryptedKey><br> <xenc:EncryptedData Id='Enc1'><br> <xenc:EncryptionMethod Algorithm='<a href="http://www.w3.org/2001/04/xmlenc#aes256-cbc">http://www.w3.org/2001/04/xmlenc#aes256-cbc</a>' /><br>
<xenc:CipherData><br> <xenc:CipherValue><br> </xenc:CipherValue><br> </xenc:CipherData><br> </xenc:EncryptedData><br></wsse:Security><br><br>The error was following:<br>
func=xmlSecEncCtxXmlEncrypt:file=xmlenc.c:line=417:obj=unknown:subj=unknown:error=14:invalid type:type=NULL<br>Error: failed to encrypt xml file "./orig_content.xml"<br>Error: failed to encrypt file with template "./req__encryptedkey_before_encrypteddata_v.tmpl"<br>
<br>This example I composed according to: <a href="http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html#EncryptedKey">http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html#EncryptedKey</a><br><br>Thanks!<br><br>