-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
No ssl certificate on Windows 10 (v2.4) #1377
Comments
close ssl in the setting |
@p12tic Yes, I tried with version 2.4, it was just not present in the dropdown of the issue opener. |
Having exactly the same issue. Just tried installing barrier today for the first time on two Windows 10 machines and couldn't get it working. The log showed [2021-11-03T14:45:49] INFO: OpenSSL 1.0.2l 25 May 2017 After disabling SSL in the settings it finally started working. |
Yeah, I had the same issue. No SSL certificate is ever created. I went back to the previous version and didn't have any issues. This is on Windows 11 Home and connecting to a MacBook Pro M1 with MacOS Monterey. |
#231 (comment) workaround |
I had the same problem on MacOS Monterey. Solved it with the mentioned workaround. |
I just installed Barrier on GNU/Linux (Trisquel 9), compiled as indicated in the wiki, about says 2.4.0-release-4ed01413, I have exactly the same problem. The workaround indicated solved it, but only after I deactivated and reactivated SSL. |
Same issue as @cfarvidson above, also does not seem to be resolved by disabling SSL. The app reports that SSL fingerprinting is disabled, but the connection between client and server still doesn't work. Logs show SSL errors due to missing cert. |
Found this "issue" after struggling with the same problem for a while and found my own "workaround". Here's my story (aside from other trial-and-error steps, skipped for clarity), maybe this helps somebody:
|
There is a pull request for updating those instructions according to v2.4. Basically you will have to install OpenSSL separately now, to do the manual setup. As you found out, the OpenSSL config file barrier.conf is not included anymore, and also the version of the included openssl executable is quite old. This is related to Barrier no longer using it to generate certificate/fingerprint, but uses library functions instead. |
@p12tic : I wonder if the following line is causing cert not being created in v2.4, shouldn't it open the file in mode "w"? barrier/src/lib/net/SecureUtils.cpp Line 193 in 2db65f0
|
The suggested change has been merged to master, and it fixes my issue: Barrier now creates certificate and fingerprint on first launch on Windows 10. Beta build available here: https://dev.azure.com/debauchee/Barrier/_build/results?buildId=759&view=artifacts&pathAsName=false&type=publishedArtifacts |
Here is my experience for windows 10 users, and I know have a complete understanding I think of how to solve the issue. Steps: (How to get SSL working on windows)
This same step will have to be performed on macOS Monterey as well running on M1 processor with the latest updates and patches. Steps:
Notes:
|
Hello, Trying out barrier for the first time (I last used synergy in 2003-2004ish) My setup is a windows 10 computer driving a center monitor and two raspberry pi controlling two monitors stacked on top of each other on either side of the main monitor windows 10 version 2.4.0 compiled nov 2021 Started everything on all computers First got this error (Been trying this out since last week but didn't have time to try more things until today now that I found this thread !) I disabled SSL in server After reloading the server, the clients would connect/disconnect for no apparent reason So I went in the clients and also disabled SSL Seems to work --tangent 1 --tangent 2 Ah found it, in each "screen name" I checked "fix preserve focus" why is this not the default ? (oh, this doesn't work for the server apparently) --tangent 3 This is stretching it but, what do you guys use to export/drag windows on the server to client ? Does such a thing exist yet ? thanks |
Here is an easy workaround. Install version 2.3.2 first. Then run it and it will create the SSL certificate on windows. Once you verified it works, then download 2.4 and install it. If it gets the point where it says can't shutdown the application or something just click the button retry and that should work. I did it twice today and it worked. Have a great new years ! |
Thank you this worked for me! However now I am getting a communications error. ERROR: failed to launch, error: process immediately stopped |
|
I am using version 2.4. I put it to work just putting Barrier.pem generated at client on server. Just reload server and it is done. Check logs to see if it is working. |
This solved the issue. Thank you ! |
Thanks guys, I'm sorry to say, I did the download of the old version and it didn't work for me. So I abandoned the ship completely and swam over to input director. That application was easier to set up. Thanks for taking the time to answer everyone. |
The app should generate ask the user if they want to generate a self-signed certificate, and then create one and put it in the right place and put the reference to it in the config file. |
Could someone add this to the troubleshooting wiki (and more generally, the fact that the log can be read from the GUI)? |
Thank you, step 4. worked for me. |
Thank you very much. Step 4. is the important one, double slash "//". |
Unfortunately this has been broken for almost a year with no release (fixing this or otherwise). |
Yes, this is still completely broken. I tried loads of solutions suggested above, but none worked. Copying the SSL certificate to the server didn't work. Going back to version 2.3.2 worked in Windows, but it is impossible to install and configure on MacOS Ventura, and would probably be quite a headache to do in Linux (I didn't even bother trying that). I tried running that openssl command in MacOS, but it doesn't recommend the command openssl. Broken for a year. This looks like abandonware. I'll try Synergy. |
I'm curious, if you just put in a self signed .pen certificate, would it work ? |
Yes it will. I eventually discovered that I had made a clumsy copy-paste before my previous comment, which was why I failed to create an SSL certificate when I tried. You can in fact create an SSL certificate on the Barrier server which will make it work properly. I did this on a Mac, but I have read that this works on Linux as well, so I think it should work on Windows (maybe you have to install openssl first – that I don't know for certain). The command should be exactly the same. Only the path of the Barrier SSL folder in which you execute it will be different. This is what you do:
|
Hi, Is there any release scheduled? It's been a bit over a year since 2.4.0, and this bug and several others have PRs and/or are already fixed in master, it's just that master seems not to be automatedly built anymore. If not, I'll pursue other solutions. Thanks for any info you can provide! |
This did the trick for me |
To fix this for Windows installs, you can run the following with PowerShell as admin during (or after) install without any additional software requirements:
Thanks to @murphyne for making this work for the current user, and not requiring a username change! |
After too many tries, this worked for me to connect and generate ssl certificate and i could connect to other machine now. |
To get the script to work with any current user, you can replace Like this:
|
Thanks, works for me on Windows 11, I just installed openssl 3 instead of git, though |
I find that, if the intent isn't to have Git for Windows or OpenSSL or something else like that installed for other reasons (eg. on my firewalled-off-from-the-Internet Win7 "game console except not a console"), it's easiest to just install Barrier 2.3.4, let it generate the cert, and then upgrade to 2.4.0. |
@murphyne quick question, this needs to be run as admin in order to get the crypto commands, is $env in that context still mapped to current user? Or system? I'm not primarily a windows developer, so just wanted to make sure.
|
@haukened |
My first thought is to make a self elevating script, that gathers the current user, then elevates and re-launches with the user as a passed parameter. |
I did something similar. But it is still not a robust solution. $Command = {
$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-----
"@
# Ensure target folder exists
mkdir -p "$env:LOCALAPPDATA\Barrier\SSL" > $null
# Output to file
$Pem | Out-File -FilePath "$env:LOCALAPPDATA\Barrier\SSL\Barrier.pem" -Encoding Ascii
}
$CommandFormatted = $Command -replace '\$env:LOCALAPPDATA', $env:LOCALAPPDATA
$CommandEncoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($CommandFormatted))
Start-Process -Wait -WindowStyle Hidden -FilePath powershell.exe -Verb RunAs -ArgumentList "-EncodedCommand $CommandEncoded" |
I had this same issue on a fresh Windows 11 machine; the Powersheel script above solved the issue. |
openssl req -x509 -nodes -days 365 -subj //CN=Barrier -newkey rsa:4096 -keyout %appdata%..\Local\Barrier\SSLBarrier.pem -out %appdata%..\Local\Barrier\SSLBarrier.pem |
What happened?
When installing freshly Barrier on Windows 10, the ssl key is not created.
Version
v2.4
Git commit hash (if applicable)
No response
If applicable, where did you install Barrier from?
Github Releases. Version 2.4
What OSes are you seeing the problem on? (Check all that apply)
Windows
What OS versions are you using?
Server: Windows 10
Client: Macosx 12.0.1
Relevant log output
No response
Any other information
No response
The text was updated successfully, but these errors were encountered: