[xmlsec] Encrypt and Decrypt

Doug Royer Doug at Royer.com
Sat Jan 25 16:34:06 PST 2003


I can not get the online examples for encryption and decryption
to compile. So then I tried the encryption and decryption
examples in docs/examples/enc[12], and they
do compile then produce run time errors:

./enc1 rsapub.pem

  (keyinfo.c:926): error 16: invalid key origin : xmlSecKeyOriginEncryptedKey
  (xmltree.c:674): error 100: assertion : doc != NULL

It then products ouput that to the eye look valid that I save in MY-RUN.xml.
However:

  ./enc2 ../enc1/rsakey.pem ../enc1/MY-RUN.xml

  (des.c:261): error 12: invalid transform or key : xmlSecEncDes3Cbc and 
xmlSecDesKey
  (xmlenc.c:1510): error 2: xmlsec operation failed : xmlSecBinTransformAddKey 
- -1
  (xmlenc.c:1124): error 2: xmlsec operation failed : 
xmlSecEncryptedDataNodeRead - -1
  (xmlenc.c:1018): error 2: xmlsec operation failed : xmlSecEncStateCreate
Error: decryption failed

  ./enc2 also produces the same errors for the supplied test.xml in enc1 .


This happens on Solaris-2.6, Solaris-9, Red Hat-8.0, Red Hat-7.3,
all code I compiled from http://www.aleksey.com. All systems with:

	xmlsec-config --version
	0.0.11

	xml2-config --version
	2.5.1

	xslt-config --version
	1.0.24

	openssl version
         OpenSSL 0.9.7-beta6 17 Dec 2002

I have also tried it with:

	OpenSSL 0.9.6b [engine] 9 Jul 2001

All with the same results.


-- 

  Doug Royer                     |   http://INET-Consulting.com
  -------------------------------|-----------------------------
  Doug at Royer.com                 | Office: (208)612-INET
  http://Royer.com/People/Doug   |    Fax: (866)594-8574
                                 |   Cell: (208)520-4044

                 We Do Standards - You Need Standards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4411 bytes
Desc: S/MIME Cryptographic Signature
Url : http://www.aleksey.com/pipermail/xmlsec/attachments/20030125/5c86f61a/smime.bin


More information about the xmlsec mailing list