Commit Graph

6 Commits

Author SHA1 Message Date
William Casarin
4c490e1436 Merge 'impl linux credential storage' #115
From PR description:

See the test_basic() test in linux_key_storage.rs. I ran it successfully
on my MacOS machine and a linux VM. The BasicFileStorage impl just
stores each Keypair as a SerializableKeypair json object with the file
name as the public key hex in ~/.notedeck_credentials. The
SerializableKeypair uses the nip49 EncryptedSecretKey, but we just use
an empty string as the password for now.

The BasicFileStorage impl works in MacOS, but it only conditionally
compiles to linux for simplicity.

pub enum KeyStorageResponse<R> {
    Waiting,
    ReceivedResult(Result<R, KeyStorageError>),
}

This is used as a response so that it's possible for the storage impl to
be async, since secret_service is async. It seems that secret_service
would allow for a more robust linux key storage impl so I went ahead and
made the API compatible with an async impl.

* kernelkind (1):
      impl linux credential storage
2024-07-01 10:49:15 -07:00
kernelkind
2a47a66bbb impl linux credential storage
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-06-28 15:27:46 -04:00
William Casarin
31b2b5c950 initial refactor in preparation for routing
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-28 15:09:01 -07:00
kernelkind
adc1d25948 macos_key_storage: runner ignore tests
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-23 16:07:58 -04:00
kernelkind
0c88c63460 Conditionally compile MacOS key storage code
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-23 16:07:38 -04:00
kernelkind
9fad35485a Add MacOS key storage
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-21 19:50:05 -04:00