0

I am writing a python script that imports ssl library. I need to create ssl socket. However, I find that I will need to use a modified version of openssl library. The author of the modified version told me that the underlying implementation of ssl module is using the openssl library. The author provided me with a file named ssllib.c. I searched the folder of the openssl library that I installed: openssl-0.9.8k_X64 but I could not find any ssl_lib.c file. Also, the author referring to openssl by openssl-1.0.1e which is another version than mine.

My question: How can I compile my python script with a modified version of openssl? Please, consider that I am using Windows x64 system and Python 2.7.

1 Answer 1

1

You'll need to install the modified OpenSSL. Python merely has bindings, which will then call the functions in the compiled OpenSSL libraries. If the modified OpenSSL library is installed and in your path completely replacing the original OpenSSL library, then Python will "use" it.

This assumes that the modified library is in fact compatible with the original OpenSSL.

On a side-note, using modified cryptographic libraries is a terrible idea from a security perspective.

Sign up to request clarification or add additional context in comments.

4 Comments

How to install the modified Openssl while all what I have is ssl_lib.c file? Where shall I place this? under C:/ or inside Python2.7 folders?
Unless the entire library is contained in this one file, you'll need the rest of the source to compile it. If the entire library is contained, you will need to compile it and place it into your PATH. That said, this story screams "scam". The likelihood of someone making a genuine implementation of SSL in a single file is close to zero. Either the source of the library is genuinely clueless, or he/she is trying to trick you into installing malware. I can't imagine a single scenario requiring a custom version of OpenSSL.
The author just added 2 functions to the openssl implementation. It is a research-related work so I exclude the idea of malware. I want to use his modified code because I need these 2 function also. The authors of the modified code did not publish it but send it to me when I requested. However, may be the change is done only in that file. But I do not know how to compile the library.
In that case, you need to get the source code of the exact version of OpenSSL that file is from, replace the file and then build the library (configure, make, make install). Unfortunately, this will be quite tricky on Windows and most likely require Cygwin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.