[xmlsec] Segmentation Fault on Mac OSX 10.9 (Maverick)

Ryan Floyd ryandfloyd at gmail.com
Wed Jan 22 11:51:47 PST 2014

Hi all, 

I’ve been wrestling getting xmlsec1 to work properly on my MacBook Pro 13.3” Retina with 10.9 (Maverick). I installed Openssl 1.0.1e through Brew, and then changed the /usr/lib/libscrypto.dylib and /usr/lib/libssl.dylib and /usr/bin/openssl to point to the Brew openssl version:
> openssl version
OpenSSL 1.0.1e 11 Feb 2013

Then I changed the Brew formula for xmlsec1, adding the configure parameter to use openssl: "--with-openssl=/usr”

At the point the installation failed, looking for the static libcrypto.a. I manually linked the libscrypto.a library:
sudo ln -s /usr/local/Cellar/openssl/1.0.1e/lib/libcrypto.a /usr/lib/libcrypto.a

At this point, all seems fine, I can execute xmlsec1 —help, and the program executes. However, when I try to actually do anything useful with xmlsec1, it throws an Segmentation Fault (Error -11). From the debugger, this is the actual error:

> r --verify --pubkey-cert-pem ~/tmp/pubkey.pem --id-attr:ID 'urn:oasis:names:tc:SAML:2.0:assertion:Assertion' ~/tmp/verify.xml
> There is a running process, kill it and restart?: [Y/n] y
> Process 54301 launched: '/usr/bin/xmlsec1' (x86_64)
> Process 54301 stopped
> * thread #1: tid = 0x9df18c, 0x00000001000ae1f1 libxmlsec1-openssl.1.dylib`EVP_PKEY_CTX_free + 14, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
>    frame #0: 0x00000001000ae1f1 libxmlsec1-openssl.1.dylib`EVP_PKEY_CTX_free + 14
> libxmlsec1-openssl.1.dylib`EVP_PKEY_CTX_free + 14:
> -> 0x1000ae1f1:  movq   (%rbx), %rax
>   0x1000ae1f4:  testq  %rax, %rax
>   0x1000ae1f7:  je     0x1000ae207               ; EVP_PKEY_CTX_free + 36
>   0x1000ae1f9:  movq   24(%rax), %rax

(BTW, if I don’t specify with-openssl, it will use libgcrypt, and I still get the same error, here’s that stack)

> r --verify --pubkey-cert-pem ~/tmp/pubkey.pem --id-attr:ID 'urn:oasis:names:tc:SAML:2.0:assertion:Assertion' ~/tmp/verify.xml
> There is a running process, kill it and restart?: [Y/n] y
> Process 2982 launched: '/usr/bin/xmlsec1' (x86_64)
> Process 2982 stopped
> * thread #1: tid = 0x9c72b2, 0x000000010012777d libcrypto.1.0.0.dylib`EVP_PKEY_CTX_free + 14, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
>    frame #0: 0x000000010012777d libcrypto.1.0.0.dylib`EVP_PKEY_CTX_free + 14
> libcrypto.1.0.0.dylib`EVP_PKEY_CTX_free + 14:
> -> 0x10012777d:  movq   (%rbx), %rax
>   0x100127780:  testq  %rax, %rax
>   0x100127783:  je     0x100127793               ; EVP_PKEY_CTX_free + 36
>   0x100127785:  movq   24(%rax), %rax

On my production system, Ubuntu 12.04.3, I installed via apt, and everything works fine:
> sudo apt-get install xmlsec1

Any help is appreciated.

I’ve attached the verbose brew log.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20140122/5ffd184c/attachment-0002.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: brew_xmlsec1_install_5.txt
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20140122/5ffd184c/attachment-0001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20140122/5ffd184c/attachment-0003.html>

More information about the xmlsec mailing list