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.
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.