-
Notifications
You must be signed in to change notification settings - Fork 445
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
tls: connect: error #2119
Comments
More details here: https://github.com/baresip/baresip/wiki/Guidelines-for-reporting-Issues |
note: https://github.com/baresip/re/blob/main/src/tls/openssl/tls_tcp.c#L146 We could add a call to |
I would appreciate if you could add this call. :-) |
could you also try with Wireshark and look for any TLS errors ? The code in tls_tcp should be easy to change, just look at tls_accept for an example. |
hi, any updates here ? |
currently not. I keep trying. |
Now I got 2 data sets, captured with tcpdump
I attached the two captured files, hope that helps. |
The Wireshark trace did not reveal any details... Can you please test if TLS works from your client:
Also please share with us the full config file and the full log. NOTE: If TLS does not work, you can try TCP by adding this to accounts:
|
with the first command I get this:
The second hint doesn't work either :-( |
Well, I tried it with a different account on a different provider, which seems to work. |
I found out that Armbian
OpenSuse
|
I made a new full tcpdump and I found the following error:
hope that helps finally |
The error is coming from the client, and does not reveal any details. If would suggest adding the debug code to tls_connect and try to see what is going on. |
can you please try this patch for re: diff --git a/src/tls/openssl/tls_tcp.c b/src/tls/openssl/tls_tcp.c
index c3071ce..410d68a 100644
--- a/src/tls/openssl/tls_tcp.c
+++ b/src/tls/openssl/tls_tcp.c
@@ -140,15 +140,17 @@ static int tls_connect(struct tls_conn *tc)
ERR_clear_error();
- if (tls_get_session_reuse(tc))
+ if (tls_get_session_reuse(tc)) {
+ DEBUG_NOTICE("tls_reuse_session\n");
(void) tls_reuse_session(tc);
+ }
+
+ ERR_clear_error();
r = SSL_connect(tc->ssl);
if (r <= 0) {
const int ssl_err = SSL_get_error(tc->ssl, r);
- ERR_clear_error();
-
switch (ssl_err) {
case SSL_ERROR_WANT_READ:
@@ -157,9 +159,12 @@ static int tls_connect(struct tls_conn *tc)
default:
DEBUG_WARNING("connect: error (r=%d, ssl_err=%d)\n",
r, ssl_err);
+ tls_flush_error();
err = EPROTO;
break;
}
+
+ ERR_clear_error();
}
return err; Please try again with latest version of re,rem,baresip Please also share the full config file. |
I'm sorry, I need a little help to implement that patch. |
AlfredoCubitos writes:
I'm sorry, I need a little help to implement that patch.
I never did this before.
I cannot find ` src/tls/openssl/tls_tcp.c b/src/tls/openssl/tls_tcp.c`
It is in re source.
|
Take the above patch and save it as e.g. foo.diff Go to the libre source code, apply the patch and rebuild:
Then go back to baresip and try again. Please pay attention to any warnings. |
well, its seems that the diff above is not valid anymore.
|
could be some whitespace difference. Please try this:
|
you can also try try this branch from re: |
ok, I changed the code manually.
running
:-( I assume we need a better debug output during the registration process. So somewhere in |
I see that you are using version 2.7.0 -- You need to use latest version from GIT. Can you please also share your config file and create a new setup from scratch ?
|
perhaps there is something wrong with the Server's TLS certificate:
There are also some config items to play around with:
|
Can you also paste the output from this command:
|
ok, I managed to run the git version.
|
The problem is the combination of the local OpenSSL version/config, The problem is not in baresip. Please read online resources about how to fix or workaround the problem |
aaaah, THANK YOU !!!! |
May I ask, how did you deal with it? |
Hi,
I'm trying to run baresip on armbian 22.05.3 Bullseye and I receive always this error when connecting to my voip provider:
I tried version 1.0 and I compiled the current version 2.7.0.
Always the same error.
When I trying it on my Linux box with the same account and config everything works fine.
Any ideas whats wrong?
The text was updated successfully, but these errors were encountered: