[xmlsec] Self-built Windows console app fails to sign
Aleksey Sanin
aleksey at aleksey.com
Wed Jun 25 08:35:24 PDT 2014
Great to know you figured it out! "static=yes with-dl=yes" is
an invalid combination on Windows (thanks to MSVC and how it
handles static variables).
Aleksey
On 6/25/14, 3:04 AM, Daniel Taylor wrote:
> Aleksey,
>
> Thanks for the help. By configuring "static=yes with-dl=no" I got a
> working xmlseca.exe, and I've also succeeded in building and running the
> "signing a template file" example too.
>
> Out of curiosity, I tried configuring "static=no with-dl=yes" instead,
> and got up with a working xmlsec.exe too, so there's nothing wrong there.
>
> I'm not familiar enough with C++ to know whether the default combination
> of "static=yes with-dl=yes" (as my first build used) is invalid or
> whether I just failed to make it work, but I'm quite happy with the
> results from "static=yes with-dl=no".
>
> If anyone asks, it is possible to build XmlSec with VS2013!
>
> Thanks again,
> Dan
>
>
> On 24 June 2014 17:20, Daniel Taylor <saidin at gmail.com
> <mailto:saidin at gmail.com>> wrote:
>
> Cheers Aleksey, I'll give that a try.
>
> On Jun 24, 2014 5:16 PM, "Aleksey Sanin" <aleksey at aleksey.com
> <mailto:aleksey at aleksey.com>> wrote:
>
> Hi Daniel,
>
> Unfortunately I don't have Windows dev environment anymore so it
> would
> be hard for me to repro your problem. However, from the error it
> looks
> like there is a problem with global constants. I would suggest
> to try
> to rebuild the library as static libraries and then link xmlsec
> statically.
>
> Aleksey
>
> On 6/24/14, 5:30 AM, Daniel Taylor wrote:
> > I've managed to compile libxml2-2.9.1, libxslt-1.1.28,
> openssl-1.0.1h
> > and xmlsec1-1.2.20 from source, using the nmake version that
> comes with
> > VS2013. The only tweaking I had to do was take out the
> /OPT:NOWIN98
> > references which no longer build.
> >
> > However, when I run a --sign command using libxmla.exe, I get the
> > following failure:
> >
> >
> func=xmlSecPtrListAdd:file=..\src\list.c:line=305:obj=unknown:subj=xmlSecPtrListIsValid(list):error=100:assertion:
> >
> func=xmlSecKeyDataIdsRegister:file=..\src\keysdata.c:line=110:obj=unknown:subj=xmlSecPtrListAdd:error=1:xmlsec
> > library function failed:dataId=aes
> >
> func=xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms:file=..\src\dl.c:line=614:obj=aes:subj=xmlSecKeyDataIdsRegister:error=1:xmlsec
> > library function failed:
> >
> func=xmlSecOpenSSLInit:file=..\src\openssl\crypto.c:line=331:obj=unknown:subj=xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms:error=1:xmlsec
> > library function failed:
> >
> func=xmlSecAppCryptoInit:file=..\apps\crypto.c:line=34:obj=unknown:subj=xmlSecCryptoInit:error=1:xmlsec
> > library function failed:
> > Error: xmlsec crypto intialization failed.
> > Error: initialization failed
> >
> > Each makefile (or its configuration) has the /MD flag set and
> each DLL
> > (and xmlseca.exe itself) has a dependency on MSVCR120.dll,
> matching the
> > MD flag.
> >
> > If it's not caused by a runtime mismatch, what else could be
> causing
> > this assert to fail?
> >
> > --
> > Dan Taylor
> >
> >
> > _______________________________________________
> > xmlsec mailing list
> > xmlsec at aleksey.com <mailto:xmlsec at aleksey.com>
> > http://www.aleksey.com/mailman/listinfo/xmlsec
> >
>
>
>
>
> --
> Dan Taylor
More information about the xmlsec
mailing list