Commit Graph

3929 Commits

Author SHA1 Message Date
Povilas Kanapickas 220f9e8274 lib/common: Remove unused file 2021-11-01 04:29:51 +02:00
Povilas Kanapickas a2ca7e29f5 lib/common: Switch data directories to fs::path 2021-11-01 04:29:50 +02:00
Povilas Kanapickas 298980fa86 lib/common: Move DataDirectories to barrier namespace 2021-11-01 04:29:49 +02:00
Povilas Kanapickas 677612d342 lib/common: Replace PathUtilities::basename with barrier::fs equivalent 2021-11-01 04:29:48 +02:00
Povilas Kanapickas e7d936b5d7 lib/common: Replace PathUtilities::concat with barrier::fs equivalent 2021-11-01 04:29:47 +02:00
Povilas Kanapickas bcafdc6783 src/lib: Switch to ghc::filesystem in path utilities 2021-11-01 04:29:46 +02:00
Povilas Kanapickas a987605513 lib/io: Rename fstream.h to filesystem.h 2021-11-01 04:29:45 +02:00
Povilas Kanapickas 801a5a7084 ext: Add https://github.com/gulrak/filesystem for filesystem operations 2021-11-01 04:29:44 +02:00
Povilas Kanapickas 22ac14be8c
Merge pull request #1343 from p12tic/sha256-fingerprints
Add support for SHA256 fingerprints
2021-11-01 04:21:17 +02:00
Povilas Kanapickas a428b61c7d gui: Add support for SHA256 fingerprints
For the time being both SHA1 and SHA256 fingerprints will be shown in
the UI. This allows users to verify new connections between old and new
versions of Barrier. After the initial verification we use SHA256
fingerprints.

The issue has been reported by Matthias Gerstner <mgerstner@suse.de>.
2021-11-01 04:07:09 +02:00
Povilas Kanapickas c7e6fc6c7e gui: Set the size of the window to the size of the contents 2021-11-01 04:07:09 +02:00
Povilas Kanapickas b7757fbd68 lib/net: Implement a way to generate fingerprint randomart
The code has been copied from OpenSSH.
2021-11-01 04:07:09 +02:00
Povilas Kanapickas a238b27879 gui: Simplify isCertificateValid() 2021-11-01 04:07:09 +02:00
Povilas Kanapickas 7cced74119 lib/net: Use FingerprintData to represent fingerprints 2021-11-01 04:07:09 +02:00
Povilas Kanapickas 50534ecb43 lib/net: Use new FingerprintDatabase to handle fingerprints 2021-11-01 04:07:09 +02:00
Povilas Kanapickas be8ba0d132 gui: Use new FingerprintDatabase to handle fingerprints 2021-11-01 04:07:09 +02:00
Povilas Kanapickas 9cac96b4af lib/net: Implement a reusable fingerprint database 2021-11-01 04:07:09 +02:00
Povilas Kanapickas 3e71b468f6 lib: Remove useless empty constructors 2021-11-01 04:07:09 +02:00
Povilas Kanapickas 8f88dc2585 lib/base: Support colons in from_hex() 2021-11-01 04:07:09 +02:00
Povilas Kanapickas aa3afa9062 Use openssl library instead of CLI to generate certificates 2021-11-01 04:07:09 +02:00
Povilas Kanapickas dbf56a9375 gui: Use openssl library instead of CLI tool to generate fingerprints 2021-11-01 04:07:09 +02:00
Povilas Kanapickas cf732aba37 lib/io: Add a replacement for fopen() which works on Windows
fopen() does not correctly handle non-ASCII paths on Windows.
2021-11-01 04:07:09 +02:00
Povilas Kanapickas 089b8e4749 lib/net: Extract SSL fingerprint generation to reusable function 2021-11-01 03:19:47 +02:00
Povilas Kanapickas 85486927b3 lib/base: Implement pattern to execute something at function exit 2021-11-01 03:19:47 +02:00
Povilas Kanapickas cd7e731cb7 lib: Switch to std::vector<std::uint8_t> for fingerprint data 2021-11-01 03:19:47 +02:00
Povilas Kanapickas ef08470286 src/lib: Use standard std::vsnprintf() instead of hacking our own 2021-11-01 03:19:47 +02:00
Povilas Kanapickas b793675ef8 lib/net: Put secure utils into barrier namespace 2021-11-01 03:19:47 +02:00
Povilas Kanapickas a9b30951ce lib: Add utility function to convert from hex to binary 2021-11-01 03:19:47 +02:00
Povilas Kanapickas 767f3d37ec test: Extract common test utilities to separate file 2021-11-01 03:19:47 +02:00
Povilas Kanapickas 9d8e1faf59 test: Add test for format_ssl_fingerprint() 2021-11-01 03:19:47 +02:00
Povilas Kanapickas 96e0021572 lib/base: Make to_hex() easier to use 2021-11-01 03:19:47 +02:00
Povilas Kanapickas 7f71924a86 lib/net: Make format_ssl_fingerprint() easier to use 2021-11-01 03:19:47 +02:00
Povilas Kanapickas 0e406d4918 lib/net: Extract fingerprint formatting out of SecureSocket 2021-11-01 03:19:47 +02:00
Povilas Kanapickas bf667a429c
Merge pull request #1342 from p12tic/enable-encryption-by-default
Enable encryption by default
2021-11-01 03:12:32 +02:00
Povilas Kanapickas dba7b72195
Merge pull request #1341 from p12tic/azure-pipelines-fix-local-build
azure-pipelines: Use Invoke-WebRequest to download files
2021-11-01 03:06:48 +02:00
Povilas Kanapickas bfa8964305 Enable encryption by default 2021-11-01 03:00:09 +02:00
Dom Rodriguez fca18b63c5
Merge branch 'master' into testing/pr/Absolucy/macos
This merges #1162 into Barrier.

Thanks!

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2021-10-31 21:00:26 +00:00
Povilas Kanapickas a4ff91a991 azure-pipelines: Use Invoke-WebRequest to download files
When running System.Net.WebClient locally it results in a
non-descriptive "An exception occurred during a WebClient request" error
message. Invoke-WebRequest is an alternative that works so switch to
that.
2021-10-30 05:02:35 +03:00
Povilas Kanapickas fce7615e42
Merge pull request #1340 from p12tic/use-utf8
Use UTF8 internally and convert to UTF16 at the edge.
2021-10-30 01:22:09 +03:00
Povilas Kanapickas d24f368efe Correctly open files with non-ASCII paths on Windows
This fixes #976, fixes #974, fixes #444.

On Windows the standard stream open() functions expect bytes encoded in
current system encoding, not UTF8. Since we're dealing with UTF8
throughout the application this results in wrong paths being passed and
failure to open files. As a solution, we convert the paths to UTF16 via
the WCHAR character type and use the special Windows-specific overloads
of open() functions.
2021-10-30 01:03:09 +03:00
Povilas Kanapickas 8286c85dc0 lib/common/win32: Extract unicode_to_mb() to separate file 2021-10-30 01:03:09 +03:00
Povilas Kanapickas 15a955ff21 Revert "Use ansi codepage for internal multibyte strings on windows"
This reverts commit 402801e0a6.

We should use UTF8 throughout the application and convert to platform
encodings only at the edge. Otherwise it's not clear which data uses
which encoding and we result in extremele brittle system.
2021-10-30 01:03:09 +03:00
Dom Rodriguez 2877e6cb17
Pipelines: Remove Ubuntu 16.04 agent
Azure Pipelines no longer supports Ubuntu 16.04, so to remove the
error, this commit removes it from the cross-platform matrix.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2021-10-24 15:48:47 +01:00
Dom Rodriguez a53380de4f
Fix missing VM parameter, matrix doesn't select automatically
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2021-10-23 19:04:10 +01:00
Dom Rodriguez 907bcdcfea
Fix indentation on macOS matrix
Turns out VS Code handled the YAML indentation.... badly.

This should fix it.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2021-10-23 18:50:18 +01:00
Dom Rodriguez 59d076988f
Initial test of multi-macOS builds
This is an initial test of building Barrier for multiple macOS versions.

For:

- Big Sur
- Moja\ve
- Catalina

I think there's an indentation issue somewhere, but VS Code isn't
'seeing' it... let's hope this works.

If it does, we can proceed to merge.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2021-10-23 18:43:36 +01:00
Dom Rodriguez 4dfe1b1a73
Merge pull request #1304 from Ashark/wayland_warning
Add warning on wayland, fix #247
2021-10-23 16:19:43 +01:00
Andrew Shark 547a2dd413 Add warning on wayland, fix #247 2021-10-02 03:21:04 +03:00
Povilas Kanapickas dd8c2a1a38
Merge pull request #1297 from a1346054/fixes
Simple maintenance improvements
2021-09-24 01:12:36 +03:00
a1346054 872e78d342
Trim excess whitespace 2021-09-23 00:20:58 +00:00