DTLS-Examples | Examples for DTLS via SCTP and UDP using OpenSSL | Encryption library
kandi X-RAY | DTLS-Examples Summary
kandi X-RAY | DTLS-Examples Summary
This repository contains examples for DTLS via SCTP and UDP. Each application in src can be used as client or server. Our examples are developed against the OpenSSL 1.1.x API.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DTLS-Examples
DTLS-Examples Key Features
DTLS-Examples Examples and Code Snippets
Community Discussions
Trending Discussions on DTLS-Examples
QUESTION
I have the following setup:
- ATECC608A
- mbedTLS (tested with 2.16.6 and 2.16.9)
- coreMQTT The certificate chain is the following: RootCA > SignerCA > DeviceCert. I've registered both RootCA and SignerCA as CAs in the AWS IoT Console
I setup the chain in mbedTLS with the following:
...ANSWER
Answered 2021-Jan-19 at 16:41Got it. I was retrieving the public key of my root certificate in the wrong slot in the ATECC (ouch). This was resulting in a slightly different signerCA to be generated by the atcacert_def_t
and the template at runtime.
I missed it because all my tooling in Python was fetching the right slot while the C version was not kept perfectly in sync.
QUESTION
Trying to write a server for DTLS that will currently just output the text that it receives. The working client is taken from https://github.com/stepheny/openssl-dtls-custom-bio and it sends and receives to its own server just fine.
However, when it sends to this server something strange is happening. Firstly the connection happens only sometimes, there seems to be no way to determine if the connection will start or not. Secondly, and that is even stranger the data is "delayed". One needs to send 6 messages for 1 message to arrive.
So this is the situation:
- Start the server.
- Start the client.
- Hope for connection.
- If connected type 5 messages in client to send to server, they are sent, but the server keeps having an error decoding them.
- Once you send the 6th message you can note that the 1st message arrives on server.
- Once you send the 7th, you will get the 2nd. Etc.
It should be noted that we are not talking about a time delay, there is no way to simply read 5 empty messages at the start of the server, the queue is empty. Only once the 6th message is sent is the queue populated with the 1st real message.
Code:
...ANSWER
Answered 2021-Jan-12 at 08:27In case somebody else will have a similar issue. The problem was that the wait between calling server's recv
function was 1 second. In that time client thought that server has not responded and began doing weird things. Lowering the delay solved the problem.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DTLS-Examples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page