Code Monkey home page Code Monkey logo

Comments (11)

drbild avatar drbild commented on August 15, 2024

Thanks for the report.

What files are in C:\Python27\lib\site-packages\sslpsk\?

from sslpsk.

il023109 avatar il023109 commented on August 15, 2024

Thanks for the response.

looks like the two DLLs are copied to C:\Python27\sslpsk, after I move them to C:\Python27\lib\site-packages\sslpsk\ everything works

I also submitted a PR for some typo in client example.

from sslpsk.

drbild avatar drbild commented on August 15, 2024

Interesting. I don't have a Windows machine, so it may be awhile before I can debug the installation process.

from sslpsk.

kershner avatar kershner commented on August 15, 2024

Hey there! I'm currently trying to use sslpsk to interface with a new Philips Hue API which is using a DTLS handshake and PSKs. I believe I'm running into the same issue or at least something related to what @il023109 has posted about.

I'm running Windows 10 and Python 2.7.

Here's the code I'm using to try and test a DTLS handshake:

do_patch()  # PyDtls

s = socket(AF_INET, SOCK_DGRAM)
s.connect((BRIDGE_IP, STREAMING_PORT))
sock = sslpsk.wrap_socket(s,
                          psk=CLIENT_KEY,
                          hint=USERNAME,
                          ciphers='PSK-AES128-CBC-SHA')
sock.sendall('ping')
msg = sock.recv(4)
print 'Client received: %s' % msg

This will throw a Windows Application Error (0xC0000005) - Access Violation and crash Python.

When I dig into the Event Viewer logs, I'm told that this is the file that threw the error:
..\venv\lib\site-packages\sslpsk\SSLEAY32MD.dll

I think my install also had libeay32MD.dll and ssleay32MD.dll hanging out in a root /sslpsk directory, but they were also present in ..\lib\site-packages\sslpsk. I tried swapping those DLLs like @il023109 did, but same error.

Am I doing the socket code wrong, or does any of this give you any more insight into a possible issue? Thanks!

from sslpsk.

drbild avatar drbild commented on August 15, 2024

@kershner I've never tried DTLS with this library - that might not work at all, even on Linux. Can you try from a Linux VM, to see if your issues is actually Windows-specific?

from sslpsk.

AndreySV avatar AndreySV commented on August 15, 2024

Thanks for the response.

looks like the two DLLs are copied to C:\Python27\sslpsk, after I move them to C:\Python27\lib\site-packages\sslpsk\ everything works

I confirm this. Checked on Windows 10 with Python 2.7.13 and Python 2.7.16 (both 32bit). Dll were installed by pip into C:\Python27\sslpsk instead of C:\Python27\site-packages\sslpsk

from sslpsk.

pipje2001 avatar pipje2001 commented on August 15, 2024

@kershner Did you manage to find the solution? i am trying the same but i run into the same problem as you.

from sslpsk.

pipje2001 avatar pipje2001 commented on August 15, 2024

@drbild i tried this on an ubuntu vm but then i get the error "Segmentation fault (core dumped)" which is, if i understand correctly, the same as Windows Application Error (0xC0000005) - Access Violation, so i guess its not windows specific

Edit: Is it possible see what goes wrong inside SSLEAY32MD.dll? or is it impossible to know why it does this?

from sslpsk.

skboro avatar skboro commented on August 15, 2024

Interesting. I don't have a Windows machine, so it may be awhile before I can debug the installation process.

@drbild
The prebuilt DLLs that you are providing are in the wrong directory. I downloaded the wheel from https://pypi.org/project/sslpsk/#files. Then using 7zip, changed the DLLs location from sslpsk-1.0.0.data\data\sslpsk to sslpsk-1.0.0.data\data\Lib\site-packages\sslpsk\
With this change it works.

from sslpsk.

drbild avatar drbild commented on August 15, 2024

@skboro Thanks. Do you know if that location changed between Python 2.6 and Python 2.7?

from sslpsk.

skboro avatar skboro commented on August 15, 2024

@skboro Thanks. Do you know if that location changed between Python 2.6 and Python 2.7?

Sorry. no idea about that. Will let you know if I find anything.

from sslpsk.

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.