[GH-ISSUE #1952] ERROR: ssl certificate doesn't exist: C:\Users\xxxx\AppData\Local\Barrier\SSL\Barrier.pem #1424

Open
opened 2026-05-05 07:49:53 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @411621 on GitHub (Jul 7, 2023).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1952

What happened?

On desktop and on laptop same error:
ERROR: ssl certificate doesn't exist: C:\Users\xxxx\AppData\Local\Barrier\SSL\Barrier.pem

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

Chocolately

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

Windows

What OS versions are you using?

22H2 19045.3155

Relevant log output

1] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem
[2023-07-07T15:26:47] INFO: OpenSSL 1.0.2l  25 May 2017
[2023-07-07T15:26:47] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem
[2023-07-07T15:27:03] INFO: OpenSSL 1.0.2l  25 May 2017
[2023-07-07T15:27:03] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem
[2023-07-07T15:27:19] INFO: OpenSSL 1.0.2l  25 May 2017
[2023-07-07T15:27:19] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem
[2023-07-07T15:27:35] INFO: OpenSSL 1.0.2l  25 May 2017
[2023-07-07T15:27:35] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem
[2023-07-07T15:27:51] INFO: OpenSSL 1.0.2l  25 May 2017
[2023-07-07T15:27:51] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem
server status: active

Any other information

Barrier.pem does not exist

Originally created by @411621 on GitHub (Jul 7, 2023). Original GitHub issue: https://github.com/debauchee/barrier/issues/1952 ### What happened? On desktop and on laptop same error: ERROR: ssl certificate doesn't exist: C:\Users\xxxx\AppData\Local\Barrier\SSL\Barrier.pem ### Version v2.4.0 ### Git commit hash (if applicable) _No response_ ### If applicable, where did you install Barrier from? Chocolately ### What OSes are you seeing the problem on? (Check all that apply) Windows ### What OS versions are you using? 22H2 19045.3155 ### Relevant log output ```shell 1] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem [2023-07-07T15:26:47] INFO: OpenSSL 1.0.2l 25 May 2017 [2023-07-07T15:26:47] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem [2023-07-07T15:27:03] INFO: OpenSSL 1.0.2l 25 May 2017 [2023-07-07T15:27:03] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem [2023-07-07T15:27:19] INFO: OpenSSL 1.0.2l 25 May 2017 [2023-07-07T15:27:19] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem [2023-07-07T15:27:35] INFO: OpenSSL 1.0.2l 25 May 2017 [2023-07-07T15:27:35] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem [2023-07-07T15:27:51] INFO: OpenSSL 1.0.2l 25 May 2017 [2023-07-07T15:27:51] ERROR: ssl certificate doesn't exist: C:\Users\Robert\AppData\Local\Barrier\SSL\Barrier.pem server status: active ``` ### Any other information Barrier.pem does not exist
Author
Owner

@mml commented on GitHub (Jul 8, 2023):

I am getting essentially the same message on Debian Bookworm running 2.4.0. Barrier worked fine on Debian bullseye (this was apparently 2.3.3).

<!-- gh-comment-id:1627507568 --> @mml commented on GitHub (Jul 8, 2023): I am getting essentially the same message on Debian Bookworm running 2.4.0. Barrier worked fine on Debian bullseye (this was apparently 2.3.3).
Author
Owner

@NaokiS28 commented on GitHub (Jul 14, 2023):

I was getting the same error on macOS Ventura and Windows 11. If its an acceptable workaround in your case, you can disable SSL by opening barrier's settings and unchecking "Use SSL". I did that on both machines and it works again. I understand its less secure but then in a private instance it's probably fine

<!-- gh-comment-id:1635644751 --> @NaokiS28 commented on GitHub (Jul 14, 2023): I was getting the same error on macOS Ventura and Windows 11. If its an acceptable workaround in your case, you can disable SSL by opening barrier's settings and unchecking "Use SSL". I did that on both machines and it works again. I understand its less secure but then in a private instance it's probably fine
Author
Owner

@tralves commented on GitHub (Jul 15, 2023):

Hi! I have SSL Fingerprint: Disabled both on MacOS and Win 11 and I have the same error.

<!-- gh-comment-id:1636571477 --> @tralves commented on GitHub (Jul 15, 2023): Hi! I have `SSL Fingerprint: Disabled` both on MacOS and Win 11 and I have the same error.
Author
Owner

@Pegase01 commented on GitHub (Jul 17, 2023):

same for me between 2 mac
Mac OS Monterey 12.6.7 et MAC OS Ventura 13.4.1 (ARM)
Not able to deactivate SSL but this should not be the problem.
Application Support/barrier/ssl doesn't contain any certificate

  • I have a failed to connect secure socket with SSL error occured
<!-- gh-comment-id:1637616025 --> @Pegase01 commented on GitHub (Jul 17, 2023): same for me between 2 mac Mac OS Monterey 12.6.7 et MAC OS Ventura 13.4.1 (ARM) Not able to deactivate SSL but this should not be the problem. Application Support/barrier/ssl doesn't contain any certificate + I have a failed to connect secure socket with SSL error occured
Author
Owner

@videoMonkey commented on GitHub (Aug 9, 2023):

I was experiencing this on my linux debian bookworm flatpak and my windows 10 computer. I dont know why, but I found some clues in this thread that led me to be able to resolve it on both platforms. On the arch wiki linked above it says

Note: Barrier v2.4.0 introduced a new keyfile format, which requires a SHA256 fingerprint and "v2:sha256:$fingerprint" formatted lines. For older versions, make sure the fingerprints are SHA1 and do not include a prefix.

and proceed to suggest the following commands

$ mkdir -p ~/.local/share/barrier/SSL/Fingerprints;
$ openssl req -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:4096 -keyout ~/.local/share/barrier/SSL/Barrier.pem -out ~/.local/share/barrier/SSL/Barrier.pem;
$ fingerprint=$(openssl x509 -fingerprint -sha256 -noout -in ~/.local/share/barrier/SSL/Barrier.pem | cut -d"=" -f2);
$ echo "v2:sha256:$fingerprint" > ~/.local/share/barrier/SSL/Fingerprints/Local.txt;

being on flatpak I had to change ~/.local/share/barrier/SSL/ to the one I found listed in the barrier logs in all the commands. I don't remember what it was at this point.

Windows was a little tricker, I had to download the openssl.cnf from this repo and copy it to C:\OpenSSL\ssl\openssl.cnf and then I ran the following command

& 'C:\Program Files\Barrier\openssl.exe' req -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:4096 -keyout "C:\Users\<user>\AppData\Local\Barrier\SSL\Barrier.pem" -out "C:\Users\<user>\AppData\Local\Barrier\SSL\Barrier.pem"

now things are working. I don't know why cert gen isn't working, in this release, that would be the real solution, but until then, this is what I did to get things going. I am using this at the office network with ~20 other users on the network and I don't want my input unencrypted.

