Giter Club home page Giter Club logo

Comments (4)

gavinwahl avatar gavinwahl commented on August 9, 2024

That's strange; I have never seen that error. Is it reproducible every time?

from django-u2f.

mjjohnson avatar mjjohnson commented on August 9, 2024

Ah, I think I tracked it down. It was my problem, nothing to do with your project. I set up a fresh Ubuntu Server 14.04 VM and the test project worked perfectly. After doing some searching online, it looked like the version of OpenSSL I have on my system might have been the issue, and compiling the most recent version of that (and recompiling M2Crypto) fixed my issues. (I'm on a Mac, running OS X 10.9 Mavericks.)

For anyone else who runs into this issue while trying to run this (or any other M2Crypto-related issues) on Mac, here's what I did to solve it. (Note: I tried the homebrew version of openssl, but for some reason it wouldn't work at all with M2Crypto, so I uninstalled it and did the following instead.)

I downloaded the latest OpenSSL and compiled it manually:

# Build 32-bit version
./config --prefix=$HOME
make && make install
# Build 64-bit version (need both versions for M2Crypto)
make clean && make dclean
./Configure darwin64-x86_64-cc --prefix=$HOME/ssl-x64
make && make install

Then I built "fat" libraries that combined the 32-bit and 64-bit versions:

lipo -create lib/libcrypto.a ssl-x64/lib/libcrypto.a -output lib/libcrypto.a
lipo -create lib/libssl.a ssl-x64/lib/libssl.a -output lib/libssl.a

Then I downloaded, compiled, and installed M2Crypto manually:

python setup.py build build_ext --openssl=$HOME
python setup.py install build_ext --openssl=$HOME

Then, when I followed the rest of your instructions (pip install -e ., etc.), and fired up the server, everything worked. (The reason it worked when I ran it "manually" before is that I was running u2f_server.py on a Linux box while the simple HTML was on my local machine, to avoid port conflicts...which is an obvious mistake in hindsight.)

Sources: I cobbled together this solution from here and here.

from django-u2f.

gavinwahl avatar gavinwahl commented on August 9, 2024

Great, glad you figured it out. Looks like M2Crypto could use some better error reporting? It seems like you can't tell the difference between an invalid certificate and an invalid install of the package?

from django-u2f.

mjjohnson avatar mjjohnson commented on August 9, 2024

Something like that... Maybe the issue had to do with the CAs that were installed, or something? Or maybe some defaults changed? (Just guessing here.) On top of that, I'm not completely sure which version of OpenSSL was getting used by default: which openssl returns the version bundled with Postgres.app, so it may well have been that one getting used rather than the one installed with OS X 10.9.

from django-u2f.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.