You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great library! I'm trying to implement a simple client/server communication demo with OSCORE, and have already read the docs here: https://aiocoap.readthedocs.io/en/latest/stateofoscore.html. However, the docs only include instructions on using the CLIs rather than code examples, which would be very helpful if added to the docs.
The OSCORE context here is exactly the same with the docs, but I got an error No Object-Security option present. After some debugging, I believe the problem here is that the communication is using simple6 transport rather than the expected oscore transport.
I'm aware that simple6 is used for platforms like OSX so I switched to Linux, and it's still using udp6, not oscore. I've also tried setting request1.opt.object_security = b'', which resolves the above error but still using simple6 transport. In addition, I tried using the provided CLIs client and fileserver and got the same No Object-Security option present error with the same simple6 transport.
I wonder if there's anything wrong with the above code. I'll be happy to contribute a correct code example for simple client/server communication with OSCORE to the current docs.
Output of python3 -m aiocoap.cli.defaults
Python version: 3.8.9 (default, Feb 18 2022, 07:45:33)
[Clang 13.1.6 (clang-1316.0.21.2)]
aiocoap version: 0.4.7
Modules missing for subsystems:
dtls: everything there
oscore: everything there
linkheader: everything there
prettyprint: missing termcolor
Python platform: darwin
Default server transports: oscore:tinydtls:tcpserver:tcpclient:tlsserver:tlsclient:simple6:simplesocketserver
Selected server transports: oscore:tinydtls:tcpserver:tcpclient:tlsserver:tlsclient:simple6:simplesocketserver
Default client transports: oscore:tinydtls:tcpclient:tlsclient:simple6
Selected client transports: oscore:tinydtls:tcpclient:tlsclient:simple6
SO_REUSEPORT available (default, selected): True, True
The text was updated successfully, but these errors were encountered:
I don't know if this is the proper way but based on the code on contrib/oscore-plugtest I got OSCORE working using OscoreSiteWrapper. Using the following on the server in the above example.
Not sure how to check which transport is being used here but the network requests seem to be using OSCORE.
I'd also like to know if there is a suggested way of setting up a server 😄
Background
Thanks for the great library! I'm trying to implement a simple client/server communication demo with OSCORE, and have already read the docs here: https://aiocoap.readthedocs.io/en/latest/stateofoscore.html. However, the docs only include instructions on using the CLIs rather than code examples, which would be very helpful if added to the docs.
Attempts
So I tried to write the demo code for the client:
As well as the server:
The OSCORE context here is exactly the same with the docs, but I got an error
No Object-Security option present
. After some debugging, I believe the problem here is that the communication is usingsimple6
transport rather than the expectedoscore
transport.I'm aware that
simple6
is used for platforms like OSX so I switched to Linux, and it's still usingudp6
, notoscore
. I've also tried settingrequest1.opt.object_security = b''
, which resolves the above error but still usingsimple6
transport. In addition, I tried using the provided CLIsclient
andfileserver
and got the sameNo Object-Security option present
error with the samesimple6
transport.I wonder if there's anything wrong with the above code. I'll be happy to contribute a correct code example for simple client/server communication with OSCORE to the current docs.
Output of
python3 -m aiocoap.cli.defaults
The text was updated successfully, but these errors were encountered: