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
[BUG] SRT return SRT_REJ_UNSECURED on BADSECRET #2620
Comments
Weird. I don't have any similar log messages even if I use non-blocking mode. I am also using the callback registerred by
The code:
I modified it now to display the other data, this is not the official version, but this was also displayed there. What exactly are you trying to do? |
I only have the following log FA enabled: 0x846 |
And the listening peer has SRTO_ENFORCEDENCRYPTION=false |
With ENFORCEDENCRYPTION=false it also doesn't report any error - it allows for connection without problems. This is also the intended version, AFAIK. Just in case of BADSECRET it won't be able to send anything in any direction. I can see this thing in my logs in this case:
|
It allows for connection? do you have a bad passphrase with ENFORCEDENCRYPTION in local caller? |
As long as you set this flag on BOTH endpoints, yes. This is also consistent with the old behavior from before this option was introduced. If I have enforcedencryption=no on the listener, but yes on the caller, I have a rejection this time:
And in such a case I have indeed the same that you:
But it's also an intended behavior. This time you have a listener that allows in the unsecure client and actually ACCEPTS the connection. But the caller realizes that it doesn't want unsecure connection and closes the connection itself. BADSECRET is a rejection caused on the listener socket and passed this to the caller, so the caller reports the rejection as received from the listener. UNSECURE is a local error that the caller has caused itself, at least in this case. This error may be also reported from the listener in case when the listener has no password set and it has enforcedencryption=yes. Currently in the code these situation can't be really distinguished. I'm not sure whether this situation with unsecure listener=enforced-encryption and caller=relaxed-encryption the call should be rejected in case when the caller has set a password, maybe this behavior should be actually changed. |
SRT has a reject reason for BADSECRET (
SRT_REJ_BADSECRET
) butsrt_getrejecreason()
returnsSRT_REJ_UNSECURE
in that case.caller,
srt_getrejectreason()
called from connect callback.The text was updated successfully, but these errors were encountered: