crewjam / go-xmlsec

golang bindings for xmlsec
BSD 2-Clause "Simplified" License
26 stars 13 forks source link

Fix breakages on Fedora 25 #11

Closed timou closed 7 years ago

timou commented 7 years ago

On Fedora 25, tests fail with error

func=xmlSecCryptoAppInit:file=app.c:line=1423: obj=unknown:subj=cryptoAppInit:error=9: feature is not implemented: panic: xmlsec crypto initialization failed.

This appears to be because the pkg-config files set the wrong CFLAGS defines for cgo, which results in runtime breakage beacuse OpenSSL isn't properly loaded.

In order to fix how Fedora sets up these packages we want defines XMLSEC_CRYPTO_OPENSSL set, XMLSEC_CRYPTO_DYNAMIC_LOADING unset and we want to force linking with xmlsec1-openssl. This change puts these in cgo directives.

We also fix a test which now has some off-by-one line number changes in the error message.

crewjam commented 7 years ago

Thanks, Tim! 👍