Hi Aleksey,
I can't get this simple xmlsec command line utility version of your
encrypt1 example to work. Files (renamed) are straight from your examples
directory. I'm using the most recent pre-compiled Windows version 1.0.3 from
Igor's site. Console output below. Any ideas ?
xmlsec encrypt --xml-data encrypt1-doc.xml --deskey deskey.bin
tmpl-EPM-encrypt.xml
func=xmlSecEncCtxXmlEncrypt:file=..\src\xmlenc.c:line=417:obj=unknown:subj=u
nknown:error=14:invalid type:type=NULL
Error: failed to encrypt xml file encrypt1-doc.xml
Error: failed to encrypt file with template tmpl-EPM-encrypt.xml
Also if it is not too much trouble, I would like a simple template and
command line encrypt example which uses recipient's public key file
(instead of deskey.bin). I assume this would be in conjunction with some
suitable symmetric block cipher. Any example would help.
Thanks,
Ed
?xml version=1.0?
!--
XML Security Library example: Simple encryption template file for encrypt1 example.
--
EncryptedData xmlns=http://www.w3.org/2001/04/xmlenc#;
EncryptionMethod Algorithm=http://www.w3.org/2001/04/xmlenc#tripledes-cbc/
KeyInfo xmlns=http://www.w3.org/2000/09/xmldsig#;
KeyNamedeskey.bin/KeyName
/KeyInfo
CipherData
CipherValue/CipherValue
/CipherData
/EncryptedData
?xml version=1.0 encoding=UTF-8?
!--
XML Security Library example: Original XML doc file before encryption (encrypt2 example).
--
Envelope xmlns=urn:envelope
Data
Data to Encrypt. Ed test July 6, 2003.
/Data
/Envelope