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

Failure to authenticate against Prosody server #55

Open
N7DR opened this issue May 4, 2020 · 0 comments
Open

Failure to authenticate against Prosody server #55

N7DR opened this issue May 4, 2020 · 0 comments

Comments

@N7DR
Copy link

N7DR commented May 4, 2020

When I try to authenticate against a prosody server, the call to iks_start_tls() returns IKS_OK, but when I actually try to send data I see the following in the server log:

May 04 15:26:57 c2s564b6a802a40 debug TLS negotiation started for c2s_unauthed...
May 04 15:26:57 socket debug server.lua: attempting to start tls on tcp{client}: 0x564b6a7fefe8
May 04 15:26:57 socket debug server.lua: ssl handshake error: wrong version number
May 04 15:26:57 c2s564b6a802a40 info Client disconnected: ssl handshake error: wrong version number
May 04 15:26:57 c2s564b6a802a40 debug Destroying session for (unknown) ((unknown)@jabber.ipfonix.com): ssl handshake error: wrong version number
May 04 15:26:57 socket debug server.lua: closed client handler and removed socket from list

How can I force iksemel to give me more details about this failed negotiation? I can't find any documentation about forcing iksemel to use a particular TLS version, or even interrogating iksemel to discover which version is being used.


Is there a sample anywhere of code that uses iksemel to communicate a CHAT session over TLS? I basically used the code from iksroster.c, and I think the code is OK, but if there's an example anywhere of successfully chatting over TLS, that would be a good check to make sure I haven't done something stupid. Everything looks fine though, until this:

iks* x = iks_make_msg(IKS_TYPE_CHAT, dest.c_str(), msg.c_str());
cout << "After iks_make_msg" << endl;
int status = iks_send(_iks_parser_p, x);
cout << "After iks_send" << endl;

The first of the two messages is printed, the second never appears, so something bad is happening inside iks_send(), and it's never returning. Presumably that's where the TLS negotiation is failing, and the client disconnects, but never returns to tell me of the problem.
How do I investigate all this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant