开发者

Statically linking OpenSSL with M2Crypto

开发者 https://www.devze.com 2023-02-05 08:52 出处:网络
M2Crypto uses the standard python setup.py [build|install] step to build and install the module.distutils/setuptools allows for some tweaking, but I can\'t seem to find a way to statically link Ope

M2Crypto uses the standard

python setup.py [build|install]

step to build and install the module. distutils/setuptools allows for some tweaking, but I can't seem to find a way to statically link OpenSSL into the module - there doesn't appear to be any facility to make this change.

Is there any way to build M2Crypto with a statically linked OpenSSL? (I am willing to bail on setup.py and do it by hand if that's the only way, would just like to query if anyone has 开发者_Go百科tackled this before I go and spend hours solving an already solved problem).


You need the static link libraries for OpenSSL (ssleay32, libeay32), which you might have to build yourself. On Windows you'll have to change setup.py to include some more libraries, e.g.:

-self.libraries = ['ssleay32', 'libeay32']
+self.libraries = ['ssleay32', 'libeay32', 'crypt32', 'user32', 'gdi32', 'kernel32', 'ws2_32', 'advapi32']

Works for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消