Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atclient_connection_send fails to send cram command to secondary server #426

Open
srieteja opened this issue Oct 14, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@srieteja
Copy link
Contributor

srieteja commented Oct 14, 2024

Describe the bug

I have been trying to send the cram command to the secondary server. The mbedtls_ssl_write (used by atclient_connection_send) somehow returns a valid int value but the cram command is not received on the server side. Then the program exits with 'mbedtls_ssl_read failed with exit code -26624' (26624 converted to hex is 0x6800).

Note that the rest of the commands before cram - fetching secondary address from root server and fetching challenge from secondary(from:@atsign) are executing as expected.

Steps to reproduce

  1. First I 'fetch the challenge from the server'
  2. Then I 'generate a digest with this challenge and cram secret'
  3. And then 'send the command cram:digest/r/n'
  4. This command does not reach the server and also the existing socket is terminated

Expected behavior

The command should go through to the server and the server should respond with 'data:success'

Screenshots

Note: The server is using my local time but the client seems to be using UTC

Server:
Screenshot 2024-10-15 at 5 08 28 AM

Client:
Screenshot 2024-10-15 at 5 09 04 AM

Additional context

No response

@srieteja srieteja added the bug Something isn't working label Oct 14, 2024
@srieteja srieteja self-assigned this Oct 14, 2024
@JeremyTubongbanua
Copy link
Member

Are you remembering to add \r\n at the end of the src buffer?
Also make sure not to send the null-terminator.

So sending cram:$digest\r\n is right, but cram:$digest\r\n\0 might give you that error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants