Skip to content

Commit 16cb08b

Browse files
committed
release v0.1.0
1 parent e8e8fce commit 16cb08b

File tree

7 files changed

+37
-28
lines changed

7 files changed

+37
-28
lines changed

.github/workflows/build.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ jobs:
5353
strategy:
5454
fail-fast: false
5555
matrix:
56-
os: [ ubuntu-20.04, ubuntu-22.04, macos-12, macos-13, windows-2019, windows-2022 ]
56+
os: [
57+
ubuntu-20.04, ubuntu-22.04, macos-12, macos-13,
58+
# windows-2019, windows-2022
59+
]
5760
steps:
5861
- uses: actions/checkout@v2
5962
- name: Install rust stable
@@ -71,7 +74,7 @@ jobs:
7174
strategy:
7275
fail-fast: false
7376
matrix:
74-
toolchain: [ nightly, beta, stable, 1.75.0 ]
77+
toolchain: [ nightly, beta, stable, 1.69.0 ]
7578
steps:
7679
- uses: actions/checkout@v2
7780
- name: Install rust ${{ matrix.toolchain }}

.github/workflows/test.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ jobs:
2424
with:
2525
command: test
2626
args: --workspace --all-features --no-fail-fast
27-
wasm-testing:
28-
runs-on: ubuntu-latest
29-
steps:
30-
- uses: actions/checkout@v2
31-
- name: Install rust nightly
32-
uses: actions-rs/toolchain@v1
33-
with:
34-
toolchain: nightly
35-
override: true
36-
- uses: Swatinem/rust-cache@v2
37-
- uses: jetli/[email protected]
38-
- name: Add wasm32 target
39-
run: rustup target add wasm32-unknown-unknown
40-
- name: Test in headless Chrome
41-
run: wasm-pack test --headless --chrome
27+
# wasm-testing:
28+
# runs-on: ubuntu-latest
29+
# steps:
30+
# - uses: actions/checkout@v2
31+
# - name: Install rust nightly
32+
# uses: actions-rs/toolchain@v1
33+
# with:
34+
# toolchain: nightly
35+
# override: true
36+
# - uses: Swatinem/rust-cache@v2
37+
# - uses: jetli/[email protected]
38+
# - name: Add wasm32 target
39+
# run: rustup target add wasm32-unknown-unknown
40+
# - name: Test in headless Chrome
41+
# run: wasm-pack test --headless --chrome

Cargo.lock

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
[package]
22
name = "s2id"
33
version = "0.1.0"
4+
description = "Self-sovereign identity library and command-lie"
5+
keywords = ["did", "ssi", "identity", "pgp", "gpg"]
6+
categories = ["encoding", "value-formatting", "command-line-utilities"]
7+
readme = "README.md"
8+
authors = ["Dr. Maxim Orlovsky <[email protected]>"]
9+
homepage = "https://github.com/LNP-BP/ssi"
10+
repository = "https://github.com/LNP-BP/ssi"
411
edition = "2021"
12+
rust-version = "1.69.0"
13+
license = "Apache-2.0"
514

615
[lib]
716
name = "ssi"
@@ -23,14 +32,11 @@ shellexpand = { version = "3.1.0", optional = true }
2332
sha2 = "0.10.8"
2433
fluent-uri = "0.1.4"
2534
percent-encoding = "2.3.1"
26-
35+
# Cli-specific
2736
rpassword = { version = "7.3.1", optional = true }
2837
aes = { version = "0.8.4", optional = true }
2938
crossbeam-channel = { version = "0.5.12", optional = true }
3039

31-
mnemonic = "1.0.1"
32-
base64 = "0.22.0"
33-
3440
[features]
3541
default = ["cli"]
3642
cli = ["clap", "crossbeam-channel", "shellexpand", "rpassword", "aes"]

src/ed25519.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::{Algo, Chain, InvalidPubkey, InvalidSig, SsiPub, SsiSig};
3535
pub struct Ed25519Secret(pub(crate) SecretKey);
3636

3737
impl Ord for Ed25519Secret {
38-
fn cmp(&self, other: &Self) -> Ordering { self.0.as_slice().cmp(&other.0.as_slice()) }
38+
fn cmp(&self, other: &Self) -> Ordering { self.0.as_slice().cmp(other.0.as_slice()) }
3939
}
4040

4141
impl PartialOrd for Ed25519Secret {
@@ -107,7 +107,7 @@ impl SsiPub {
107107
pub fn verify_ed25519(self, msg: [u8; 32], sig: SsiSig) -> Result<(), InvalidSig> {
108108
let sig = Signature::from_slice(&sig.0).map_err(|_| InvalidSig::InvalidData)?;
109109
let pk = PublicKey::try_from(self)?;
110-
pk.verify(&msg, &sig).map_err(|err| {
110+
pk.verify(msg, &sig).map_err(|err| {
111111
eprintln!("{err}");
112112
InvalidSig::InvalidSig
113113
})

src/runtime.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// See the License for the specific language governing permissions and
2020
// limitations under the License.
2121

22-
pub const SSI_DIR: &'static str = "~/.ssi";
22+
pub const SSI_DIR: &str = "~/.ssi";
2323

2424
use std::collections::{BTreeSet, HashSet};
2525
use std::fs;
@@ -63,6 +63,7 @@ impl SsiRuntime {
6363
.read(true)
6464
.write(true)
6565
.create(true)
66+
.truncate(false)
6667
.open(path)?;
6768
let mut permissions = file.metadata()?.permissions();
6869
permissions.set_mode(0o600);
@@ -79,6 +80,7 @@ impl SsiRuntime {
7980
.read(true)
8081
.write(true)
8182
.create(true)
83+
.truncate(false)
8284
.open(path)?;
8385
let mut permissions = file.metadata()?.permissions();
8486
permissions.set_mode(0o600);

src/secret.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ impl SsiSecret {
178178
fn replace(&mut self, secret: &[u8]) {
179179
match self {
180180
SsiSecret::Bip340(_, sk) => {
181-
sk.0 = secp256k1::SecretKey::from_slice(&secret).expect("same size")
181+
sk.0 = secp256k1::SecretKey::from_slice(secret).expect("same size")
182182
}
183183
SsiSecret::Ed25519(_, sk) => {
184-
sk.0 = ec25519::SecretKey::from_slice(&secret).expect("same size")
184+
sk.0 = ec25519::SecretKey::from_slice(secret).expect("same size")
185185
}
186186
}
187187
}

0 commit comments

Comments
 (0)