[xmlsec] Error when compiling xmlsec example

Alfredo Esteban aedelatorre at gmail.com
Mon Feb 10 07:09:21 PST 2014


Ok, thanks a lot Aleksey.

Aestu

2014-02-10 3:32 GMT+01:00 Aleksey Sanin <aleksey at aleksey.com>:
> It's not a bug, you compile w/o using the right flags (see pkg-config
> for example).
>
> Aleksey
>
> On 2/7/14, 6:47 PM, Alfredo Esteban wrote:
>> Ok, I got the solution for the first error here (my machine is x86_64):
>>
>> http://www.aleksey.com/pipermail/xmlsec/2007/008005.html
>>
>> I defined XMLSEC_NO_SIZE_T and it worked fine. Is it a bug in library
>> compilation on Debian Wheezy?
>>
>> I still haven't found a solution for problem with gnutls when loading
>> pem private key.
>>
>> Aestu
>>
>> 2014-02-08 3:15 GMT+01:00 Alfredo Esteban <aedelatorre at gmail.com>:
>>> Hi,
>>>
>>> Thanks for libxmlsec library.
>>>
>>> I'm trying to use sign1.c example from Debian Wheezy ligxmlsec1 package.
>>>
>>> 1.- I copy sign1.c from examples /usr/share/doc/libxmlsec1-dev/examples/
>>> 2.- I define crypto library at the beginning of sign1.c: #define
>>> XMLSEC_CRYPTO_OPENSSL
>>> 3.- I compile with: gcc -I/usr/include/libxml2 -I/usr/include/xmlsec1
>>> -o sign1 -lxmlsec1 -lxmlsec1-openssl -lxml2 -lssl sign1.c
>>> 4.- I copy sign1-tmpl.xml template from /usr/share/doc/libxmlsec1-dev/examples/
>>> 5.- I generate a private key with openssl (no pass phrase)
>>> 6.- I run sign1
>>>
>>> I get this error:
>>>
>>>> ./sign1 sign1-tmpl.xml newkey.pem
>>> func=xmlSecDSigCtxProcessSignatureNode:file=xmldsig.c:line=463:obj=unknown:subj=dsigCtx->signValueNode
>>> == NULL:error=100:assertion:
>>> func=xmlSecDSigCtxSign:file=xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec
>>> library function failed:
>>> Error: signature failed
>>>
>>> However, xmlsec1 works fine from command line (xmlsec1 --sign
>>> --privkey-pem newkey.pem  --output signed.xml sign1-tmpl.xml)
>>>
>>> I tried with gnutls crypto library but this is not able to load a
>>> certificate generated by openssl:
>>>
>>>> ./sign1 sign1-tmpl.xml newkey.pem
>>> func=xmlSecGCryptAppKeyLoadMemory:file=app.c:line=232:obj=unknown:subj=xmlSecGCryptAppKeyLoadMemory:error=9:feature
>>> is not implemented:
>>> func=xmlSecGCryptAppKeyLoad:file=app.c:line=176:obj=unknown:subj=xmlSecGCryptAppKeyLoadMemory:error=1:xmlsec
>>> library function
>>> failed:filename=../simple_client/CA/demoCA/private/cakey.pem
>>> Error: failed to load private pem key from "newkey.pem"
>>>
>>> Thanks in advance for any help,
>>>
>>> Aestu
>> _______________________________________________
>> xmlsec mailing list
>> xmlsec at aleksey.com
>> http://www.aleksey.com/mailman/listinfo/xmlsec
>>


More information about the xmlsec mailing list