Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSLyze on Raspbian #57

Closed
dreschda opened this issue Feb 26, 2015 · 8 comments
Closed

SSLyze on Raspbian #57

dreschda opened this issue Feb 26, 2015 · 8 comments

Comments

@dreschda
Copy link

Literally no matter what I do I get the following error when trying to run sslyze:

ERROR: Could not import nassl Python module. Did you clone SSLyze's repo ?

I have built nassl on the system and copied it in to folder, I have downloaded every version of the sslyze I can find 32 bit and 64 bit and I still come up with this error.

These are the OS particulars:

Raspbian
Debian Wheezy
Version: February 2015
Release date: 2015-02-16
Kernel version: 3.18

Any help or push in the right direction would be appreciated.

@carstenhag
Copy link

Same issue on a ARMv7l server. There should be an ARM build/release 👍

Linux c1-10-1-4-39 3.17.0-119 #1 SMP Thu Nov 20 14:15:44 CET 2014 armv7l armv7l armv7l GNU/Linux

@nabla-c0d3
Copy link
Owner

Someone made a pull request for arm https://github.com/nabla-c0d3/nassl/pull/21/commits but maintaining compatibility with OS X, Linux and Windows is already pretty complex and time-consuming. I don't think I have time to add yet another platform.

@fabian-z
Copy link
Contributor

It seems to me if you let aside cross-compilation, the needed parts are already there since this should be only an architectural flavor of linux. You'll just have to replace OPENSSL_TARGET with 'linux-armv4' in buildAll_unix.py.

Afterwards, copy the built files manually from nassl/build/lib.linux-arm[..]/* to nassl/test/ and run the tests manually by doing "python2.7 -m unittest discover --pattern=*_Tests.py" in the test directory.
If you copy the directory nassl/test/nassl to the root directory of sslyze afterwards, it should be working fine for ARM (tested on Raspberry Pi Model B armv6h & Cubietruck armv7l, both running Arch Linux ARM).

There may be a better way to do this, but it in my tests it worked fine. If needed, I can provide explanatory build instructions.

That being said, if you just want a working, current build of sslyze 0.11 for ARM, you may use mine (working on both armv6 & armv7):
https://cloud.nf-design.eu/d/009a0e61bb/

@nabla-c0d3
Copy link
Owner

I would definitely merge a pull request on nassl to add support for arm in buildAll_unix; it sounds like it only requires switching the OPENSSL_TARGET ?

@fabian-z
Copy link
Contributor

fabian-z commented Jul 8, 2015

Sorry for the late answer - I think it should be enough to switch OPENSSL_TARGET to "linux-armv4" when running on ARM. I don't know enough about pythons architecture() and sys/platform to suggest a value to check for here, though.
Additionally, as pointed out above, the built files will be in a different directory, which should be the case for every different architecture anyway if I grasp the code correctly.
This would make building on the target platform feasible - I think cross-compilation would introduce to much overhead to the sslyze build.

@nabla-c0d3
Copy link
Owner

Closing this here as it is purely an nassl issue, specifically its C extension. I would be willing to merge a pull request on the nassl repo for compiling on an ARM platform; the build script is a lot cleaner now and it should be easy to add it.

@jepunband
Copy link

It seems to me if you let aside cross-compilation, the needed parts are already there since this should be only an architectural flavor of linux. You'll just have to replace OPENSSL_TARGET with 'linux-armv4' in buildAll_unix.py.

Afterwards, copy the built files manually from nassl/build/lib.linux-arm[..]/* to nassl/test/ and run the tests manually by doing "python2.7 -m unittest discover --pattern=*_Tests.py" in the test directory.
If you copy the directory nassl/test/nassl to the root directory of sslyze afterwards, it should be working fine for ARM (tested on Raspberry Pi Model B armv6h & Cubietruck armv7l, both running Arch Linux ARM).

There may be a better way to do this, but it in my tests it worked fine. If needed, I can provide explanatory build instructions.

That being said, if you just want a working, current build of sslyze 0.11 for ARM, you may use mine (working on both armv6 & armv7):
https://cloud.nf-design.eu/d/009a0e61bb/

Hi where can i download sslyze for arm7.. i have tried all other options to install it nothing works... need support .. thanks.

@wilco375
Copy link

wilco375 commented Apr 3, 2024

For those running into this issue trying to get sslyze working on Raspberry Pi, the following worked for me:

  1. Manually build nassl (this takes a while):
git clone https://github.com/nabla-c0d3/nassl.git
cd nassl
pip install --upgrade pip setuptools wheel
pip install -r requirements-dev.txt
invoke build.all
cd ..
  1. Clone sslyze and install dependencies
git clone https://github.com/nabla-c0d3/sslyze.git
cd sslyze
sed -i 's/"nassl/#"nassl/g' setup.py # Comment out nassl from pip dependencies
pip install -e . 
pip install -r requirements-dev.txt
cp -r ../nassl/nassl nassl
  1. Use sslyze
    python3 -m sslyze [...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants