[tahoe-dev] Fwd: help needed from a C++ expert for pycryptopp
zooko
zooko at zooko.com
Tue Feb 10 06:58:53 PST 2009
Folks:
Hooray! I posted a plea for help on the Crypto++ mailing list, and
Geoff Beier responded by pointing out that the dlopen flags can be
dynamically changed, from Python. See appended message from him.
Before committing this fix, I would like to have builders for
pycryptopp which are red because of this issue. I guess that means
they have libcryptopp.so installed in the system, and the buildmaster
configures them with --disable-embedded-cryptopp .
Thanks a lot, Geoff Beier!
Regards,
Zooko
Begin forwarded message:
> From: Geoff Beier <geoffbeier at gmail.com>
> Date: February 10, 2009 7:27:50 AM MST
> To: zooko <zooko at zooko.com>
> Cc: "Crypto++ Users" <cryptopp-users at googlegroups.com>
> Subject: Re: help needed from a C++ expert for pycryptopp
>
> Changing test_aes.py to load crypto++ differently does the job on
> my ubuntu amd64 machine. You can probably find a suitable place in
> the python portion of your library to do this; I'm no python expert ;)
>
> Change:
> from pycryptopp.cipher import aes
>
> to:
> import sys, ctypes
> flags = sys.getdlopenflags()
> sys.setdlopenflags(flags|ctypes.RTLD_GLOBAL)
> from pycryptopp.cipher import aes
> sys.setdlopenflags(flags)
>
> and all the tests pass.
>
> HTH,
>
> Geoff
More information about the tahoe-dev
mailing list