Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Fixes workflows and more prominent version info (#133)
Browse files Browse the repository at this point in the history
* Fixes workflows and more prominent version info

Since CTAP 2.1 didn't get any updates in a while, I made it more obvious in the
README.

* Latest OS for workflows

* new version of clang format

* use latest clang-format version
  • Loading branch information
kaczmarczyck authored Jul 11, 2023
1 parent 1afd50b commit d8a9649
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bazel_test_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
bazel_test:
name: bazel test all (Linux)
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bazel_test_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
bazel_test:
name: bazel test all (MacOS)
runs-on: macos-12
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ on:
jobs:
clang_format:
name: clang-format-show-diff
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install clang-format-9
- name: Install clang-format-15
run: |
sudo apt install clang-format-9
alias clang-format=clang-format-9
clang-format --version
sudo apt install clang-format-15
- name: Run clang-format
run: |
./clang-format-show-diff.sh
Expand Down
4 changes: 2 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ cc_library(
"@com_google_absl//absl/types:optional",
"@com_google_glog//:glog",
] + select({
"@bazel_tools//src/conditions:darwin": ["@com_github_kaczmarczyck_hidapi//:hidapi-osx"],
"@bazel_tools//src/conditions:windows": ["@com_github_kaczmarczyck_hidapi//:hidapi-libusb"],
"@platforms//os:macos": ["@com_github_kaczmarczyck_hidapi//:hidapi-osx"],
"@platforms//os:windows": ["@com_github_kaczmarczyck_hidapi//:hidapi-libusb"],
"//conditions:default": ["@com_github_kaczmarczyck_hidapi//:hidapi-linux"],
}),
)
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## CTAP2 test tool

The test suite intents to make it easier for developers to find bugs in their
CTAP2 implementation.
CTAP2 implementation. It supports CTAP 2.0 only, see
[supported features](#supported-features).

### Disclaimer
Those tests reflect the author's interpretation of the specification. It is not
Expand Down Expand Up @@ -50,9 +51,7 @@ security key multiple times, to test various features.
### Supported features

At the moment, we only support USB HID as a transport. We test the commands from
[CTAP 2.0](https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.pdf),
but plan to add tests for supported extensions and
[CTAP 2.1](https://fidoalliance.org/specs/fido2/fido-client-to-authenticator-protocol-v2.1-rd-20191217.html).
[CTAP 2.0](https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.pdf).
The security key must support resident keys and user presence. Also, security
keys with displays are untested so far.

Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ git_repository(

git_repository(
name = "com_google_googletest",
commit = "23b2a3b1cf803999fb38175f6e9e038a4495c8a5",
commit = "b796f7d44681514f58a683a3a71ff17c94edb0c1",
remote = "https://github.com/google/googletest",
)

Expand Down
6 changes: 2 additions & 4 deletions clang-format-apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@

# Runs clang-format and apply changes.

alias clang-format=clang-format-9

clang-format --version
set -e

# Recursively covers the same paths as clang-format-show-diff.sh. Breaks on
# whitespace.
for FILE in $(find . -name '*.h' -o -name '*.cc' -o \
-path './third_party' -prune -false); do
# Run clang-format, then append a newline.
clang-format --verbose -i "${FILE}"
clang-format-15 --verbose -i "${FILE}"
echo "" >> "${FILE}"
done

6 changes: 2 additions & 4 deletions clang-format-show-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

# Runs clang-format and show diff.

alias clang-format=clang-format-9

clang-format --version
set -e

EXIT_CODE=0

Expand All @@ -25,7 +23,7 @@ EXIT_CODE=0
for FILE in $(find . -name '*.h' -o -name '*.cc' -o \
-path './third_party' -prune -false); do
# Run clang-format, then compare the output.
clang-format --verbose "${FILE}" |
clang-format-15 --verbose "${FILE}" |
{ cat ; echo "" ; } |
git diff --no-index --exit-code -- "${FILE}" -
# Indicate formatting issues through the script exit code.
Expand Down
1 change: 1 addition & 0 deletions src/fuzzing/mutator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#ifndef FUZZING_MUTATOR_H_
#define FUZZING_MUTATOR_H_

#include <cstddef>
#include <cstdint>
#include <vector>

Expand Down

0 comments on commit d8a9649

Please sign in to comment.