[xmlsec] encrypt2 - error=45:key is not found

HUDITA iulia maria iuliamaria.HUDITA at gemalto.com
Mon Apr 21 05:01:08 PDT 2008


Hi Michael,

I'm using openssl and until this morning I was trying to compile with
MSVC 2005. Finally, I've used the Makefile.w32 provided in the examples
directory. I added paths to include and library files for xmlsec,
libxml2, libexslt and openssl to the environment variables INCLUDE and
LIB, I've changed from static linking to using DLLs and now it works all
right. 

I suppose that you are also using the Windows binaries XMLSec Library.  

Hope this will help,
Iulia

-----Original Message-----
From: Michael Hagedorn [mailto:michael.hagedorn at gmx.de] 
Sent: lundi 21 avril 2008 13:48
To: HUDITA iulia maria
Cc: xmlsec at aleksey.com
Subject: Re: [xmlsec] encrypt2 - error=45:key is not found

Iulia,

what crypto provider and what compiler you are using?
Its openssl ("XMLSEC_CRYPTO_OPENSSL") and MSVC 2005 for me.
....but still doesn't work.

Regards,
Michael

HUDITA iulia maria wrote:
> Hello all,
> I am also a beginner and I have the same problem with encrypt1.
> I read the instructions in the file encrypt1.c
> Maybe there is other information somewhere about this sample?
>
>  
> D:\Projects\SOAP\encrypt\debug>encrypt.exe tmpl-file.xml key.bin
>
func=xmlSecEncCtxEncDataNodeRead:file=..\src\xmlenc.c:line=885:obj=unkno
> wn:subj=unknown:error=45:key is not found:
>
>
func=xmlSecEncCtxBinaryEncrypt:file=..\src\xmlenc.c:line=312:obj=unknown
> :subj=xmlSecEncCtxEncDataNodeRead:error=1:xmlsec library function
> failed:
> Error: encryption failed
>
> -----We use the following template named tmpl-file.xml ---------------
>
> <?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#">
> 	<KeyName/>
>     </KeyInfo>   
>     <CipherData>
> 	<CipherValue></CipherValue>
>     </CipherData>
> </EncryptedData>
>
> ---  And the following key file named   "key.bin"
> ---------------------
>
> 012345670123456701234567
>
> Thanks for your time.
> Iulia
>
> -----Original Message-----
> From: xmlsec-bounces at aleksey.com [mailto:xmlsec-bounces at aleksey.com]
On
> Behalf Of Michael Hagedorn
> Sent: vendredi 18 avril 2008 17:48
> To: xmlsec at aleksey.com
> Subject: [xmlsec] encrypt2 - error=45:key is not found
>
> I'm sure this is an absolute beginners question.
> But what do I miss:
>
> C:\test\encrypt2\release>encrypt2 encrypt2-doc.xml deskey.bin
>
func=xmlSecEncCtxEncDataNodeRead:file=..\src\xmlenc.c:line=885:obj=unkno
> wn:subj=unknown:error=45:key 
> is not found:
>
func=xmlSecEncCtxXmlEncrypt:file=..\src\xmlenc.c:line=375:obj=unknown:su
> bj=xmlSecEncCtxEncDataNodeRead:error=1:xmlsec 
> library function failed:
> Error: encryption failed
>
> Used files (encrypt2.c encrypt2-doc.xml deskey.bin) are taken from 
> xmlsec1-1.2.11.tar.gz
> Btw. same result for encrypt1.c ...
>
> Thanks for your help!
> Michael
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec
>   



More information about the xmlsec mailing list