Comments (11)
Thanks for the report.
What files are in C:\Python27\lib\site-packages\sslpsk\
?
from sslpsk.
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.
Interesting. I don't have a Windows machine, so it may be awhile before I can debug the installation process.
from sslpsk.
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.
@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.
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.
@kershner Did you manage to find the solution? i am trying the same but i run into the same problem as you.
from sslpsk.
@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.
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.
@skboro Thanks. Do you know if that location changed between Python 2.6 and Python 2.7?
from sslpsk.
@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)
- setting specific PSK cipher to use on client side. HOT 4
- how should key be specified HOT 3
- I ran into a problem when I ran the client code. HOT 2
- Can this be used for DTLS-PSK? HOT 3
- No PSK Ciphersuite in TLS handshake HOT 1
- NULL Cipher HOT 4
- Server: Elegant way to handle wrong client identity? HOT 3
- Support for Python 3.7.0? HOT 17
- failing to install packet HOT 1
- Support for binary hint and identity strings in Python 3 HOT 5
- Submit to stdlib? HOT 2
- Provide a SSLContext() API HOT 5
- openssl/ssl.h': No such file or directory HOT 1
- New release tag (> 1.0.0) HOT 1
- example client is not connecting to the server. HOT 1
- Failing to import openssl/ssl.h HOT 1
- [1.0.0] DeprecationWarning on Python 3.11
- Windows compiled binaries newer than 3.6? (was: how do we get the Windows binaries?)
- server hint empty sent
- [1.0.0] buils fails with Python >= 3.12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sslpsk.