mirror of
https://github.com/polhenarejos/pico-fido
synced 2026-06-19 04:40:07 +02:00
Compare commits
8 Commits
3ccd6e827f
...
nightly-ma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df949f3d45 | ||
|
|
4d13107aac | ||
|
|
be6bda1baa | ||
|
|
ac2d839c15 | ||
|
|
0982522447 | ||
|
|
f7edfc916a | ||
|
|
0fd81c47d6 | ||
|
|
9ffcfb4beb |
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
@@ -40,7 +40,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|||||||
23
.github/workflows/nightly.yml
vendored
23
.github/workflows/nightly.yml
vendored
@@ -5,34 +5,49 @@ on:
|
|||||||
- cron: '0 2 * * *'
|
- cron: '0 2 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
nightly:
|
nightly:
|
||||||
name: Deploy nightly
|
name: Deploy nightly
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
refs: [main, development]
|
refs: [main, development]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
SIGNING_KEY_PATH: ${{ github.workspace }}/../private.pem
|
||||||
steps:
|
steps:
|
||||||
|
- name: Validate signing secret
|
||||||
|
run: |
|
||||||
|
test -n "${{ secrets.PRIVATE_KEY_B64 }}" || {
|
||||||
|
echo "PRIVATE_KEY_B64 is required for nightly signed releases." >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ matrix.refs }}
|
ref: ${{ matrix.refs }}
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
persist-credentials: false
|
||||||
- name: Restore private key
|
- name: Restore private key
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.PRIVATE_KEY_B64 }}" | base64 -d > private.pem
|
echo "${{ secrets.PRIVATE_KEY_B64 }}" | base64 -d > "${SIGNING_KEY_PATH}"
|
||||||
chmod 600 private.pem
|
chmod 600 "${SIGNING_KEY_PATH}"
|
||||||
- name : Build
|
- name : Build
|
||||||
env:
|
env:
|
||||||
PICO_SDK_PATH: ../pico-sdk
|
PICO_SDK_PATH: ../pico-sdk
|
||||||
SECURE_BOOT_PKEY: ../private.pem
|
SECURE_BOOT_PKEY: ${{ github.workspace }}/../private.pem
|
||||||
run: |
|
run: |
|
||||||
./workflows/autobuild.sh pico
|
./workflows/autobuild.sh pico
|
||||||
./build_pico_fido.sh --no-eddsa
|
./build_pico_fido.sh --no-eddsa
|
||||||
./workflows/autobuild.sh esp32
|
./workflows/autobuild.sh esp32
|
||||||
- name: Delete private key
|
- name: Delete private key
|
||||||
run: rm private.pem
|
if: always()
|
||||||
|
run: rm -f "${SIGNING_KEY_PATH}"
|
||||||
- name: Update nightly release
|
- name: Update nightly release
|
||||||
uses: pyTooling/Actions/releaser@v6.7.0
|
uses: pyTooling/Actions/releaser@v6.7.0
|
||||||
with:
|
with:
|
||||||
|
|||||||
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@@ -21,16 +21,22 @@ on:
|
|||||||
- cron: '23 5 * * 4'
|
- cron: '23 5 * * 4'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository and submodules
|
- name: Checkout repository and submodules
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
persist-credentials: false
|
||||||
- name: Build in container
|
- name: Build in container
|
||||||
run: ./tests/build-in-docker.sh
|
run: ./tests/build-in-docker.sh
|
||||||
- name: Start emulation and test
|
- name: Start emulation and test
|
||||||
|
|||||||
Submodule pico-keys-sdk updated: 49edef1d3f...5dfc7d51d2
@@ -34,9 +34,9 @@ int cbor_get_assertion(const uint8_t *data, size_t len, bool next);
|
|||||||
|
|
||||||
const uint8_t aaguid[16] = { 0x89, 0xFB, 0x94, 0xB7, 0x06, 0xC9, 0x36, 0x73, 0x9B, 0x7E, 0x30, 0x52, 0x6D, 0x96, 0x81, 0x45 }; // First 16 bytes of SHA256("Pico FIDO2")
|
const uint8_t aaguid[16] = { 0x89, 0xFB, 0x94, 0xB7, 0x06, 0xC9, 0x36, 0x73, 0x9B, 0x7E, 0x30, 0x52, 0x6D, 0x96, 0x81, 0x45 }; // First 16 bytes of SHA256("Pico FIDO2")
|
||||||
|
|
||||||
const uint8_t *cbor_data = NULL;
|
static const uint8_t *volatile cbor_data = NULL;
|
||||||
size_t cbor_len = 0;
|
static volatile size_t cbor_len = 0;
|
||||||
uint8_t cbor_cmd = 0;
|
static volatile uint8_t cbor_cmd = 0;
|
||||||
|
|
||||||
int cbor_parse(uint8_t cmd, const uint8_t *data, size_t len) {
|
int cbor_parse(uint8_t cmd, const uint8_t *data, size_t len) {
|
||||||
if (len == 0 && cmd == CTAPHID_CBOR) {
|
if (len == 0 && cmd == CTAPHID_CBOR) {
|
||||||
@@ -108,7 +108,10 @@ void *cbor_thread(void *arg) {
|
|||||||
if (m == EV_EXIT) {
|
if (m == EV_EXIT) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
apdu.sw = (uint16_t)cbor_parse(cbor_cmd, cbor_data, cbor_len);
|
const uint8_t *data = (const uint8_t *)cbor_data;
|
||||||
|
size_t len = cbor_len;
|
||||||
|
uint8_t cmd = cbor_cmd;
|
||||||
|
apdu.sw = (uint16_t)cbor_parse(cmd, data, len);
|
||||||
if (apdu.sw == 0) {
|
if (apdu.sw == 0) {
|
||||||
DEBUG_DATA(res_APDU, res_APDU_size);
|
DEBUG_DATA(res_APDU, res_APDU_size);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user