Skip to content
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

CTAP library move #602

Merged
merged 3 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/cargo_fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
submodules: "true"
- name: Install Rust toolchain
run: rustup show
- name: Install nightly toolchain
run: rustup toolchain install nightly
- name: Install nightly cargo fmt
run: rustup component add rustfmt --toolchain nightly
- uses: actions/setup-python@v1
with:
python-version: 3.7
Expand All @@ -34,41 +38,54 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
args: -- --check

- name: Cargo format fuzz/
- name: Cargo format libraries/opensk
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: --manifest-path fuzz/Cargo.toml --all -- --check
args: --manifest-path libraries/opensk/Cargo.toml --all -- --check
kaczmarczyck marked this conversation as resolved.
Show resolved Hide resolved

- name: Cargo format libraries/opensk/fuzz
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: --manifest-path libraries/opensk/fuzz/Cargo.toml --all -- --check

- name: Cargo format libraries/cbor
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: --manifest-path libraries/cbor/Cargo.toml --all -- --check

- name: Cargo format libraries/cbor/fuzz
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: --manifest-path libraries/cbor/fuzz/Cargo.toml --all -- --check

- name: Cargo format libraries/crypto
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: --manifest-path libraries/crypto/Cargo.toml --all -- --check

- name: Cargo format libraries/persistent_store
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: --manifest-path libraries/persistent_store/Cargo.toml --all -- --check

- name: Cargo format tools/heapviz
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: --manifest-path tools/heapviz/Cargo.toml --all -- --check

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cargo_fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
toolchain: nightly
submodules: "true"
- name: Install Rust toolchain
run: rustup show
Expand All @@ -25,7 +26,7 @@ jobs:
run: ./fuzzing_setup.sh

- name: Cargo fuzz build
run: cargo fuzz build
run: cd libraries/opensk && cargo fuzz build && cd ../..
kaczmarczyck marked this conversation as resolved.
Show resolved Hide resolved
- name: Cargo fuzz build (libraries/cbor)
run: cd libraries/cbor && cargo fuzz build && cd ../..
- name: Cargo fuzz build (libraries/persistent_store)
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/crypto_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ jobs:
- name: Unit testing of crypto library (release mode)
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: test
args: --manifest-path libraries/crypto/Cargo.toml --release --features std

- name: Unit testing of crypto library (debug mode)
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: test
args: --manifest-path libraries/crypto/Cargo.toml --features std
16 changes: 10 additions & 6 deletions .github/workflows/opensk_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,28 @@ jobs:
- name: Unit testing of CTAP2 (release mode)
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: test
args: --release --features std
args: --manifest-path libraries/opensk/Cargo.toml --release --features std

- name: Unit testing of CTAP2 (debug mode)
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: test
args: --features std
args: --manifest-path libraries/opensk/Cargo.toml --features std

- name: Unit testing of CTAP2 (release mode + CTAP1)
- name: Unit testing of CTAP2 (release mode + all features)
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: test
args: --release --features std,with_ctap1
args: --manifest-path libraries/opensk/Cargo.toml --release --features std,debug_ctap,with_ctap1,vendor_hid,ed25519

- name: Unit testing of CTAP2 (debug mode + CTAP1)
- name: Unit testing of CTAP2 (debug mode + all features)
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: test
args: --features std,with_ctap1
args: --manifest-path libraries/opensk/Cargo.toml --features std,debug_ctap,with_ctap1,vendor_hid,ed25519

4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
fuzz/artifacts
fuzz/corpus
fuzz/coverage
libraries/**/Cargo.lock
target/

# Local installation of elf2tab.
Expand Down
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ edition = "2018"
libtock_core = { path = "third_party/libtock-rs/core" }
libtock_drivers = { path = "third_party/libtock-drivers" }
lang_items = { path = "third_party/lang-items" }
opensk = { path = "libraries/opensk" }
sk-cbor = { path = "libraries/cbor" }
crypto = { path = "libraries/crypto" }
rng256 = { path = "libraries/rng256" }
Expand All @@ -27,15 +28,14 @@ ed25519-compact = { version = "1", default-features = false, optional = true }

[features]
debug_allocations = ["lang_items/debug_allocations"]
debug_ctap = ["libtock_drivers/debug_ctap"]
debug_ctap = ["libtock_drivers/debug_ctap", "opensk/debug_ctap"]
panic_console = ["lang_items/panic_console"]
std = ["crypto/std", "lang_items/std", "persistent_store/std", "rng256/std", "rand"]
std = ["crypto/std", "lang_items/std", "persistent_store/std", "rng256/std", "rand", "opensk/std"]
verbose = ["debug_ctap", "libtock_drivers/verbose_usb"]
with_ctap1 = ["crypto/with_ctap1"]
with_ctap1 = ["crypto/with_ctap1", "opensk/with_ctap1"]
with_nfc = ["libtock_drivers/with_nfc"]
vendor_hid = []
fuzz = ["arbitrary", "std"]
ed25519 = ["ed25519-compact"]
vendor_hid = ["opensk/vendor_hid"]
ed25519 = ["ed25519-compact", "opensk/ed25519"]

[dev-dependencies]
enum-iterator = "0.6.0"
Expand Down
17 changes: 0 additions & 17 deletions fuzz/fuzz_helper/Cargo.toml

This file was deleted.

7 changes: 0 additions & 7 deletions libraries/cbor/Cargo.lock

This file was deleted.

3 changes: 3 additions & 0 deletions libraries/cbor/fuzz/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/artifacts/
/corpus/
/target/
Loading