45 Commits

Author SHA1 Message Date
3af6fffa46 Remove git_bindings
The only use of it left was to generate RSA keys, this has now been
implemented in the dart-go-git library, even though that's probably not
the right place for it.
2023-12-22 21:24:16 +01:00
a98b652036 git_setup: Split out Keygen code 2022-06-26 15:42:24 +02:00
8043a27b27 Allow SSH Key type to be configurable
Azure only supports RSA keys.

Fixes #633
2022-06-22 11:17:19 +02:00
1f1a06b4db Generate ed25519 keys on ios
It still doesn't work, but this is the first step.
2022-03-25 12:15:19 +01:00
2651ab633b ios: Use rsa keys
The ed25519 keys are failing and I cannot seem to figure it out.
2021-12-26 23:12:15 +01:00
fc2bd99214 Remove cryptography_flutter
Causes the macos build to fail
2021-12-01 16:10:55 +01:00
41567f4d50 Use ed25519 instead of rsa
Fixes #559
Fixes #260
2021-11-15 13:19:54 +01:00
cd9d9c7f18 Move ed25519 code into its own package
Ideally we should be moving this into its own repo, but I'm tired of
juggling lots of repos. I'm just going with the mono repo appraoch even
though this will make it harder for others to contribute.
2021-11-15 12:39:12 +01:00
7f6b154920 Add a test for ed25519 key serialization 2021-11-15 12:39:12 +01:00
2c0f5b4254 First implementation of ed25519
Still needs a proper test
2021-11-15 12:39:12 +01:00
ad84395455 Remove commented out code
RSA is deprecated in the latest OpenSSH version. This code will never be
useful
2021-11-08 00:49:34 +01:00
e1464f32c8 Change print to Log
Lets avoid using print as that doesn't get saved.
2021-10-13 11:36:05 +02:00
c4ef1f569b Use flutter_lint
Instead of picking lint values. This way I don't need to routinely
looking at extra lints to enable.
2021-09-21 15:42:13 +02:00
bf4f5f7045 Reuse++ 2021-09-16 11:30:28 +02:00
33a731a3d7 Add reuse licensing to files in lib 2021-09-15 13:06:43 +02:00
3a71cca202 Move logging code to its own folder 2021-07-30 14:39:13 +02:00
2505d00dfb Replace dart:io with universal_io
Platform from dart:io cannot be used on the web for reasons. And this
way we get a fake File/Directory class which we can use for atleast
running the web version, even if it won't work.
2021-07-30 11:39:26 +02:00
cb908f6da0 Remove unused file
I've given up generating the rsa key in dart. At some point I'll manage
to use ECC, and that's about it.
2021-06-19 12:33:40 +02:00
17c9413efb Use ssh-keygen to generate the ssh keys
At some point I'll figure out how to do this with Dart only code, but
till then lets just call the process.

GitJournal can also no longer run in a sandbox as it needs to access the
ssh-keygen executable.
2021-06-19 01:42:51 +02:00
3f7a5a213e keygen: Fix missing stuff
Improper commit
2021-06-09 11:26:19 +02:00
d57e62eaf0 ECC: Second attempt at encoding the public string 2021-06-08 00:04:55 +02:00
3a5aa38ddf Experiment: Try to generate ECC keys in Dart
I'm stuck at how to convert them between two formats.
2021-06-07 23:43:26 +02:00
5e5de203da NullSafety++ 2021-05-17 16:58:51 +02:00
d008f0d982 First version of dart migrate
Most of the files haven't been migrated. Lets work on this bit by bit
2021-04-10 22:18:35 +02:00
da66222724 Remove isolate dependency
It was used in the rsa key generation which is currently commented out.
Plus it hasn't been ported to null safety.
2021-04-06 13:18:12 +02:00
ebd225c3b5 Fix linter + auto format 2021-03-25 16:32:24 +01:00
78b25af47a Bump deps for Flutter 2
Also for handling the latest dart-git. This required disabling -
* ssh_key - Feature toggle (off by default) for generating the ssh key
in dart. This was causing problems.
* screenshots
* flutter_driver - used by screenshots

flutter_driver was nice to have as it was the only proper integration
test that we have.

Also, many of the tests currently fail because of problems with Sentry.
I prefer to fix those in another commit
2021-03-25 11:05:42 +01:00
f8ed88ad00 Rename keygen exp to not trigger flutter analyze 2021-01-19 19:16:41 +01:00
c91a5950f6 Android Store External: Let the user to pick a directory 2020-12-27 10:20:09 +01:00
75733c9246 Go back to generating the ssh keys via openssl
Instead of our custom dart code.

Fixes #351
Fixes #353
2020-12-26 11:52:58 +01:00
6767c79ed8 Add hints on how to serialize ed25519 key
Related to #260
2020-12-26 11:07:09 +01:00
1e57a816e7 keygen experiment: Try to generate an ed25519 key 2020-12-21 21:53:48 +01:00
568e9a407f RsaKeyPair: Improve isValid 2020-11-15 00:50:33 +01:00
f821fc73e1 SSH Private Key: Try formats supported by ssh_key 2020-11-15 00:49:42 +01:00
3b4c257afc Accept more Private Key formats 2020-11-15 00:35:49 +01:00
b9e81b7ae7 RsaKeyPair: Use the recommended size of 4096 2020-11-15 00:33:42 +01:00
a052467ebc Migrate from steel_crypt to crypton
SteelCrypt is deprecating asymetric key crypto functions and recommends
using crypton. This also simplifies our code.
2020-11-15 00:25:39 +01:00
ad787158c7 Log key generation time 2020-10-21 15:31:15 +02:00
98c92a3fe1 Handle new version of git_bindings
This changes the way the SSH keys are managed, they are no longer
managed by the git_bindings plugin and are instead just passed as
parameters. They are now saved in shared_prefs. This allows us to easily
have multiple ssh keys.

It also allows us to store the ssh keys in a more secure storage
location in the future.
2020-10-19 14:52:24 +02:00
9d00fdac06 Use import_sorter
flutter pub run import_sorter:main --no-comments

The code feels much cleaner
2020-07-24 12:43:28 +02:00
1570daa412 keygen: Try generating the key in dart instead of using git_bindings
This seems to work rather decently, but I'm not ready to put it into
production until it is tested quite thoroughly on lots of different
platforms.
2020-05-18 01:23:18 +02:00
cfcb1d33ed RsaKey: Add a method to generate the key in another isolate
This way we won't be blocking the main thread.
2020-05-03 15:39:39 +02:00
941a4c589a RsaKeyPair: Make sure we parse public keys correctly 2020-05-03 15:15:44 +02:00
67bfb4b1da RsaKeyPair: Try to parse ssh public key
Failed
2020-05-02 13:44:25 +02:00
e8343f1804 Add an RsaKeyPair class
It needs a bit more testing, but with this we should be able to drop the
dependency on openssh, and instead generate the key via dart.
2020-05-02 13:32:05 +02:00