<!-- gh-comment-id:1670932122 --> @videoMonkey commented on GitHub (Aug 9, 2023): I was experiencing this on my linux debian bookworm flatpak and my windows 10 computer. I dont know why, but I found some clues in this thread that led me to be able to resolve it on both platforms. On the [arch wiki](https://wiki.archlinux.org/title/Input_Leap#Set_up_encryption_on_server) linked above it says > Note: Barrier v2.4.0 introduced a new keyfile format, which requires a SHA256 fingerprint and "v2:sha256:$fingerprint" formatted lines. For older versions, make sure the fingerprints are SHA1 and do not include a prefix. and proceed to suggest the following commands ``` $ mkdir -p ~/.local/share/barrier/SSL/Fingerprints; $ openssl req -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:4096 -keyout ~/.local/share/barrier/SSL/Barrier.pem -out ~/.local/share/barrier/SSL/Barrier.pem; $ fingerprint=$(openssl x509 -fingerprint -sha256 -noout -in ~/.local/share/barrier/SSL/Barrier.pem | cut -d"=" -f2); $ echo "v2:sha256:$fingerprint" > ~/.local/share/barrier/SSL/Fingerprints/Local.txt; ``` being on flatpak I had to change ` ~/.local/share/barrier/SSL/` to the one I found listed in the barrier logs in all the commands. I don't remember what it was at this point. Windows was a little tricker, I had to download the `openssl.cnf ` from this repo and copy it to `C:\OpenSSL\ssl\openssl.cnf` and then I ran the following command `& 'C:\Program Files\Barrier\openssl.exe' req -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:4096 -keyout "C:\Users\<user>\AppData\Local\Barrier\SSL\Barrier.pem" -out "C:\Users\<user>\AppData\Local\Barrier\SSL\Barrier.pem"` now things are working. I don't know why cert gen isn't working, in this release, that would be the real solution, but until then, this is what I did to get things going. I am using this at the office network with ~20 other users on the network and I don't want my input unencrypted.
Author
Owner

@Amagnum commented on GitHub (Aug 26, 2023):

The above one works! Just make sure to write the commands correctly!

<!-- gh-comment-id:1694507947 --> @Amagnum commented on GitHub (Aug 26, 2023): The above one works! Just make sure to write the commands correctly!
Author
Owner

@Pegase01 commented on GitHub (Aug 28, 2023):

The above one works! Just make sure to write the commands correctly!

I do confirm : it works 👍 !
thanks @videoMonkey and @Amagnum

the only think was that barrier didn't accept to run anymore (but I migrated my OS from Monterey to Ventura in between) - it was just starting and disappearing.
I had to do another copy of the barrier.app from the downloaded .dmg to Application Folder and to follow this post : https://github.com/debauchee/barrier/issues/1945
Now SSL is enabled on my server (I should finish the test when I will my other computer back).

<!-- gh-comment-id:1695962433 --> @Pegase01 commented on GitHub (Aug 28, 2023): > The above one works! Just make sure to write the commands correctly! I do confirm : it works 👍 ! thanks @videoMonkey and @Amagnum the only think was that barrier didn't accept to run anymore (but I migrated my OS from Monterey to Ventura in between) - it was just starting and disappearing. I had to do another copy of the barrier.app from the downloaded .dmg to Application Folder and to follow this post : https://github.com/debauchee/barrier/issues/1945 Now SSL is enabled on my server (I should finish the test when I will my other computer back).
Author
Owner

@gbicann commented on GitHub (Sep 6, 2023):

A macOS workaround is here.

<!-- gh-comment-id:1708687856 --> @gbicann commented on GitHub (Sep 6, 2023): A macOS workaround is [here](https://github.com/debauchee/barrier/issues/1945#issuecomment-1708685845).
Author
Owner

@hi-ko commented on GitHub (Oct 18, 2023):

on windows just use ssl generate powershell script from https://github.com/debauchee/barrier/issues/1377#issuecomment-1593695744 to generate the missing ssl cert:

$cert = New-SelfSignedCertificate -DnsName Barrier -KeyExportPolicy Exportable

# Public key to Base64
$CertBase64 = [System.Convert]::ToBase64String($cert.RawData, 'InsertLineBreaks')

# Private key to Base64
$RSACng = [System.Security.Cryptography.X509Certificates.RSACertificateExtensions]::GetRSAPrivateKey($cert)
$KeyBytes = $RSACng.Key.Export([System.Security.Cryptography.CngKeyBlobFormat]::Pkcs8PrivateBlob)
$KeyBase64 = [System.Convert]::ToBase64String($KeyBytes, [System.Base64FormattingOptions]::InsertLineBreaks)

# Put it all together
$Pem = @"
-----BEGIN PRIVATE KEY-----
$KeyBase64
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
$CertBase64
-----END CERTIFICATE-----
"@

# Output to file
$Pem | Out-File -FilePath $env:LOCALAPPDATA\Barrier\SSL\Barrier.pem -Encoding Ascii
<!-- gh-comment-id:1769267518 --> @hi-ko commented on GitHub (Oct 18, 2023): on windows just use ssl generate powershell script from https://github.com/debauchee/barrier/issues/1377#issuecomment-1593695744 to generate the missing ssl cert: ```ps1 $cert = New-SelfSignedCertificate -DnsName Barrier -KeyExportPolicy Exportable # Public key to Base64 $CertBase64 = [System.Convert]::ToBase64String($cert.RawData, 'InsertLineBreaks') # Private key to Base64 $RSACng = [System.Security.Cryptography.X509Certificates.RSACertificateExtensions]::GetRSAPrivateKey($cert) $KeyBytes = $RSACng.Key.Export([System.Security.Cryptography.CngKeyBlobFormat]::Pkcs8PrivateBlob) $KeyBase64 = [System.Convert]::ToBase64String($KeyBytes, [System.Base64FormattingOptions]::InsertLineBreaks) # Put it all together $Pem = @" -----BEGIN PRIVATE KEY----- $KeyBase64 -----END PRIVATE KEY----- -----BEGIN CERTIFICATE----- $CertBase64 -----END CERTIFICATE----- "@ # Output to file $Pem | Out-File -FilePath $env:LOCALAPPDATA\Barrier\SSL\Barrier.pem -Encoding Ascii ```
Author
Owner

@jhgorse commented on GitHub (Oct 31, 2023):

Duplicate. #231

See this comment for the known fixes: https://github.com/debauchee/barrier/issues/231#issuecomment-1143791895

<!-- gh-comment-id:1787677085 --> @jhgorse commented on GitHub (Oct 31, 2023): Duplicate. #231 See this comment for the known fixes: https://github.com/debauchee/barrier/issues/231#issuecomment-1143791895
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#1424
No description provided.