[GH-ISSUE #1414] Not clear how to populate ~/.local/share/barrier/SSL/Fingerprints/TrustedClients.txt #1091

Open
opened 2026-05-05 07:28:11 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @kaihendry on GitHub (Nov 10, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1414

What happened?

The SSL fingerprint displayed on the client https://s.natalian.org/2021-11-10/client.png should be easily copy / pastable into ~/.local/share/barrier/SSL/Fingerprints/TrustedClients.txt but currently it's not. The formatting appears completely different!?

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

Homebrew on client, Arch on Host.

What OSes are you seeing the problem on? (Check all that apply)

Linux, macOS

What OS versions are you using?

Mac is using 11.6

Arch is latest

Relevant log output

No response

Any other information

No response

Originally created by @kaihendry on GitHub (Nov 10, 2021). Original GitHub issue: https://github.com/debauchee/barrier/issues/1414 ### What happened? The SSL fingerprint displayed on the client https://s.natalian.org/2021-11-10/client.png should be easily copy / pastable into ~/.local/share/barrier/SSL/Fingerprints/TrustedClients.txt but currently it's not. The formatting appears completely different!? ### Version v2.4.0 ### Git commit hash (if applicable) _No response_ ### If applicable, where did you install Barrier from? Homebrew on client, Arch on Host. ### What OSes are you seeing the problem on? (Check all that apply) Linux, macOS ### What OS versions are you using? Mac is using 11.6 Arch is latest ### Relevant log output _No response_ ### Any other information _No response_
Author
Owner

@CorePoint commented on GitHub (Nov 10, 2021):

I had the same problem. After digging a little bit I solved it.
You can see the correct format in ~/.local/share/barrier/SSL/Fingerprints/Local.txt .
My strings had no colons in the Local.txt but I left them in for the TrustedClients.txt and it still works.

So it should look something like this.

v2:sha256:YO:UR:ST:RI:NG

Also, the GUI shows the string with line breaks.
If you run the server in foreground there are none, so i used no line breaks.

<!-- gh-comment-id:965755687 --> @CorePoint commented on GitHub (Nov 10, 2021): I had the same problem. After digging a little bit I solved it. You can see the correct format in `~/.local/share/barrier/SSL/Fingerprints/Local.txt `. My strings had no colons in the Local.txt but I left them in for the TrustedClients.txt and it still works. So it should look something like this. `v2:sha256:YO:UR:ST:RI:NG` Also, the GUI shows the string with line breaks. If you run the server in foreground there are none, so i used no line breaks.
Author
Owner

@shawn-s-park commented on GitHub (Nov 12, 2021):

I installed Barrier 2.4.0 via snap on Ubuntu 21.10 and both formats are allowed.

v2:sha256:yourstring
v2:sha256:YO:UR:ST:RI:NG

<!-- gh-comment-id:966813406 --> @shawn-s-park commented on GitHub (Nov 12, 2021): I installed Barrier 2.4.0 via snap on Ubuntu 21.10 and both formats are allowed. v2:sha256:yourstring v2:sha256:YO:UR:ST:RI:NG
Author
Owner

@spoelstraethan commented on GitHub (Nov 29, 2021):

In synergy-core that this is based off of, setting the log level to DEBUG1 or DEBUG2 triggered a code path that correctly prompted on the client and server to display the fingerprint trust dialog and generated the device certificates correctly.

<!-- gh-comment-id:981918074 --> @spoelstraethan commented on GitHub (Nov 29, 2021): In synergy-core that this is based off of, setting the log level to DEBUG1 or DEBUG2 triggered a code path that correctly prompted on the client and server to display the fingerprint trust dialog and generated the device certificates correctly.
Author
Owner

@SoftwareSchlosser commented on GitHub (Jan 26, 2024):

I also could't get this to work. My servers GUI won't show up at all so I tried to paste the contents of the clients Local.txt into the servers TrustedClients.txt which looks like this:
v2:sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I digged into the source code and in src/lib/base/String.cpp in the function from_hex there's this check which failed for me:

        if (i + 2 > data.size()) {
            return {}; // uneven character count follows, it's unclear how to interpret it
        }

Found out this fails if the line endings are Windows style / CR LF.
Converting the file to Unix style / LF only fixes the problem!

<!-- gh-comment-id:1911909645 --> @SoftwareSchlosser commented on GitHub (Jan 26, 2024): I also could't get this to work. My servers GUI won't show up at all so I tried to paste the contents of the clients Local.txt into the servers TrustedClients.txt which looks like this: `v2:sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` I digged into the source code and in src/lib/base/String.cpp in the function from_hex there's this check which failed for me: ``` if (i + 2 > data.size()) { return {}; // uneven character count follows, it's unclear how to interpret it } ``` Found out this fails if the line endings are Windows style / CR LF. Converting the file to Unix style / LF only fixes the problem!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1091
No description provided.