You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a new C file newfile.c inside pycryptodome/src directory. Inside newfile.c, I created a new function newfunction() to be exported as a raw C API, which will be called inside the encrypt function of Crypto/Cipher/PKCS1_OAEP.py file as shown below:
result = _raw_newfile_lib.newfunction(<list of C-compatible arguments>)
Everything works till I try to invoke an external shared library function of OpenSSL inside newfunction(). The linker fails unable to locate this BN_CTX_new symbol, even after compiling and installing the updated pycryptodome binaries using -lcrypto. But I can successfuly invoke the BN_CTX_new() inside main() of newfile.c.
How can I get the pycryptodome's setup.py script to load and link such external shared library symbols inside C raw APIs?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I created a new C file newfile.c inside pycryptodome/src directory. Inside newfile.c, I created a new function newfunction() to be exported as a raw C API, which will be called inside the encrypt function of Crypto/Cipher/PKCS1_OAEP.py file as shown below:
result = _raw_newfile_lib.newfunction(<list of C-compatible arguments>)
Everything works till I try to invoke an external shared library function of OpenSSL inside newfunction(). The linker fails unable to locate this BN_CTX_new symbol, even after compiling and installing the updated pycryptodome binaries using -lcrypto. But I can successfuly invoke the BN_CTX_new() inside main() of newfile.c.
How can I get the pycryptodome's setup.py script to load and link such external shared library symbols inside C raw APIs?
Beta Was this translation helpful? Give feedback.
All reactions